Rxvt-Unicode

From Gentoo Linux Wiki

Jump to: navigation, search

Contents

[edit] Introduction

Rxvt-unicode, commonly known as URxvt, is a color VT102 terminal emulator for the X Window System. It was written by Marc Lehmann, who forked it from rxvt in November 2003. Stability, internationalization and support for Unicode is its primary focus, as well as the capability to display different fonts and locales simultaneously.

Another goal of the project is to be resource-friendly like rxvt. Even though it has features such as pseudo-transparency, Perl extensions, and support for Xft fonts, it can still be configured to be lean and efficient, according to the author. Furthermore, it has a daemon mode that reduces memory usage and startup time when using multiple terminals.

[edit] Installation

As later versions and ebuild revisions of x11-terms/rxvt-unicode carries more USE flags and thus more options you might find yourself wanting to install a version of x11-terms/rxvt-unicode from the testing(~<your arch>) branch, if so, see the official Gentoo documentation on mixing stable and testing branches.

[edit] USE Flags

After having set the appropriate USE flags for x11-terms/rxvt-unicode, you can install URxvt.

[edit] Emerge

Install it using:

emerge --ask --verbose rxvt-unicode

[edit] Configuration

There is not anything that needs to be configured for rxvt-unicode to be used. Everything in this section is completely optional.

[edit] Transparency

This is not the same effect as with transset-df; the point is to have a real transparent background, with the frame and text remaining normal. It is pseudo-transparency done right. You must emerge x11-terms/rxvt-unicode with the truetype USE flag enabled for this to work.

Start rxvt-unicode like this:

urxvt -depth 32 -fg grey90 -bg rgba:0000/0000/0000/dddd

This is with different font, slightly brighter background and text, no scrollbar and terminal naming.

urxvt -name Terminal -fn "xft:Monospace:pixelsize=11" -fade 20 +sb -depth 32 -fg white -bg rgba:2000/2000/2000/dddd

If real transparency will not work for you, make sure you have started a composite window manager (e.g. xcompmgr or Compiz). If this does not change anything, you could try to use EXA instead of XAA for your graphics acceleration. Edit your /etc/X11/xorg.conf appropriately:

File: /etc/X11/xorg.conf
Section "Device"
...
        Option          "AccelMethod" "EXA"
        Option          "EXANoOffscreenPixmaps" "true"
....

[edit] ~/.Xdefaults

Also you can save settings in ~/.Xdefaults, for example:

File: ~/.Xdefaults
URxvt*font:		xft:Bitstream Vera Sans Mono:style=Regular:pixelsize=13
URxvt*background:	#000000
URxvt*foreground:	#FFFFFF

See the urxvt man pages for the various settings(in which these options are refereed to as resources):

man urxvt

[edit] Server/Client

rxvt-unicode can be run in a server/client mode. Doing so will reduce overall memory usage when running multiple terminals, and will reduce start up time when opening a new terminal. The daemon must be running as the same user running the client, so you will have to add urxvtd to each users' start up list. An example using Fluxbox follows:

File: ~/.fluxbox/startup
...
# Applications you want to run with fluxbox.
# MAKE SURE THAT APPS THAT KEEP RUNNING HAVE AN ''&'' AT THE END.
...
urxvtd &
....

Then edit the users' menu to use urxvtc to connect to the daemon.

Also - see man urxvtc for nice script. ;-)

[edit] Troubleshooting

[edit] Error opening terminal: rxvt-unicode.

If you get the error "Error opening terminal: rxvt-unicode." when trying to run nano on a remote machine, running this command from the machine on which you have rxvt-unicode installed will resolve the issue:

infocmp rxvt-unicode | ssh USER@REMOTE_IP "mkdir -p .terminfo && cat >/tmp/ti && tic /tmp/ti"

If you're performing an install via SSH, you can run the above command and then run this:

cp -R /root/.terminfo /mnt/gentoo/root

So that when you chroot you should not have an issue.

Personal tools