-1

I'm trying to set wallpaper from terminal in ubuntu and it's not working, i'm using this command: gsettings set org.gnome.desktop.background picture-uri "file://path_to_file"

Command to get the image is working properly:
gsettings get org.gnome.desktop.background picture-uri

This is my project on github - https://github.com/Vitalya-code/Wallpaper

Also i am ukrainian and i can write with errors

Vitalya
  • 11
  • Are you sure it's not a problem with the way you're running gsettings from Python? Have you tried running the actual command in CLI? – muru Sep 04 '22 at 17:34
  • Perhaps you got the pathname of your file wrong. We cannot tell because you do not tell. – vanadium Sep 04 '22 at 17:54
  • Thanks you for help, there is full command -

    gsettings set org.gnome.desktop.background picture-uri "/home/vitalya/archive/Python/Wallpaper/imgs/General 1920x1200 nature landscape river Jasper National Park mountains Canada.jpg"

    – Vitalya Sep 04 '22 at 18:07
  • @muru I'm trying to do this from the terminal for the first – Vitalya Sep 04 '22 at 18:34
  • Linux paths can't have spaces in them. Remove the spaces from the file name, or use quotations around the file name, or "escape" the spaces. – Nmath Sep 04 '22 at 22:08
  • @Nmath Can you show me an example? This is full command:

    gsettings set org.gnome.desktop.background picture-uri "/home/vitalya/archive/Python/Wallpaper/imgs/General 1920x1200 nature landscape river Jasper National Park mountains Canada.jpg"

    – Vitalya Sep 05 '22 at 05:41
  • @Nmath also i have tried this: gsettings set org.gnome.desktop.background picture-uri "/home/vitalya/archive/Python/Wallpaper/imgs/random.jpg" – Vitalya Sep 05 '22 at 05:50

1 Answers1

1

The solution was very simple:

gsettings set org.gnome.desktop.background picture-uri-dark "file://path_to_file"

Instead of this:

gsettings set org.gnome.desktop.background picture-uri "file://path_to_file"
Vitalya
  • 11