23
Mar
11

The ratpoison tutorial part 1

Setting it up

It seems that ratpoison development has slowed down recently. However, it’s simplicity and robustness guarantee that it’s gonna stick around for quite a while. Trying out ratpoison won’t most probably require any changes to your configuration, for in Linux you can switch WM’s like socks. So let’s get started; no time Toulouse!

Fairly recent ratpoison packages can be found in most official repositories; on Debian/Ubuntu type

sudo apt-get install ratpoison

Next, create a file for GDM pointing to ratpoison under

/usr/share/xsessions/ratpoison.desktop

with content

[Desktop Entry]
  Name=Ratpoison
  Comment=This session logs you into Ratpoison
  Exec=/usr/bin/ratpoison
  TryExec=/usr/bin/ratpoison
  Icon=
  Type=Application
  X-Ubuntu-Gettext-Domain=ratpoison-session

And we’re done. Simple as that! You may also disable the autologin feature, if you set it before. Next time you see gdm login screen go to ‘Session’ and check ratpoison.

First steps

Don’t panic, it’s all gonna be fine. Press C-t (ctrl and ‘t’ simultaneously or the ‘t’ while holding ctrl) and watch your mouse pointer. It should have changed it’s shape to something squerish-like. Now ratpoison is waiting for your command. If you press ‘c’, you’re gonna fire up a new terminal session and the pointer will change it’s shape back to default.

(if C-t isn’t working you may try C-a)

The C-t combination is, what I believe, called the escape sequence. Every command has to be followed by it, and it’s damn uncomfortable to use C-t.

Hit ‘C-t :’. Have you noticed a little box in the upper-right corner of the screen? This is where you type ratpoison command (right after ratpoison command prompt ‘:’). Try

:escape C-z

You’ve just changed your escape sequence to C-z (and saved yourself some finger stretching). Though you can change it to anything you like, we’re gonna keep calling it ‘C-t’ just for convenience.

Now I’ll try to cover some fundamental functionalities of typical WM’s and how to achieve them in ratpoison. This part is gonna differ from other ratpoison tutorials, as they show you how to do certain stuff but make you find out the rest on your own. Do not worry, the Crow is here:)

How can I run an application?

The easiest way would be to type it by hand, you can bring up the exec box (which works like the alt+f2 combo) with

C-t !

Type the name of the app in the box and press enter.

How can I access my files?

You are still allowed to use your fav file manager. Just exec it with ‘C-t !’. So, for the default gnome manager you would use the command

/bin/sh -c nautilus –no-desktop

though personally I would use something lighter, i.e. thunar.

How can I move between open windows?

To list open windows use ‘C-t w’.

As you can see, every window has a unique number assigned. You can access that window (say, window 2) with ‘C-t 2’. Other usefull combinations are:

C-t n – (n)ext window
C-t p – (p)revious window
C-t C-t – switch back and forth between current and last window (ultra useful!)

How can I access my apps menu?

There’s a very decent menu out there, but that’s a lil bit beyond the scope of this tutorial.

How can I access my system settings?

Well, as you know, almost everything can be set up using the command line. If you really need some graphical frontend (which came with gnome, xfce or whatever) you can just type it’s name like ‘gnome-screensaver-preferences’. Because administrative tasks are usually seldom, my advice would be to log in with gnome, apply your settings and go back to ratpoison.

What’s the $*&(#*@ time?

Yup, you should have noticed by now that no taskbar means no clock. Fear not.

C-t a – display the current date and time

I’ve had enough. Get me out of here.

Ok, you can logout back to the login screen. Again, bring up a command box with ‘C-t :’ and enter

:quit

At the login screen you can switch back to gnome by clicking on ‘session’.

If that somehow didn’t work for you, you can just shutdown by pressing the power button, or by entering

sudo halt

either in a terminal window, or in the ‘C-t ! box.

How do I close a window? There is no ‘x’ in the upper right corner. Not even in the left one!

Well, in most GUIs you can just click File->Exit or File->Close. What? Did you just say ‘click’? Well, usually `ctrl+w`, `ctrl+q` or `ctrl+shift+q` is the shortcut for closing (and for your common apps you’ll memorize them very fast, just to keep your hands on the keyboard). For terminal windows `exit` typed directly as a shell command or `ctrl+d` should do.

There’s also a very handy shortcut (from ):

C-t k – Send a DestroyClient event to the current window. This will terminate the application without question.

Technically, you can use it for killing ‘lighter’ apps; some of them will report crash, others won’t notice (I hate it that chrome doesn’t offer to restore the tabs after doing this the same way it would after a crash).

Well, if you’ve got this far I highly recommend going over the 2nd part of the tutorial – where real magic begins.

Advertisement

11 Responses to “The ratpoison tutorial part 1”


  1. 1 Seba
    January 11, 2013 at 3:11 am

    “What’s the $*&(#*@ time?”
    😀

  2. 4 Vaskozl
    May 11, 2013 at 7:38 pm

    Ah, I just found out about ratpoison today and it’s wonderfull! It’s exactly what I’ve always dreamed about: A fast and fully operateable windows manager without the darn mouse. There are things that will stay forever 🙂

  3. September 15, 2013 at 2:01 pm

    I agree, where is the second part =D

  4. 6 Dasa
    October 4, 2013 at 2:16 pm

    I use ratpoison now for some time and made it to my windows manager.
    I trayed to switch back to Gui Desktop but just like ratpoison to much.

  5. 7 schillingklaus
    July 20, 2016 at 6:03 pm

    I don’t need no filthy gdm. Just start X11 from teh commandline, and make the last line of .xinitrc

    exec /usr/bin/ratpoison

  6. November 1, 2018 at 12:28 am

    I’m impressed, I have to admit. Rarely do I come across
    a blog that’s equally educative and engaging, and let
    me tell you, you’ve hit the nail on the head.

    The problem is something not enough folks are speaking intelligently about.
    I am very happy I came across this during my hunt for something regarding this.

  7. November 17, 2018 at 2:03 pm

    Qualidade conteúԀo é ο importante para convidar o pessoas parа
    visite o local , é disso qᥙe site está fornecendo.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


March 2011
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  

%d bloggers like this: