The look, feel, and function of rxvt-unicode is controlled by command-line arguments and/or [[X resources]]. X resources can be set using {{ic|~/.Xresources}} and xrdb ({{Pkg|xorg-xrdb}}), see the [[X_resources|wiki page]] for details.

The look, feel, and function of rxvt-unicode is controlled by command-line arguments and/or [[X resources]]. X resources can be set using {{ic|~/.Xresources}} and xrdb ({{Pkg|xorg-xrdb}}), see the [[X_resources|wiki page]] for details.

{{Note|Command-line arguments override, and take precedence over resource settings}}

{{Note|Command-line arguments override, and take precedence over resource settings}}

Line 44:

Line 50:

where '95' is the opacity level in percentage and '#000000' is the background color.

where '95' is the opacity level in percentage and '#000000' is the background color.

+

+

To use a color i.e. #302351 with the rgba:rrrr/gggg/bbbb/aaaa syntax it would be rgba:3000/2300/5100/ee00. "ee00" (the alpha value) to make it nicely transparent.

{{Note|To make these settings universal for all forms of URxvt, you may add a wildcard. For example, {{ic|URxvt.depth}} would become {{ic|URxvt*.depth}}.}}

{{Note|To make these settings universal for all forms of URxvt, you may add a wildcard. For example, {{ic|URxvt.depth}} would become {{ic|URxvt*.depth}}.}}

Line 66:

Line 74:

The scrollbar can also be completely deactivated like so:

The scrollbar can also be completely deactivated like so:

URxvt.scrollBar: false

URxvt.scrollBar: false

+

+

===Scrollback Position===

+

By default, when shell output appears the scrollback view will automatically jump to the bottom of the buffer to display new output. If in cases where you want to see previous output (e.g., compiler messages), set the following options in {{ic|~/.Xresources}}:

+

+

! do not scroll with output

+

URxvt*scrollTtyOutput: false

+

+

! scroll in relation to buffer (with mouse scroll or Shift+Page Up)

+

URxvt*scrollWithBuffer: true

+

+

! scroll back to the bottom on keypress

+

URxvt*scrollTtyKeypress: true

===Font Declaration Methods===

===Font Declaration Methods===

Line 84:

Line 104:

Or

Or

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

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

+

+

