On 04/09/2012 10:51 PM, Johann Haarhoff wrote:
> Plug in external monitor, wmaker restarts as expected, but it re-runs
> everything in ~/GNUstep/Library/WindowMaker/autostart . So after a few
> plug/unplug cycles, I have multiple copies of nm-applet etc. running.
>
> I can't really figure out how to work around this, except maybe adding
> "--no-autolaunch" to the restarted copy. (See main.cpp:694), and then
> making execInitScript() check for the flag (see main.cpp:567). I can
> code this patch if it is the "right way", but maybe there is a better way?
>
Start nm-applet, or any other application you don't want to have
multiple copies running at the same time, with a construct like this:
if [ "$(/bin/ps -ef | grep $USER | grep -c [n]m-applet)" = "0" ]
then
[ -x /usr/bin/nm-applet ] && /usr/bin/m-applet &
fi
This way nm-applet is only started once, if it is not already running.
It may be a primitive approach, but it works.
I would even suggest to have a closer look at the AutoStart folder
mechanism which i created for the "Window Maker Live" project, and which
is available separately from here:
http://sourceforge.net/projects/wmlive/files/wmlive-wmaker-env_20120308.tar.gz
The build tree archive for wmlive contains an even more up to date
version:
http://sourceforge.net/projects/wmlive/files/wmlive_2012-04-01/wmlive-config_2012-04-01.tar.gz
Best regards,
Paul
--
Paul Seelig <[email protected]>
http://wmlive.sourceforge.net
--
To unsubscribe, send mail to [email protected].