Is it possible to keep nm-applet running between invocations of WM startup?

Posted by serverninja on Ask Ubuntu See other posts from Ask Ubuntu or by serverninja
Published on 2010-11-24T05:50:11Z Indexed on 2011/02/23 23:33 UTC
Read the original article Hit count: 288

Filed under:
|
|

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?

© Ask Ubuntu or respective owner

Related posts about xorg

Related posts about network-manager