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.
1 Answer
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.