I am using nm-applet to interface with NetworkManager, running xmonad as a window manager. My X sessions (including nm-applet) are set up with a /usr/local/bin/xmonad.start script.

My question is, how can I keep nm-applet running in the background as long as X is running, but not necessarily xmonad? As mentioned above, it is being started with xmonad (and dying with it when xmonad is restarted, etc).

I am using gdm to manage my X sessions, and I'm running 10.10. Where's a good place to start nm-applet to suit my particular needs? I need to remove it from the control of xmonad, but don't know where to start it otherwise.

Any help, tips, etc appreciated.

Edit: problem seems to be with how I have integrated xmonad. I have the session script as a file in /usr/share/xsessions/xmonad.desktop with the following contents:

[Desktop Entry]
Comment=Lightweight tiling window manager

/usr/local/bin/xmonad.start contains the following:


xrdb -merge ~/.Xresources
xcompmgr -c &

trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 8 --heighttype pixel --height 18 --transparent true --alpha 0 --tint 0x000000 &

gnome-settings-daemon &
gnome-screensaver &

if [ -x /usr/bin/nm-applet ] ; then
    nm-applet --sm-disable &

/usr/bin/urxvtd -q -o -f &
eval `ssh-agent` &

if [ -x /usr/bin/gnome-power-manager ] ; then
    sleep 1
    gnome-power-manager &

/usr/bin/gnome-volume-control-applet &
exec xmonad

The question is how do I integrate xmonad, gdm, X, etc in such a manner to replicate the behavior I currently have except with nm-applet (and possibly other programs) running whether or not xmonad is?

  • If I understand your question correctly, what you might want to investigate is just replacing the current WM with the desired one. Some WMs honor --replace, but often you can just kill the current one and manually invoke the desired one. In such a fashion you don't need to worry about losing NM since you're still in the same session (NM is tied to your user session). Nov 24, 2010 at 11:46
  • Yes, but in this case, xmonad is the entire desktop environment, as it were, not just the window manager. Also, while there is a way to recompile and restart xmonad without exiting, sometimes windowing artifacts make me have to 'forcibly' restart the WM by quitting and starting a new session. Nov 25, 2010 at 18:46

1 Answer 1


I always thought that if you put that information in your ~/.xsession then you do not get that problem, that way you start nm-applet before xMonad. I know that my nm-applet does not seem to restart when I restart xMonad. (I can paste my startup script here later if you want to take a look)

  • Please have a look at my edited question. Nov 25, 2010 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.