Changing the backdrop
Brian J. Tarricone
bjt23 at cornell.edu
Wed Nov 9 20:46:52 CET 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/9/2005 7:16 AM, Iain Scurrah wrote:
> On Tuesday 08 November 2005 20.34, Brian J. Tarricone wrote:
>
>>On 11/8/2005 12:53 PM, Iain Scurrah wrote:
>>
>>>The only problem is that it never ends. After Exiting Xfce and re-logging
>>>in, either as myself, or as my wife, the script keeps running. I would
>>>have two copies of this script running, my wife has one (and she uses KDE
>>>(although she wouldn't be able to tell you that)).
>>>
>>>Is there anyway I can get Xfce to kill this script on exiting Xfce? Maybe
>>>I could use the session manager to start the (or similar) script when I
>>>login, but it would need to kill it on logout...
>>
>>Hmm, interesting problem. Easiest (though not cleanest) fix would be to
>>modify xfce's xinitrc, and run your script (with an & at the end) from
>>there. It should get killed properly on session quit that way. See the
>>docs for what you need to do to copy and edit xinitrc.
>>
>
> I tried this earlier, changing the /etc/X11/xinit/xinitrc file (which is
> indirectly linked to /etc/X11/xdg/xfce4/xinitrc) to include :
>
> ...
> # Launch xscreensaver (if available), but only as non-root user
> test $UID -gt 0 -a -z "$VNCSESSION" && xscreensaver -no-splash &
>
> # Launch desktop wallpaper changer
> /usr/local/xfce4/backdrop_scripts/change_backdrop.sh &
>
> # Use ssh-agent if installed and not already running. Run it separately
> ...
>
>
> After login, I have these processes running :
> (The tree organization was by ksysguard. Can I do this from the command line?)
>
> 2835 kdm
> 4816 X
> 4819 kdm
> 4840 sh
> 4857 change_backdrop.sh
> 4859 sleep
> 4855 sh
> 4856 xscreensaver
> 4865 xfce4-session
>
> After exitting Xfce, and logging back in :
>
> 4857 change_backdrop.sh
> 4925 sleep
> 2835 kdm
> 4816 X
> 4928 kdm
> 4937 sh
> 4954 change_backdrop.sh
> 4955 sleep
> 4952 sh
> 4953 xscreensaver
> 4961 xfce4-session
>
> And after logging in a third time :
>
> 4857 change_backdrop.sh
> 5011 sleep
> 4954 change_backdrop.sh
> 5013 sleep
> 2835 kdm
> 4816 X
> 5016 kdm
> 5025 sh
> 5042 change_backdrop.sh
> 5043 sleep
> 5040 sh
> 5041 xscreensaver
> 5049 xfce4-session
>
> So running my little script from the xinitrc script doesn't work either... Any
> further other ideas ?
>
> Yes, ~/Desktop/Autostart was emptied before I tried this...
This is pretty bizarre. It sounds like your shell is automatically
starting all child processes in a new session, which is almost certainly
not normal or default behavior.
Try this: *after* the call to xfce4-session, add a line with:
pkill -15 change_backdrop.sh
If the xfce4-session line has 'exec' in front of it, remove the 'exec'.
You shouldn't need to explicitly kill the app, but hopefully this
should take care of it.
On a side note, it's best not to modify the system
/etc/xdg/xfce4/xinitrc. As the docs say, copy that file to
~/.config/xfce4/ and edit it there. However, it seems like your distro
packagers have done something weird with our init scripts, so that may
not work properly. They should just be running 'startxfce4', not the
xinitrc file directly.
-brian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
iD8DBQFDclIs6XyW6VEeAnsRAifxAJ9O1EHf2OwRHNDEWg4bBiURyxwiRgCfdDGW
qkgri6j2UYpO7V0Gjv/eYyI=
=ykmU
-----END PGP SIGNATURE-----
More information about the Xfce
mailing list