2

I just set up a virtual machine for our software developers an now try to create the user accounts facing the following question:

Is there any possibility to distribute predefined desktop profiles with a certain software/ui configuration? I recently used Sabayon for Gnome on another machine but it is not supported anymore.

I'm interested in a solution either for Gnome or XFCE on the latest Ubuntu 12.04.

Thanks for your replies.

Linuxios
  • 133
  • 7
lug
  • 41
  • 1
  • 8
  • How about a simple list of packages that you automatically `apt-get` on each machine. Tow along some GNOME config fies for the ride, stuff it into a zip with a custom shell script, and bingo! – Linuxios Jul 12 '12 at 15:00
  • it's just one machine with multiple users i'll try to find out more about custom shell scripts :) – lug Jul 12 '12 at 15:09
  • In that case, all of the apps will be shared anyway. As for settings, again, you should just be able to use some config-file copying. – Linuxios Jul 12 '12 at 15:11
  • with the information from http://serverfault.com/questions/407420/placeholder-for-later-username-in-etc-skel I managed to build my custom adduser.local to customize adduser to my needs – lug Jul 13 '12 at 13:00
  • Good. If that solved your problem, you want to answer your question so people know it's solved and can benefit from your experience. – Linuxios Jul 13 '12 at 13:58

1 Answers1

2

The following steps solved my problems:

  1. Created a default user and set everything up the way I wanted to. Configured bookmarks in my browser, added the local Jabber account, Shortcuts, Panels etc.

  2. Copied the config folders and files like e.g. ~/.mozilla for firefox or ~/.purple for pidgin and the ~/.config/xfce4 directory for the XFCE setup into /etc/skel/ where all files are located that will be copied to a new user's home directory.

  3. Replaced every time the username of my default user occured in the copied config files with ##USERNAME_REPLACE##

  4. Created /usr/local/sbin/adduser.local what is automatically executed when "adduser" is called.

  5. Wrote some substitution bash scripts that replace ##USERNAME_REPLACE## with the name of the newly created user. (Parameter $1 when adduser.local ist called by adduser.)

  6. Because I use apache2-mpm-itk I need to add a vhost to the webserver configuration and one subdomain (username.localhost) per user to the /etc/hosts. Therefore I wrote a bash script that does the trick.

  7. Finally after I set up the whole automation scripts they had to be called from adduser.local with the username (Parameter $1) of newly created users.

Everytime I call e.g. "adduser test_user" adduser.local is executed and does a wonderful setup so I can relax until everything is in place. Important for me was, that adduser.local does not have to be a pearl script like the example files found on the system.

Hope it helps some others though.

lug
  • 41
  • 1
  • 8