| These projects have moved to https://code.google.com/p/jessies/. | ||||
| software.jessies.org | Evergreen | salma-hayek | SCM | Terminator |
|---|---|---|---|---|
jessies.org's Terminator is not Chris Jones's Terminator, sometimes known as GNOME Terminator. Ours is a completely unrelated terminal emulator that was using the same lame name first.
Similarly, $HOME/.config/terminator/config is not our configuration file. We don't support splitting windows.
Most likely, either you don't have Terminator's terminfo data installed on the remote machine you're trying to use, or your TERM environment variable isn't set to "terminator". For detailed information on working out which is your problem, and how to fix either problem, see "Why am I having problems with terminfo/curses?" below.
Terminator will try to choose a good fixed-width/monospaced font for you, but it can only choose from what you have installed.
On Mac OS, you already have the traditional (for Apple) "Monaco" and alternatives of "Lucida Sans Typewriter" and, on Mac OS 10.6, the new "Menlo".
On Windows, if you have the JRE installed (rather than the JDK), then you may want to rerun the JRE installer and choose "Show advanced options panel" and then "Additional Font and Media Support" so that you get "Lucida Sans Typewriter" installed, otherwise you'll end up with "Courier New", and won't be able to distinguish the letter l from the number 1.
Many Windows users seem to like proggy fonts. You can also use these fonts on other operating systems, though in all cases you should download the TrueType version rather than the version specifically for your OS, because Terminator needs the TrueType version.
On Mac OS, see "Where can I get a nice terminal font?". Both of our recommendations cover Latin-based European languages, Chinese, Cyrillic, Greek, Japanese, Korean, and Thai.
On Linux, Solaris, and Windows, you'll need to install the operating system's support files for the language or languages you're interested in to be sure that you have sufficient font coverage. The safest choice is then to tell Terminator to use the logical "Monospaced" font, which is actually just a collection of native fonts that attempts to cover most of Unicode.
The exact fonts used by "Monospaced" for the different ranges varies between operating systems. One problem with "Monospaced" on Windows is that the ASCII range will be covered with "Courier New" (Linux and Solaris users will get "Lucida Sans Typewriter"). See Sun's fontconfig documentation if you want to customize the choices.
(Note that Terminator currently doesn't cope well with far-east Asian languages, where glyphs tend to be wider than for European languages. Many terminal-based programs seem to have trouble too. If you'd like to help us improve Terminator's support for far-east Asian languages, please get in touch.)
Assuming you're using Bash, you need a function like this in your ~/.bash_profile:
setWindowTitle() {
echo -ne "\e]2;$*\a"
}
You can call this with any argument to set the window's title to that string. If the terminal running this is in a tab, the tab's title will be changed; a window with multiple tabs takes its title from the current tab.
This function will work for XTerm and most other terminal emulators too. One place it won't work is the Linux text console. For that reason, I recommend surrounding all the code in this FAQ section with something like this:
if [ "$TERM" == "terminator" ]
then
# window-title stuff here.
fi
If you have a prompt something like this:
export PS1="\[\033[33m\]\h:\w\$ \[\033[0m\]"
You might want to achieve a similar effect in your title bar. Annoyingly, those \h and \w escapes (hostname without domain name and directory with $HOME rewritten as ~, respectively) only work in the PS1 environment variable. Luckily, Bash offers you an alternative way to achieve the same effect without the cost of running external programs (a common work-around):
updateWindowTitle() {
setWindowTitle "${HOSTNAME%%.*}:${PWD/$HOME/~}"
}
PROMPT_COMMAND=updateWindowTitle
Read the Bash manual page for full details of PS1, PROMPT_COMMAND, or the advanced forms of substitution.
Cygwin's default /etc/profile includes an escape sequence in PS1 that sets the window title. Bearing in mind the answer to the previous question, if you want to disable this behavior on Cygwin, you will need to override its definition of PS1.
Add the line set title to your .vimrc and Vim will put the filename and some other information in the title bar.
If you don't care why this happens, just ensure that shopt | grep checkwinsize says that this option is on. If it's not, add shopt -s checkwinsize to your login script.
If you care why, keep reading...
Terminal emulators only indirectly tell their children when the window size changes. Really, they're just concerned with telling the kernel that the window size changed. This is done with an ioctl(2) system call. The kernel updates its information about the pseudo terminal and sends a SIGWINCH ("WINdow [size] CHange") signal to the process group that has the terminal. Applications can install a signal handler for this signal to update their own idea of the terminal size, and possibly redraw themselves.
In the olden days, this all worked fine. With the invention of shells with job control, though, shells started putting each pipeline in its own process group. (Note that from the shell grammar point of view, a pipeline may just be a simple command with no actual piping.) So the kernel sends the SIGWINCH to the foreground process group, as it always has, but now the shell is oblivious to this because it's in a different process group. Luckily, there's an ioctl(2) to read the window size, and if checkwinsize is set, Bash uses this to ask the kernel about the current window size whenever it regains control of the terminal.
Terminator has its own terminfo file. This is regrettably necessary because of Terminator's unconventional approach to handling wide lines with a horizontal scrollbar rather than by wrapping them. The file will be installed under ~/.terminfo the first time you run Terminator. If you used an installer that runs as root and can write to the system-wide terminfo directory (currently just the Linux installer), the terminfo file will be installed system-wide at install time.
If you run Terminator itself as root and the terminfo file has not been installed in the system-wide terminfo directory, it will be installed at that point.
If the terminfo file isn't available, the most common warnings you'll see are this one from programs such as less(1):
WARNING: terminal is not fully functional - (press RETURN)
and this one, from vim(1):
E558: Terminal entry not found in terminfo
'terminator' not known. Available builtin terminals are:
builtin_riscos
builtin_amiga
builtin_beos-ansi
builtin_ansi
builtin_pcansi
builtin_win32
builtin_vt320
builtin_vt52
builtin_xterm
builtin_iris-ansi
builtin_debug
builtin_dumb
defaulting to 'ansi'
If you think you have the correct terminfo available but you're still having problems, the next thing to check is that you're actually using Terminator's terminfo. For example, if your problem is with your shell, check that echo $TERM says "terminator", and if your problem is with Vim, check that :se term says "term=terminator".
Although Terminator sets the TERM environment variable to "terminator" for you, your shell's profile may be setting it to an incorrect value. Also, if you're logging in to a remote machine, the value of TERM may not be correctly transferred. It's always worth checking as described in the previous paragraph. The correct fix is to change your profile so it doesn't override TERM, and to use protocols like SSH which transfer your terminal type. You definitely shouldn't force TERM to be "terminator" (or any other value) in your profile: that's how you get into this kind of trouble.
(See later for problems specific to Cygwin, Fedora/RedHat, and FreeBSD.)
If the terminfo file is not installed in the system-wide location then other users (and you yourself, if you use su(1) to switch to another user) will have problems. Using sudo(1) to run a command as another user will work in many cases, because it doesn't alter $HOME by default.
For best results, on computers where you'll be logged in as root at times, we recommend you install the terminfo file for Terminator in /usr/share/terminfo. The easiest way to do this is to simply run Terminator once as root. From then on, you can run Terminator as your normal user, and use su(1) to become root. If you find nothing in /usr/share/terminfo already, then perhaps your system uses a different root directory. man infocmp should tell you.
You will also need to ensure that any machines you'll be remotely logging in to also have a copy of the terminfo file installed. If you use the same home directory on the local and remote machines, everything will just work. Likewise if someone has already run Terminator as root on the remote machine.
(Note that if you try to run Terminator on a remote machine, it probably won't get as far as opening a window. Nonetheless, it will get far enough to set up the terminfo file. Note also that running Terminator on a remote machine as a matter of course is usually a mistake, and will be much slower than running Terminator on your local machine and simply logging in to the remote machine from within Terminator using ssh(1) or whatever.)
If you're not able to run Terminator as root, you can simply run Terminator as yourself on the remote machine.
If you can't easily install or run Terminator on the remote machine, you only need to copy the terminfo file to ~/.terminfo/t/terminator (you'll need to mkdir -p ~/.terminfo/t if the directories don't already exist). Note that if your remote machine is a Mac, you'll need to copy the file to ~/.terminfo/74/terminator because of a long-standing Mac OS bug (0x74 is the byte representing 't' in ASCII); running Terminator automatically covers both cases, for completeness.
On Linux or Mac OS, and most other ncurses-based systems, this is all you need to do. If you still have problems like the ones shown at the start of this section, add the following lines to your profile on the remote machine:
export TERMINFO=~/.terminfo export TERM=$TERM
Cygwin-1.5's less(1) still uses a termcap-based ncurses library. If less(1) – and hence man(1) – say "WARNING: terminal is not fully functional" and upgrading to Cygwin-1.7 is not an option, then try:
infocmp -Cr >> ~/.termcap
infocmp is provided by Cygwin's ncurses package.
RedHat installs vim-minimal to provide /bin/vi. vim-minimal avoids the use of terminfo, seemingly deliberately, if frustratingly. We don't know of a simple, complete way of persuading RedHat to always use one of its other vim packages, which use terminfo. (The sudo package, for example, depends explicitly on vim-minimal.)
If you need to use applications, like vim-minimal, which are compiled with termcap, then first install Terminator on the RedHat box or otherwise install the Terminator terminfo there. Then:
infocmp -Cr >> ~/.termcap
Even with termcap set up, so that eg cursors work, we don't know how to make vim-minimal produce colors with TERM=terminator. We suggest that you install vim-enhanced, which colors out of the box, anyway and use that (via vim rather than vi) when you have a choice. If you know how to beat vim-minimal into coloring with TERM=terminator, then we'd love to know.
Finally, it seems necessary to add this line, or an equivalent, to your .bash_profile or equivalent:
export TERMCAP=~/.termcap
FreeBSD systems don't come with the necessary terminfo support installed by default. It's apparently a snap to install the devel/ncurses package from the FreeBSD Ports and Packages Collection.
We believe /usr/share/lib/terminfo to be the appropriate directory. When the terminfo file is missing, telnetd sets $TERM to TERMINATOR (when it should be terminator).
By default, Terminator uses the alt key for its keyboard equivalents for menu actions (except on Mac OS). If you want to use the alt key as Emacs' meta, you need to tell Terminator so in the preferences dialog. Then Terminator will use control+shift for its keyboard equivalents, and alt-key combinations will be passed through to the application.
Mac Emacs users can't use the alt key as Emacs' meta because bugs in Apple's Java VM mean that Terminator isn't given the correct key presses. In some cases (alt-e, alt-u, alt-i, and alt-n) we're not given any key press at all. We've raised Apple bug ID#5158674, and will have to wait for Apple to fix their JVM. Emacs works fine in Terminator on Linux, Solaris, and Windows, if that's an alternative for you.
Terminator will always start the shell specified by the SHELL environment variable. (It will fall back to /bin/sh if the SHELL environment variable isn't set.) You could simply influence Terminator's environment, but the best solution is to tell your operating system which shell you'd like, and it will ensure that SHELL is set correctly for all applications, not just Terminator. See the documentation for your operating system for details on how to change your default shell.
You can start other programs, even in multiple tabs, from the command line. See terminator --help for the syntax. Here's an example that opens a new window with two tabs:
terminator -n "top's tab's title" top -n "another tab title" bash
If you install the nautilus-open-terminal package and restart Nautilus (with eg killall nautilus, though surely there must be a better way), Nautilus will gain an "Open Terminal" menu item. In the system-wide "Preferred Applications" preference dialog, you can choose "Custom" as your terminal emulator. Enter "terminator" as the command, and "-e" as the execute flag.
If you have GNOME 2.21 or later, "Terminator" will already be an available option. Immortal honor, in the ChangeLog, awaits the first person to submit a patch such that Terminator's icon appears in that list, like those of the other alternatives.
If you're using an old version of VNC, you may experience problems pasting into Terminator, with the following exception in the "Debugging Messages":
java.awt.datatransfer.UnsupportedFlavorException: Unicode String
This is caused by a bug in old versions of the X11 VNC server. On Debian, you should remove the vncserver package and install the vnc4server package, and run vnc4server (it takes the same arguments as vncserver) — just upgrading your existing vncserver package will not help. Switching package will also a fix a bunch of other problems you may or may not have noticed with VNC.
We recommend that you run rdesktop with the -r clipboard:CLIPBOARD switch. Without the switch, Terminator's X11 selection can't be pasted into rdesktop for reasons unknown. In any case, as Windows has no direct equivalent of pasting the selection, the symmetrical approach seems likely to cause less confusion.
A lot of terminal-based programs (such as Bash and Vim) attempt to ring the terminal's bell to indicate that you're trying to do something impossible. Terminator implements an alternative, called "visual bell". The default rendering of the visual bell is to briefly flash the entire window a gentle shade of your normal background color.
If you find that the effect is too slow, try turning off the preference "High-quality rendering of the visual bell". This uses a cheaper (XOR) effect that doesn't look as nice, but which is more efficient for slow graphics hardware or network use such as VNC.
If you really just don't want any effect, you can turn off the preference "Visual bell (as opposed to no bell)", in which case Terminator will do nothing when an application tries to ring the bell.
On Windows, terminal emulators are often combined in the same program with telnet/SSH clients, or code that accesses serial ports. The Unix tradition is that terminal emulators don't care what they're running, will run whatever you ask them to, and don't have any other programs welded on. Terminator follows the Unix tradition (including on Cygwin).
There are various choices for accessing serial ports from Terminator. The simplest choice is probably socat(1) (http://www.dest-unreach.org/socat/). The ability to stick GNU readline between you and the serial port is pretty nice, if you think how awful most serial devices' consoles are. If you're an old-school Unix minimalist type, this is probably what you're looking for.
Many people on the net recommend "minicom" (http://alioth.debian.org/projects/minicom/). If you want a hierarchical text-based menu interface, like DOS programs of the 1980s, this is the one for you. This might be a better initial choice if you're unfamiliar with serial ports or otherwise need to experiment to find the right settings.
We're told that screen(1) (http://www.gnu.org/software/screen/) works too: try sudo screen /dev/ttyS0. If you already use screen(1), this may be just what you're looking for. If you don't, you might find the learning curve very steep (because screen has a lot of functionality).
Serial concentrators turn serial connections into telnet ones, rendering the issue moot. I've had bad experiences with old models being both slow and dropping characters from one port when another port is under load. "Digi PortServer 16", though, I can recommend as being worth the several hundred dollar price tag.
If you're actually looking for XMODEM, YMODEM, ZMODEM file transfer, lrzsz(1) (http://www.ohse.de/uwe/software/lrzsz.html) is excellent. Its UI could be improved; it would be nice if the frame-by-frame progress reports were as concise and useful as HyperTerminal's. (If you did this, engineers working on new hardware bringup want to know if packets are being dropped, how long the transfer's going to take and whether the transfer rate is what it should be. Graphing transfers and errors against time would give them more useful information than they get from HyperTerminal, without drowning them as lrzsz(1) currently does.)
We have a page devoted to Setting up Cygwin and another about Cygwin-specific problems, which may help.