Desktop Backgrounds
Benedikt Meurer
benedikt.meurer at echobase.homeunix.net
Fri Jan 9 21:22:48 CET 2004
Jeremy Turner wrote:
> Hi all,
Hey Jeremy,
> Anyway, I have googled and tried to look at this lists' archive with not
> much luck, but I'm trying to find out how to programmatically change the
> XFCE 4 desktop background. The only thing I could find in the
> documentation is to use the Settings box, and that XFCE 4 conforms to
> the XDesktop (or something) standard.
>
> What I'm doing is I have a script that calls xplanet and then generates
> a new desktop background every 30 minutes and then sets the new
> background. In Gnome, I called gconfd and set a registry value. I
> tried a xsetbg command, but that didn't seem to have any effect in XFCE
> 4.
>
> Any ideas?
Here an quick-and-dirty one:
Say for example you use ~/bg.jpg for the background in the xfdesktop
configuration. Now your script should look like this:
#!/bin/sh
# (remember to set DISPLAY if this is run from cron or similar services)
#
# Copy the new wallpaper (generated prior to this in ~/new.jpg)
cp ~/new.jpg ~/bg.jpg
# Notify xfdesktop to reload wallpaper
pkill -USR1 xfdesktop
That should do the job. (You may need to use killall instead of pkill if your
system lacks the pkill command).
> Jeremy
Benedikt
--
NetBSD Operating system: http://www.NetBSD.org/
pkgsrc "Work in progress": http://pkgsrc-wip.sf.net/
XFce desktop environment: http://www.xfce.org/
German Unix-AG Association: http://www.unix-ag.org/
os-network: http://www.os-network.de/
OpenPGP Key: http://www.home.unix-ag.org/bmeurer/#gpg
More information about the Xfce
mailing list