Wednesday·18·June·2008
How to get Network Manager working with ratpoison //at 23:53 //by abe
Using GNOME Network Manager is a neat way to connect to wireless or virtual private networks from a laptop running Debian Lenny, Sid, Etch with Backports or any of the *buntu distributions. You can control everything from the system tray. But not all window managers have a system tray. And with some window managers it’s not obvious how to make them work with one of those lean third party trays and panels.
Especially my favourite window manager for small displays as on the EeePC – ratpoison – insolently puts any panel or tray in the middle of the screen by default. It took me a moment to find out how to make ratpoison work with my favourite third party system tray trayer (which can handle transparency and is only a system tray, no taskbar).
First we need to make ratpoison ignore the trayer on the one hand and and reserve space for it on the screen. Fiddling around with preconfigured frames didn’t work well and the following way is also more straight forward:
- trayer always has “panel” as window title, so adding the
following line to your
.ratpoisonrc
makes ratpoison ignore trayer:unmanage panel
- Now all windows overlap the trayer, so we need to configure the
space for it. Trayer in the default configuration shows up at the
bottom and has a height of 26 pixels, so we tell ratpoison to add a
padding of 26 pixels at the bottom of the screen by adding the
following line to the
.ratpoisonrc
:set padding 0 0 0 26
Now we are confronted with the problem that these settings only apply
to new windows, not ones which were already running when ratpoison
starts. I usually start my X session using an .xinitrc
or an .Xsession
which calls the window manager using
exec
at the end.
We can start the trayer later though by spawning a subshell in the
background with a sleep
at the beginning. Also the
Network Manager applet (nm-applet) can be started that way. In my case
the end of the .Xsession
looks like
this:
( sleep 1; \ trayer --align right --edge bottom --distance 0 \ --expand true \ --transparent true --alpha 128 --tint 0 \ --SetDockType true --SetPartialStrut true & nm-applet & ) & exec ratpoison
The result could look like this:
The other programs in the system tray are from right to left: nm-applet (GNOME Network Manager), Twitux (GTK Twitter Client), Audacious, Opera, Pidgin (formerly known as GAIM), Icedove (unbranded Mozilla Thunderbird). The clock on the bottom left is from the package osdclock.
Oh, and although I’m fine with trayer: if anybody knows a possibility to control the GNOME Network Manager without the need for a system tray, I would be very happy if you could tell me. :-)
Update 18-June-2008 23:45:
Matto Fransen used my
howto to get ratpoison and
nm-applet working together on Ubuntu. He also explains in his blog
post, what may be necessary to get nm-applet working as intended in
the first place — things I already had forgotten when I wrote
this posting initally. :-)
Tagged as: .xinitrc, .Xsession, Debian, EeePC, Etch, GNOME, GNOME Network Manager, Lenny, nemo, ratpoison, Sid, system tray, trayer, Ubuntu
// show without comments // write a comment