S
S
sl_bug2011-03-22 05:58:22
Gnome
sl_bug, 2011-03-22 05:58:22

Change wallpaper in gnome by krone

There is a script that pulls a random wallpaper from the site and puts it on the desktop using the command

gconftool-2 --set /desktop/gnome/background/picture_filename --type string 'файл.jpg'

If you run the script on your own, then everything is OK - the picture is downloaded, the wallpaper changes. But if you set up launch by cron (under your user), then the picture is downloaded, gconftool is executed, but the wallpaper does not change. To see changes it is necessary to make logout/login. Empirically, it was found out that this is due to the fact that the script is not executed in the current tty (tty7 in my case).

The question is how to make the gnome still understand that the wallpaper in the config has changed and update it?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
shadowalone, 2011-03-22
@shadowalone

try updating background picture display mode
gconftool-2 --set /desktop/gnome/background/picture_options centered --type string

X
Xarakternik, 2011-03-22
@Xarakternik

And there are sets of pictures.
Background work. table. There are packs of pictures. Slides. There are also default ones. put everything you need in there.
My galaxy has been spinning for 3 months and has not yet become boring.

B
bagyr, 2011-03-22
@bagyr

gconftool-2 --unset desktop/gnome/background/picture_filename
gconftool-2 --set /desktop/gnome/background/picture_filename --type string 'file.jpg'

L
LeGaliZe, 2011-03-24
@LeGaliZe

This is because $DISPLAY is not set. Wrap the script in a file, specify the execution of the file in the cron, and set the DISPLAY=:0.0 variable in the script header (well, or whatever you have).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question