Setting file permissions (image for wallpaper use)

I have a dual boot Win7 & Ubuntu 16.04 set up. I'm struggling with setting the wallpaper on Ubuntu. I have copied a .jpg image from the Windows drive into my Ubuntu pictures folder, and when I select it as wallpaper it works fine, but on reboot it's gone.

I have done some research, it appears I should change file permissions to 'execute', this is what I've tried, and the errors I got back:

$ sudo chmod +x /home/showtown/pictures/DSC04787.jpg
[sudo] password for showtown:
chmod: cannot access '/home/showtown/pictures/DSC04787.jpg': No such file or directory

$ sudo chmod +x /DSC04787.jpg
chmod: cannot access '/DSC04787.jpg': No such file or directory

Am I missing something with syntax? I have used the full file path and just the file name.


Solution 1:

Paths on Linux are case sensitive. This means that Foo is not the same as foo. The "pictures" directory is actually called Pictures, not pictures so that's why your first command failed. The second failed because you told it to look for a file called DSC04787.jpg in the root directory (/).

Also, there is absolutely no reason to use sudo here. The file should be owned by your regular user so that user should be able to change the permissions. So, the command you were looking for was:

chmod +x /home/showtown/Pictures/DSC04787.jpg

However, there is absolutely no reason to make that image executable. Please post a new question explaining i) what desktop environment you use (this is called "Unity" if you are using the default Ubuntu); ii) exactly how you set the wallpaper (using what tool, clicking where, selecting what etc).

I see no reason why it shouldn't survive a reboot but setting the image to executable will not solve it.