when I move a photo to /usr/share/backgrounds/ with terminal it becomes unreadable non root user

I want my desktop background to also be the background for the greeter so I type this into terminal

 sudo cp /home/luke/Pictures/Wallpapers/starfish.jpg /usr/share/backgrounds/

the copy works fine, however when I go to backgrounds the thumbnail is a question mark and the photo cannot be opened nor set as the background.

To troubleshoot I typed in

gksudo nautilus /usr/share/backgrounds/

and voilà, the photo has the correct thumbnail, and is able to be opened with a double click.

How do I get this problem to go away? I copied the exact same wallpaper to the exact same directory on my laptop and set it as my wallpaper (and greeter background) with no problems. Why won't it work on my desktop?


Solution 1:

It seems you do not have the privileges to open that file. https://en.wikipedia.org/wiki/Chmod#Command_line_examples

 chmod 777 /usr/share/backgrounds/starfish.jpg

oh... you probably need to run it as sudo.