Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have setup-ed key based ssh authentication to all my hosts for root user. However, for example if i want to change the background of all the users (not the root user, different user account) how to change it. Is it possible to change the user while running the script? So that i will be able to change the wallpapers of all clients in different user account.

share|improve this question
up vote 3 down vote accepted

It depends on what you want to do exactly. Use sudo to run a command as another user.

sudo -u user_to_run_as command

You can call a script from ~/.bashrc or gnome-session-properties

You can set a default icon set / background for all users in /usr/share/gconf/defaults

The settings (for ubuntu 12.04) are in 16_ubuntu-artwork and 10_libgnome2-common. Syntax is fairly straight forward

/desktop/gnome/background/picture_filename  /usr/share/backgrounds/warty-final-ubuntu.png

Change the path to a new background image

You can also use dconf and gconf from the command line.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.