6

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]
Encoding=UTF-8
Name=XMonad
Comment=Lightweight tiling window manager
Exec=/usr/local/bin/xmonad.start
Icon=xmonad.png
Type=XSession

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

#!/bin/bash

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 &
fi

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

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

/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?

2
  • 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

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)

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .