There are times when you want to allow visitors to use your (home) computer without fear that they will do some damage. Ubuntu’s guest account is the solution - upon logging in a clean temporary home directory (containing all the user settings) is created for the guest. When the guest logs out, the home directory is deleted and the next session will start with a clean directory. Perfect. Well, almost. The default account settings are not ideal. So how do you customize them?
Ubuntu’s Help Wiki describes the basics of guest sessions and offers a way of customizing Guest account by setting up guest-prefs account. That seems to be a bit cumbersome and if I understand it correctly, it means that Guest’s setings are permanent while you probably do want to discard any setting changes made during a session and you do want next session to start clean again. The Wiki describes that if /etc/guest-session/skel directory exists, it is used as a template for the Guest’s session so the ideal would be to set this directory with all the desired settings. So why not to take a “snapshot” of running Guest’s session and save it into that directory? Somehow the idea appears to be too simple to work. On the other hand, it does seem to work so until somebody explains that it’s just a fallacy, here comes the solution.
1. Download the script
DOWNLOAD the script, open it in your text editor and REVIEW(!!!) what’s inside. You will be running it as root so you really should know what it does.
2. Log in using the Guest account
Switch into the Guest’s account and make all the changes to the account you want.
3. Run the script
Without logging out, switch back to your account and run the script:
$ sudo bash guest2skel.sh