Author Topic: [SOLVED]Changing desktop wallpaper from command line.  (Read 1167 times)

Offline s4w3d0ff

  • Member
  • ***
  • Posts: 58
  • Karma: 6
  • Spray and Pray
    • View Profile
    • Github
  • Peppermint version(s): Peppermint 7even 64bit UEFI
[SOLVED]Changing desktop wallpaper from command line.
« on: August 21, 2016, 10:38:38 am »
Hey folks,

I have been trying to get xplanet to work on Peppermint 6. I successfully installed xplanet and can generate/save an image but I can't seem to figure out how to automatically change the lxde background. The FAQ has instructions for gnome and kde. Google seems to not be much help. Is there a way to update/refresh the lxde wall paper from the command line? Everywhere I look the solution has been to use pacmanfm, but Peppermint does not have it installed and I don't feel like I should have to.  :D
« Last Edit: August 22, 2016, 01:44:33 pm by s4w3d0ff »
Linuxize IT!
BTC: 15D8VaZco22GTLVrFMAehXyif6EGf8GMYV

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Changing desktop wallpaper from command line.
« Reply #1 on: August 21, 2016, 10:48:53 am »
Code: [Select]
gsettings set org.gnome.desktop.background picture-uri "/path/to/image.jpg.png"or if you're trying to put together a random autochanger .. see here:
https://forum.peppermintos.com/index.php/topic,1868.0.html
or you could simply install variety from here
https://launchpad.net/~peppermintos/+archive/ubuntu/p6-test/+files/variety_0.5.5+peppermint_all.deb
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline s4w3d0ff

  • Member
  • ***
  • Posts: 58
  • Karma: 6
  • Spray and Pray
    • View Profile
    • Github
  • Peppermint version(s): Peppermint 7even 64bit UEFI
Re: Changing desktop wallpaper from command line.
« Reply #2 on: August 21, 2016, 01:54:32 pm »
Ok tried what you mentioned (which is what was suggested in the xplanet FAQ but i figured that since gnome-session wasn't installed, it wouldn't work...) but it reset the wallpaper to the peppermint 6 default image (pretty sure i have the correct full path to the image).

The way i understand it xplanet should generate/change the background image automatically, but when i run it doesn't do much. When I run the command:

Code: [Select]
xplanet -body earth -num_times 1 -output /media/s4w3d0ff/InnerSpace/Wallpapers/xplanet.1824x1026.png
It will generate and save the image like it is supposed to, so I figured if I can change the wallpaper via the command line, i can just write a quick script that runs with conky or have it autostart.

Thanks for the help!
« Last Edit: August 21, 2016, 02:04:15 pm by s4w3d0ff »
Linuxize IT!
BTC: 15D8VaZco22GTLVrFMAehXyif6EGf8GMYV

Offline s4w3d0ff

  • Member
  • ***
  • Posts: 58
  • Karma: 6
  • Spray and Pray
    • View Profile
    • Github
  • Peppermint version(s): Peppermint 7even 64bit UEFI
Re: Changing desktop wallpaper from command line.
« Reply #3 on: August 21, 2016, 01:59:42 pm »
I also tried:

Code: [Select]
gconftool -t str -s /desktop/gnome/background/picture_filename "/media/s4w3d0ff/InnerSpace/Wallpapers/xplanet.1824x1026.png"
but nothing
Linuxize IT!
BTC: 15D8VaZco22GTLVrFMAehXyif6EGf8GMYV

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Changing desktop wallpaper from command line.
« Reply #4 on: August 21, 2016, 08:02:22 pm »
My mistake, the command should be
Code: [Select]
gsettings set org.gnome.desktop.background picture-uri "file:///path/to/image"as in
Code: [Select]
gsettings set org.gnome.desktop.background picture-uri "file:///usr/share/peppermint/wallpapers/Peppermint.jpg"or
Code: [Select]
gsettings set org.gnome.desktop.background picture-uri "file:///usr/share/peppermint/wallpapers/PeppermintCold.jpg"
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline s4w3d0ff

  • Member
  • ***
  • Posts: 58
  • Karma: 6
  • Spray and Pray
    • View Profile
    • Github
  • Peppermint version(s): Peppermint 7even 64bit UEFI
Re: Changing desktop wallpaper from command line.
« Reply #5 on: August 22, 2016, 01:43:57 pm »
ahhh yes..... a uri ::) that did it!

Thanks a bunch!
Linuxize IT!
BTC: 15D8VaZco22GTLVrFMAehXyif6EGf8GMYV

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: [SOLVED]Changing desktop wallpaper from command line.
« Reply #6 on: August 22, 2016, 05:07:32 pm »
You're more than welcome .. thanks for marking the topic (SOLVED) :)
(sorry about the earlier omission)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec