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?
Asked
Active
Viewed 1.8k times
2 Answers
8
You can set the Raspberry Pi desktop background with this command under Pixel (lightdm) Desktop Manager:
pcmanfm --set-wallpaper="/your/background/file"
Darth Vader
- 4,206
- 24
- 45
- 69
Cédric Bellec
- 81
- 1
- 2
1
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.
Phil B.
- 5,043
- 15
- 30
-
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 01: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
sudo su piand then run it. pcmanfm somehow remembers the original user and fails to detect it's already running.env DISPLAY=:0.0 pcmanfm -w '/home/pi/Pictures/wallpaper.jpg'– Ray Foss Oct 18 '19 at 19:40