Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.