I'm connected through SSH. In other words, I have no mouse nor keyboard connected to the unit. How do I change the wallpaper from the terminal?

You can set the Raspberry Pi desktop background with this command under Pixel (lightdm) Desktop Manager:

pcmanfm --set-wallpaper="/your/background/file"

From http://lxlinux.com (section 5 on the page):

 In a traditional set-up wallpaper can be changed by terminal launching a wallpaper GUI: 

   pcmanfm --desktop-pref,

or by directly editing the .conf files in ~/.config/pcmanfm/LXDE/. The default wallpaper folders depend upon the distribution and are generally /usr/share/backgrounds or /usr/share/lxde/wallpapers.

Sounds like you need to look at the .conf files in the ~/.config/pcmanfm/LXDE/ folder.

  • Thank you. There are backgrounds in those folders indeed, but none of them is the one I see. So now I'm confused about where my wallpaper might be located. – Paolo Vacirca Apr 24 '15 at 21:41
  • Have you checked the .conf files for references to wallpaper settings? the other folders are just the location of default wallpapers available on the system. I don't have my rPi available to check, but on Lubuntu (also using LXDE) I can find the background setting in ~/.config/lxpanel/Lubuntu/panels/panel under the "Global {..}" section (it's called "Backgroundfile"). – Phil B. Apr 25 '15 at 1:14
  • backgroundfile doesn't seem to be the right thing. Points to a totally different file but not what I've set as beackground – Thomas Weller Aug 29 '16 at 20:21

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.