If you are logging into a remote host, you may encounter problems when running text-mode programs under rxvt-unicode. This can be fixed by copying {{ic|/usr/share/terminfo/r/rxvt-unicode}} from your local machine to your host at {{ic|~/.terminfo/r/rxvt-unicode}}.

If you are logging into a remote host, you may encounter problems when running text-mode programs under rxvt-unicode. This can be fixed by copying {{ic|/usr/share/terminfo/r/rxvt-unicode}} from your local machine to your host at {{ic|~/.terminfo/r/rxvt-unicode}}.

+

Same for rxvt-unicode-256color.

+

+

To change a title add something like this to .bashrc on the remote machine:

+

PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}:${PWD}\007"'

===Using rxvt-unicode as gmrun terminal===

===Using rxvt-unicode as gmrun terminal===

Revision as of 10:29, 30 January 2012

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

rxvt-unicode is a highly customizable terminal emulator forked from rxvt. Commonly known as urxvt, rxvt-unicode can be daemonized to run clients within a single process in order to minimize the use of system resources. Developed by Marc Lehmann, some of the more outstanding features of rxvt-unicode include international language support through Unicode, the ability to display multiple font types and support for Perl extensions.

The complete list of short names for X core fonts can be found in /usr/share/fonts/misc/fonts.alias (there's also some fonts.alias files in some of the other subdirectories of /usr/share/fonts/, but as they are packaged separately from the actual fonts, they may list fonts you do not actually have installed). It is worth noting that these short aliases select for ISO-8859-1 versions of the fonts rather than ISO-10646-1 (Unicode) versions, and 75 DPI rather than 100 DPI versions, so you're probably better off avoiding them and choosing fonts by their full long names instead.

Note: The above paragraph is only for bitmap fonts. Xft fonts can be specified using the following format:

URxvt.font: xft:monaco:size=10

Or

URxvt.font: xft:monaco:bold:size=10

Set icon

By default URxvt does not feature a taskbar icon. However, this can be easily changed by adding the following line to ~/.Xresources and pointing to the desired icon:

URxvt.iconFile: /usr/share/icons/Clarity/scalable/apps/terminal.svg

Perl extensions

Clickable URLs

You can make URLs in the terminal clickable using the matcher extension. For example, to open links in Firefox add the following to .Xresources:

Cut and Paste

Note: With the use of a VDT multiplexer, urxvt (or any VDT emulator) CLIPBOARD integration will not be effective, since it will not be possible to select all of the desired text in a straightforward fashion or at all, in some cases (e.g., when the active multiplexed terminal is changed to another one and then back to the original one, and one selects text beyond what is visible, which causes text from the other terminal to be displayed). Obviously this is due to the fact that the VDT emulator lacks the ability to distinguish between multiplexed terminals. Therefore, it would be effectively redundant for one who always uses a VDT multiplexer capable of maintaining a scrollback buffer and integrating with CLIPBOARD (e.g., tmux with customized key bindings) to integrate CLIPBOARD with urxvt.

For users unfamiliar with Xorg data transfer methods, the exchange of information to and from rxvt-unicode can become a burden. Suffice to say that rxvt-unicode uses cut buffers which are typically loaded into the current PRIMARY selection by default.[4] Users are urged to review Wikipedia:X Window selection for additional information.

Clipboard Management

Parcellite is a GTK+ clipboard manager which can also run in the background as a daemon.

A previous version of xdotool introduced a bug which disabled recognition of visible windows and thus led some users to use the following scriptlet in place of the previous one. This is no longer necessary as of xdotool >= 1.20100416.2809, but it has been left here for future reference.

Make sure that you change /path/to/urxvtc to the actual path to the urxvtc scriptlet that you saved above. We will be using urxvtc to launch both regular instances of urxvt and the kuake-like instance.

urxvtq with tabbing

If you want to have tabs in your kuake-like urxvtc (here called urxvtq) just replace the third line in your urxvtq:

wid=$(xdotool search --name urxvtq)

with:

wid=$(xdotool search --name urxvtq | grep -m 1 "" )

To activate the tab support, you can either replace the fifth line of your urxvtq:

Here too you need to change the /path/to/* lines to point to the scripts that you saved above. Save the file and then reconfigure Openbox. You should now be able to launch regular instances of urxvt with the Windows/Super key + Template:Keypress, and toggle the kuake-like console with the Windows/Super key + Template:Keypress (the grave key also known as the backtick).

Further configuration

The advantage of this configuration over the urxvt kuake Perl script is that Openbox provides more keybinding options such as modifier keys. The kuake script hijacks an entire physical key regardless of any modifier combination. Review the Openbox bindings documentation for the full range or possibilities.

The Openbox per-app settings can be used to further configure the behavior of the kuake-like console (e.g. screen position, layer, etc.). You may need to change the "geometry" parameter in the urxvtq scriptlet to adjust the height of the console.

Related scripts

hbekel has posted a generalized version of the urxvtqhere which can be used to toggle any application using xdotool.

To make true transparency work, make sure to comment URxvt.tintColor and URxvt.inheritPixmap.

Remote Hosts

If you are logging into a remote host, you may encounter problems when running text-mode programs under rxvt-unicode. This can be fixed by copying /usr/share/terminfo/r/rxvt-unicode from your local machine to your host at ~/.terminfo/r/rxvt-unicode.
Same for rxvt-unicode-256color.

To change a title add something like this to .bashrc on the remote machine:

PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}:${PWD}\007"'

Using rxvt-unicode as gmrun terminal

Unlike some other terminals, urxvt expects the arguments to -e to be given separately, rather than grouped together with quotes. This causes trouble with gmrun, which assumes the opposite behavior. This can be worked around by putting an "eval" in front of gmrun's "Terminal" variable in .gmrunrc:

Terminal = eval urxvt
TermExec = ${Terminal} -e

(gmrun uses /bin/sh to execute commands, so the "eval" is understood here.) The "eval" has the side-effect of "breaking up" the argument to -e in the same way that $@ does in Bash, making the command intelligible to urxvt.

Some Debian GNU/Linux users seem to have this problem, although no specific details were reported so far. It is possible that this is caused by the wrong TERM setting, although the details of whether and how this can happen are unknown, as TERM=rxvt should offer a compatible keymap. See the answer to the previous question, and please report if that helped.

However, using the xmodmap program (xorg-xmodmap), you can re-map your numpad keys back.