Desktop Backgrounds
Jack Coates
jack at monkeynoodle.org
Fri Jan 9 21:25:23 CET 2004
On Fri, 2004-01-09 at 12:22, Benedikt Meurer wrote:
> 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
killall is a dangerous habit, see if your system has pidof first and
then use kill `pidof myapp`
--
Jack at Monkeynoodle Dot Org: It's A Scientific Venture...
**********************************************************************
*"Just like the queen of the trailer park, sometimes she's the queen *
*of the water of the river." *
*-- (I Was Born In A) Laundromat from Key Lime Pie by Camper Van *
*Beethoven *
**********************************************************************
More information about the Xfce
mailing list