How can I add/remove images from usr/share/backgrounds?

Asked by Steven D. Shown

I am using 10.10 Maverick, and I have downloaded numerous background images and dragged them into the "change appearance/backgrounds" app. However, over time these images disappear for some unknown reason, so I tried to move the images into usr/share/backgrounds, but every time I do that I get an error saying that it could not be done because permission is denied. So when I tried to change the permissions to allow me to do that it said that I could not change permissions because I am not the owner. (this is MY machine!). It shows the owner as being Root. How can I change ownership or otherwise change permissions to allow me to add these files to that folder so that they will not continuously go missing?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu nautilus Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Pablo Hörtner (redtux2000) said :
#1

Although it is YOUR machine, there are some security features so you cannot accidentally break your system. One of them is not working with administrative rights all the time.

The easiest way is copying the files on the console with cp. For this, press ALT+F2 and type x-terminal-emulator.

On the console, you can copy with administrative rights (ie. as user root) by using console. Just type:

sudo cp -v wallpaper.png /usr/share/backgrounds/

If you want to copy a whole directory, type 'cp -vR ~/folder /usr/share/backgrounds/' instead.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#2

Using "sudo" lets you run commands as root. root is the "God" user (superuser) who can do anything. Being an administrator on your system (as you are) consists primarily of being able to run programs as root. See http://en.wikipedia.org/wiki/Root_user for details. If you want more details, see https://help.ubuntu.com/community/RootSudo.

To run graphical programs as root, you can run use gksu (or gksudo) instead of sudo. So if you want to browse through files, copy and move them, edit them, change permissions, and so forth as root, you can open a Nautilus (file manager) window as root by pressing Alt+F2, typing in

gksu nautilus

and pressing enter.

You should be very careful what you do in a root Nautilus window, for the same reason that you should be very careful about what commands you run in the Terminal with sudo. You an do anything, including numerous things that you don't want to do and which could stop your Ubuntu system from functioning. You should also be aware that if you open a file using a root Nautilus window, the application that opens it will run as root, which you often might not want.

These risks can be greatly mitigated by always closing the root Nautilus window when you're done with it, so that you don't mistake it for a regular Nautilus window later.

Can you help with this problem?

Provide an answer of your own, or ask Steven D. Shown for more information if necessary.

To post a message you must log in.