change background via command line
Does anyone know if there's a command which will change the background image? I ask because I'm fetching an image from a webpage and would then like to apply it as my wallpaper.
gdm Thanks |
wmsetbg works with XPM, PNG, jpeg, Tiff and PPM graphics. You will need to set this command in your login script if it is to work every time you log out and back in.
If you want a single command that will set your background permanently, then this depends on your window manager and/or desktop environment. |
display -window root pic.jpg
(works with every image format that image magick supports). For KDE and gnome this might not work. KDE: dcop kdesktop KBackgroundIface setWallpaper /path/to/pic.jpg N N can be any number from 1-6 resulting in centered, tiled, center tiled, scaled centered (keep aspect), scaled tiled (keep aspect), scaled and centered (auto fit) Don't know about gnome. |
display -window root pic.jpg doesn't work for Gnome, but I appreciate your suggestion.
I'm looking at the display manpage. *The command you've mentioned applies an image to a window, which isn't what I want. I want to make the image my desktop background. |
Quote:
edit: Quote:
anyways, found it through google :p gconftool-2 --type string --set /desktop/gnome/background/picture_filename /path/to/image.jpg |
Hmm, unfortunately this command doesn't seem to be working either.
*gconftool-2 --get filedir returns different values depending on the image I select using the command you've given me, but it is apparently not actually making the image the background. Nevermind, it works just fine. I wasn't using /desktop/gnome/background/picture_filename but was instead specifying my own path. Thank you very much. |
Well, probably the easiest way may be to have whatever program your using to fetch the background image to rename it to the current background image name... You will have to refresh your DT though...
KC |
How do you refresh the desktop? If I knew how to do that, I'd be set.
|
Well, I use KDE and if I right click on the DT I can refresh... Not sure what the command line argument would be for it... Someone must know, however....
KC |
I have resolved the conflict.
Thanks for everyone's help. |
Care to share?
Could you share the results of your search so that others could benefit?
|
All times are GMT -5. The time now is 06:33 PM. |