Difference between revisions of "Rxvt-Unicode Configuration Tutorial"
(New page: == Introduction == This article is a tutorial covering basic configuration setups for the rxvt-unicode (urxvt) terminal. In short, your plain urxvt terminal can change from this: [[Imag...)
Revision as of 13:04, 25 January 2008
This article is a tutorial covering basic configuration setups for the rxvt-unicode (urxvt) terminal.
In short, your plain urxvt terminal can change from this:
A user can enhance the look and performance of the terminal by setting environment variables and resources; these settings are controlled through existing and additional configuration files.
Features such as font and font size, transparency, tinting, scrollback buffer size, and scrollbar placement can be set by editing small plain text files.
This tutorial gives a brief description of the Rxvt-Unicode terminal, a basic terminal environment setup, and the creation of the .Xdefaults configuration file.
Description of the Rxvt-Unicode Terminal
Rxvt-Unicode is a terminal emulator for the X Window System. It is based-on rxvt version 2.7.11, and provides Unicode, pseudo-transparency, shading, tinting, backgrounds, embedded perl support, and many other options and features. Since version 8.3, it offers full support for AfterStep's libAfterImage library.
Rxvt-Unicode has replaced aterm as the preferred terminal emulator for the AfterStep window manager; it offers more features and makes no sacrifices in terms of performance.
For a complete feature list, downloads, and detailed documentation, visit the Rxvt-Unicode WEBSITE.
A note on aterm: Although aterm has served its demanding users very well, it has one shortcoming: aterm does not support Unicode.
The number-one requested feature submitted to the aterm development team has been for Unicode support. Implementing this support isn't practical, as much of the aterm code would need significant rewriting; the end product wouldn't offer the light, fast terminal that users expect.
aterm development has merged with rxvt-unicode; aterm is currently maintained, but future development work is targeted to rxvt-unicode.
Basic Terminal Setup
Before configuring Rxvt-Unicode you need to setup some tools and environment variables.
A terminal benefits from having colored folders when the "ls" command is executed within it; folders stand-out and are distinct from files. Open a terminal and type "ls -l" and verify that folders are colored differently than files; if they aren't colored differently, you will need to modify the ".bashrc" file.
To implement colored folders, edit the ~/.bashrc ($HOME/.bashrc) file, located in the user's home folder. Add the following line under the heading:
# User specific aliases and functions:
alias ls="ls -h --color=auto"
Close the terminal and reopen it. Use the "ls -l" command again. You should see colored folders.
You will also need to set the language locale to use, and to tell your system that you are using a rxvt-based terminal. Edit the ~/.bash_profile ($HOME/.bash_profile) file, adding the following lines under the heading:
# User specific environment and startup programs:
export LANG=en_US.UTF-8 export TERM=rxvt-unicode
.Xdefaults configuration file
Creating or modifying the .Xdefaults file is the final step in configuring Rxvt-Unicode. Once this file is edited and saved, all subsequent launchings of the Rxvt-Unicode terminal will contain the aforementioned settings.
The .Xdefaults file contains all of the terminal specific settings for Rxvt-Unicode. Xterm settings and other application settings can go in here as well. This .Xdefaults example shows data for urxvt; you can either append this data to an existing .Xdefaults file, or append additional information to this file.
The following settings are very basic, and should be enough to make the terminal functional and visually pleasing. For more settings, please read the urxvt man page or read the "Terminal Configuration" portion the the Rxvt-Unicode FAQ HERE.
Check to see if you already have an ~/.Xdefaults ($HOME/.Xdefaults) file in your home folder. Open it with a text editor if you do; otherwise, open a text editor and create it. To the ~/.Xdefaults file, add the following lines:
URxvt*transparent: true URxvt*tintColor: blue #URxvt*shading:40 URxvt*saveLines:12000 URxvt*foreground:White URxvt*background:Blue URxvt*font: xft:Bitstream Vera Sans Mono:pixelsize=13 #URxvt*font:-*-courier-medium-r-normal-*-*-140-*-*-*-*-iso8859-1 #URxvt*boldFont:-*-courier-bold-r-normal-*-*-140-*-*-*-*-iso8859-1 URxvt*color4: RoyalBlue URxvt*color12: RoyalBlue URxvt*scrollBar:true URxvt*scrollBar_right:false
Both the listing above and below are the same file functionally. The listing below simply has comments added for reference. The listing below can be found as a download-able file HERE
# transparency - true or false (default) URxvt*transparent: true # tint with any color; i.e., blue, red, tomato4, olivedrab2, etc. # a nice listings are at: # http://www.nisrv.com/modules.php?name=Hex_Colors # http://www.htmlgoodies.com/tutorials/colors/article.php/3478921 URxvt*tintColor: blue # shading - 0 to 99 darkens, 101 to 200 lightens. # Don't use with tintColor; use a darker or lighter color instead. #URxvt*shading:40 # scrollback buffer lines - 65535 is max (64 is default) URxvt*saveLines:12000 # font color (default is black) URxvt*foreground:White # background color (prior to tinting) (default is white) URxvt*background:Blue # xft fonts - anti-aliased xft font setup is nice, but can be choppy URxvt*font: xft:Bitstream Vera Sans Mono:pixelsize=13 # traditional fonts - a more traditional font setup in lieu of xft #URxvt*font:-*-courier-medium-r-normal-*-*-140-*-*-*-*-iso8859-1 #URxvt*boldFont:-*-courier-bold-r-normal-*-*-140-*-*-*-*-iso8859-1 # Replace blue folder colors with a lighter shade for clarity. To # set colored folders and files within urxvt, xterm, and aterm, add # the following line to your ~/.bashrc ($HOME/.bashrc) file under # the heading "# User specific aliases and functions": # alias ls="ls -h --color=auto" URxvt*color4: RoyalBlue URxvt*color12: RoyalBlue # scrollbar - true (default) or false URxvt*scrollBar:true # scrollbar position - left=false (default) or right=true URxvt*scrollBar_right:false
- You can't use the colors "white" or "black" as tinting colors; in terms of tinting they equal "none" and you'll get no tint.