Gentoo Wiki


Desktop environments

Lightweight desktop environments

Window managers

Compositing window managers





Ratpoison is a radically different window manager. Actually, when you get to use it for a while, you notice that the name window manager doesn't quite apply, since you don't run into a single window in the traditional sense. Well then, what is RatPoison? For those who know the terminal utility called Screen, ratpoison is its X counterpart. In RatPoison by default, every application takes up the whole screen. You can switch between screens using key combinations, launch new screens, and, more importantly, split the screen in two frames and run one application in each screen.

For more information about it, you can check RatPoison's homepage.


As always, to install ratpoison you simply need to type the magic words:

emerge ratpoison

Now, the next step is to configure your X server to launch that. If you are using XDM, then you can change your ~/.xinitrc file to read something like the following:

File: ~/.xinitrc
exec ratpoison

However, if you are using GDM (this also works for KDM presently), then you have to create the file /usr/share/xsessions/ratpoison.desktop:

File: /usr/share/xsessions/ratpoison.desktop
[Desktop Entry]
Comment=Minimalistic Window Manager

Note: If it helps with your backup scheme, you can create /etc/X11/dm/Sessions/ratpoison.desktop instead.

Basic Usage

When you first invoke ratpoison, you may be surprised to see, well, nothing but a blank screen. But that is precisely the beauty of it. No menus, no titlebar, no icons, in short nothing. Everything works by using some rather simple keystrokes.

The first thing to note is that every internal ratpoison command starts with Ctrl-t. And if you are going to remember just one keystroke, remember "C-t ?"--the help command, which displays all the other commands that you need to know. To run this use this command, you press 'Ctrl' and 't' together, release them, then press '?' alone.

To launch applications, you can use C-t ! to execute a command. To cycle through the various open windows, you can use C-t n , where n is the index of the screen you want to switch to.

Some Useful Commands (Case-Sensitive):

Ratpoison is highly configurable, and you can remap all keycombinations as you wish. The file .ratpoisonrc in your home directory should contain default settings, which are sourced when ratpoison loads up. Some lines you may wish to add to your .ratpoisonrc:

bind C-f exec firefox

This starts firefox on receiving the keycombination C-f (of course, after a C-t). Use this to make your own binds

definekey top KP_Insert select 0

Saves the C-t keypress.. note the 'top' keyword. This maps the numpad 0 key to directly switch to window 0


Ratpoison with workspaces:

File: ~/.ratpoisonrc

exec /usr/bin/rpws init 6 -k

Where 6 is the number of workspaces.

Basic rpws usage:

and so on (depending on how you have configured rpws).

If you want change bindings for switching between the workspaces you could use xbindkeys

emerge xbindkeys


File: ~/.xbindkeysrc
"rpws 1"
alt + 1

"rpws 2"
alt + 2

and so on (depending on how you have configured rpws).


File: ~/.xinitrc
xbindkeys &
Retrieved from ""

Last modified: Sat, 06 Sep 2008 07:34:00 +0000 Hits: 43,092