{{Note|If there is a hyphen(-) in the Xft font name, it must be escaped with backslash(\) twice. It's different from the usage of urxvt -fn option and the result that fc-list returns, where backslash present only once}}

===Set icon===

===Set icon===

+

{{Note|Because of a bug report[https://bugs.archlinux.org/task/34862] complaining that the rxvt-unicode package had too many dependencies, you must now install the AUR package {{AUR|rxvt-unicode-pixbuf}} in order to use the icon option.}}

+

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

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

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

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

Line 92:

Line 116:

This will cause the shell to be started as a login shell, like the option {{ic|-ls}}.

This will cause the shell to be started as a login shell, like the option {{ic|-ls}}.

URxvt*loginShell: true

URxvt*loginShell: true

−

−

===Set TERM===

−

Sets $TERM to a specific terminal, like the option {{ic|-tn}}.

−

URxvt*termName:screen-256color

==Perl extensions==

==Perl extensions==

Line 123:

Line 143:

'''Key commands:'''

'''Key commands:'''

+

{{Tip|To change {{ic|Alt+u}} to a more intuitive {{ic|Ctrl+i}}, replace {{ic|M-u}} by {{ic|C-i}} above.}}

−

{{Keypress|Alt+U}} Enter selection mode. The last URL on your screen will be selected. You can repeat {{Keypress|Alt+U}} to select the next upward URL.

+

{{ic|Alt+u}} Enter selection mode. The last URL on your screen will be selected. You can repeat {{ic|Alt+u}} to select the next upward URL.

−

{{Keypress|K}} Select next upward URL

+

{{ic|k}} Select next upward URL

−

{{Keypress|J}} Select next downward URL

+

{{ic|j}} Select next downward URL

−

{{Keypress|Return}} Open selected URL in browser and quit selection mode

+

{{ic|Return}} Open selected URL in browser and quit selection mode

−

{{Keypress|O}} Open selected URL in browser without quitting selection mode

+

{{ic|o}} Open selected URL in browser without quitting selection mode

−

{{Keypress|Y}} Copy (yank) selected URL and quit selection mode

+

{{ic|y}} Copy (yank) selected URL and quit selection mode

−

{{Keypress|Esc}} Cancel URL selection mode

+

{{ic|Esc}} Cancel URL selection mode

===Tabs===

===Tabs===

Line 144:

Line 165:

To control tabs use:

To control tabs use:

−

{{Keypress|Shift+ ↓}} new tab

+

{{ic|Shift+ ↓}} new tab

−

{{Keypress|Shift+ ←}} go to left tab

+

{{ic|Shift+ ←}} go to left tab

−

{{Keypress|Shift+ →}} go to right tab

+

{{ic|Shift+ →}} go to right tab

−

{{Keypress|Ctrl+ ←}} move tab to the left

+

{{ic|Ctrl+ ←}} move tab to the left

−

{{Keypress|Ctrl+ →}} move tab to the right

+

{{ic|Ctrl+ →}} move tab to the right

−

{{Keypress|Ctrl+D}}: close tab

+

{{ic|Ctrl+D}}: close tab

You can change the colors of tabs with the following:

You can change the colors of tabs with the following:

Line 162:

Line 183:

URxvt.tabbed.tab-bg: 0

URxvt.tabbed.tab-bg: 0

−

For named tabs, see {{AUR|urxvt-tabbedex}}, ({{Keypress|Shift+ ↑}}: names a tab).

+

For named tabs, see {{AUR|urxvt-tabbedex}}, ({{ic|Shift+ ↑}}: names a tab).

===Fullscreen===

===Fullscreen===

Line 180:

Line 201:

URxvt.perl-ext-common: ...,vtwheel,...

URxvt.perl-ext-common: ...,vtwheel,...

+

+

===Changing font size on the fly===

+

+

Install {{AUR|urxvt-font-size-git}} from the [[AUR]], add it to your Perl extensions within {{ic|~/.Xresources}}

+

+

URxvt.perl-ext-common: ...,font-size,...

+

+

and add some key bindings, for example like this:

+

+

URxvt.keysym.C-Up: perl:font-size:increase

+

URxvt.keysym.C-Down: perl:font-size:decrease

+

URxvt.keysym.C-S-Up: perl:font-size:incglobal

+

URxvt.keysym.C-S-Down: perl:font-size:decglobal

+

+

For the suggested Ctrl+Shift bindings to work, a default binding needs to be disabled (see discussion [http://wilmer.gaa.st/blog/archives/36-rxvt-unicode-and-ISO-14755-mode.html here]):

+

+

URxvt.iso14755: false

+

URxvt.iso14755_52: false

===Disabling Perl extensions===

===Disabling Perl extensions===

Line 231:

Line 270:

*Limit the number of {{Ic|saveLines}} (option {{Ic|-sl}}) in the scrollback buffer to reduce memory usage.<sup>[http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.7.pod#Isn_t_rxvt_unicode_supposed_to_be_sm]</sup>

*Limit the number of {{Ic|saveLines}} (option {{Ic|-sl}}) in the scrollback buffer to reduce memory usage.<sup>[http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.7.pod#Isn_t_rxvt_unicode_supposed_to_be_sm]</sup>

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 {{Ic|PRIMARY}} selection by default.<sup>[http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.1.pod#THE_SELECTION_SELECTING_AND_PASTING_]</sup> Users are urged to review [[Wikipedia:X Window selection]] for additional information.

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 {{Ic|PRIMARY}} selection by default.<sup>[http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.1.pod#THE_SELECTION_SELECTING_AND_PASTING_]</sup> Users are urged to review [[Wikipedia:X Window selection]] for additional information.

−

+

====Default Key Bindings====

+

Default X key bindings will still work for copying and pasting. After selecting the text Ctrl+Insert can be used to copy and Shift+Insert to paste.

====Clipboard Management====

====Clipboard Management====

* [http://parcellite.sourceforge.net/ Parcellite] is a GTK+ clipboard manager which can also run in the background as a daemon.

* [http://parcellite.sourceforge.net/ Parcellite] is a GTK+ clipboard manager which can also run in the background as a daemon.

Line 263:

Line 326:

</nowiki>}}

</nowiki>}}

−

Xyne has also created his own variation of Skottish's script named {{AUR|urxvt-clipboard}} which is available in the [[AUR]] that allows the user to paste the selection with {{Keypress|Ctrl+V}} instead of only with a middle mouse click:

+

Xyne has also created his own variation of Skottish's script named {{AUR|urxvt-clipboard}} which is available in the [[AUR]] that allows the user to paste the selection with {{ic|Ctrl+V}} instead of only with a middle mouse click:

{{bc|<nowiki>

{{bc|<nowiki>

#! /usr/bin/perl

#! /usr/bin/perl

Line 356:

Line 419:

====Tab control====

====Tab control====

−

{{Keypress|Shift+ ←}}: Switch to the tab left of the current one

+

{{ic|Shift+ ←}}: Switch to the tab left of the current one

−

{{Keypress|Shift+ →}}: Switch to the tab right of the current one

+

{{ic|Shift+ →}}: Switch to the tab right of the current one

−

{{Keypress|Shift+ ↓}}: Create a new tab

+

{{ic|Shift+ ↓}}: Create a new tab

You can also use your mouse to switch the tabs by clicking the wished one and create a new tab by clicking on ''[NEW].\\''

You can also use your mouse to switch the tabs by clicking the wished one and create a new tab by clicking on ''[NEW].\\''

Line 397:

Line 460:

}}

}}

−

Here too you need to change the {{Ic|/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 {{keypress|Super+T}}, and toggle the kuake-like console with {{keypress|Super+'''`'''}} (the grave key also known as the backtick).

+

Here too you need to change the {{Ic|/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 {{ic|Super+T}}, and toggle the kuake-like console with {{ic|Super+'''`'''}} (the grave key also known as the backtick).

===Further configuration===

===Further configuration===

Line 410:

Line 473:

==Troubleshooting==

==Troubleshooting==

+

===~/.Xresources is not being sourced===

+

In some cases where urxvt does not acknowledge {{ic|~/.Xresources}}, you may need to add {{ic|xrdb -merge ~/.Xresources}} to your {{ic|~/.xinitrc}} file. See [[X resources]] for more information.

+

===Transparency not working after upgrade to v9.09===

===Transparency not working after upgrade to v9.09===

The rxvt-unicode developers removed compatibility code for a lot of non standard wallpaper setters with this update. Using a non compatible wallpaper setter will break transparency support. Recommended wallpaper setters:

The rxvt-unicode developers removed compatibility code for a lot of non standard wallpaper setters with this update. Using a non compatible wallpaper setter will break transparency support. Recommended wallpaper setters:

Revision as of 13:24, 12 October 2013

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.

Scrollback Position

By default, when shell output appears the scrollback view will automatically jump to the bottom of the buffer to display new output. If in cases where you want to see previous output (e.g., compiler messages), set the following options in ~/.Xresources:

! do not scroll with output
URxvt*scrollTtyOutput: false
! scroll in relation to buffer (with mouse scroll or Shift+Page Up)
URxvt*scrollWithBuffer: true
! scroll back to the bottom on keypress
URxvt*scrollTtyKeypress: true

Font Declaration Methods

URxvt.font: 9x15

is the same as:

URxvt.font: -misc-fixed-medium-r-normal--15-140-75-75-c-90-iso8859-1

And, for the same font in bold:

URxvt.font: 9x15bold

is the same as:

URxvt.font: -misc-fixed-bold-r-normal--15-140-75-75-c-90-iso8859-1

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

Note: If there is a hyphen(-) in the Xft font name, it must be escaped with backslash(\) twice. It's different from the usage of urxvt -fn option and the result that fc-list returns, where backslash present only once

Set icon

Note: Because of a bug report[1] complaining that the rxvt-unicode package had too many dependencies, you must now install the AUR package rxvt-unicode-pixbufAUR in order to use the icon option.

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

Set as Login Shell

This will cause the shell to be started as a login shell, like the option -ls.

URxvt*loginShell: true

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.[5] Users are urged to review Wikipedia:X Window selection for additional information.

Default Key Bindings

Default X key bindings will still work for copying and pasting. After selecting the text Ctrl+Insert can be used to copy and Shift+Insert to paste.

Clipboard Management

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

Xyne has also created his own variation of Skottish's script named urxvt-clipboardAUR which is available in the AUR that allows the user to paste the selection with Ctrl+V instead of only with a middle mouse click:

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 tab support, you can either replace the fifth line of your urxvtq:

/path/to/urxvtc -name urxvtq -geometry 80x28

with:

/path/to/urxvtc -name urxvtq -pe tabbed -geometry 80x28

or replace this line of your ~/.Xresources file:

URxvt.perl-ext-common: default,matcher

with

URxvt.perl-ext-common: default,matcher,tabbed

Tab control

Shift+ ←: Switch to the tab left of the current one

Shift+ →: Switch to the tab right of the current one

Shift+ ↓: Create a new tab

You can also use your mouse to switch the tabs by clicking the wished one and create a new tab by clicking on [NEW].\\

To close a tab just enter exit like you would to normally close a terminal.

Openbox configuration

Now add the following lines to the <applications> section of ~/.config/openbox/rc.xml:

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 Super+T, and toggle the kuake-like console with Super+` (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.

Some remote systems do not change title automatically unless you specify TERM=xterm. To fix the issue add this line 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 number pad keys back.