OBJECTIVE: Set up a customized guest account using Ubuntu MATE that will present the user with specified options, theme, tweaks as well as a folder/file location set by the administration. This guest account will self-destruct and reset normally upon log-out or computer restart.
APPLICATION(S): Personalized psuedo-kiosk mode for internal/external users who require accessibility to certain documents and/or files, in this case, documents and training videos from Human Resources.
These PC's are running Ubuntu MATE 15.04, all imaged with Clonezilla.
STEP 1: Install Ubuntu MATE 15.04.
STEP 2: Log into the root admin account.
STEP 3: Installed software updates immediately. We also ran sudo apt-get update and sudo apt-get upgrade.
STEP 4: Create a special user account called "guest-prefs" (without the quotation marks) per https://help.ubuntu.com/community/CustomizeGuestSession#Special_purpose_user. For convenience we chose not to use the password to login while settings were tweaked. The password will be utilized once finished. Steps 1-3 on the help page are valid, but do not continue with Step 3 on the help page until after my step 5, shown below. Switch user from root admin account into the newly created guest-prefs account.
STEP 5: Customize EVERYTHING for the special guest account. You will only have a single chance to complete the customization without some headache.
For our use case we tweaked the appearance settings and theme so it looked similar to a Windows machine (yeah, sorta gross). This included changing colors, window border, dark icons, simple color background (default MATE blue) and other various aethestics from within the Appearance GUI control panel. Of course moved the panel to the bottom of the screen, combined the default two into one and made it 32px tall. Firefox was left as is on the taskbar but made sure to install Ublock Origin and Disable Hello, Pocket & Reader+ 0.4.2. I also checked the "Do Not Track" options and start private browsing by default.
We were requested to remove everything from the desktop (no default icons) so we used MATE Tweak to easily remove them. We left the standard MATE triple taskbar menu untouched. Saved theme.
Transmission was removed since users had no business downloading/sharing torrents in the corporate environment per http://askubuntu.com/questions/309916/removing-transmission-bit-torrent-client with sudo apt-get purge transmission-gtk. We removed Rhythmbox in favor of setting VLC as the default multi-media player: sudo apt-get remove Rhythmbox as is our standard set-up procedure.
A big deal for us Americans is to change the clock settings to 12 hour, include local weather and install Redshift for a 3rd [night] shift of employees per http://www.omgubuntu.co.uk/2010/05/alleviate-tired-eyes-in-ubuntu-with-redshift/. It can also be installed via Ubuntu Software Center, redshift-gtk is the GUI. We made sure to add this in MATE's Startup Applications settings.
The last thing to do is to switch user again, back to the root admin account. Its really important to switch rather than log out at this step!
STEP 6: Perform Ubuntu help page's steps 2-3 that includes: sudo mkdir /etc/guest-session and sudo ln -s /home/guest-prefs /etc/guest-session/skel.
STEP 7: Go to /etc/guest-session/skel. This symbolic link will be broken. One must actually create the directory it points to. Simply look at the properties and create the folder with mkdir command pointing to the guestprefs.
STEP 8: Go to /home/guest-prefs/ and copy EVERYTHING in this folder including ANY hidden files. These are the configuration files that the standard guest account will utilize. The image below shows the two directories (opened with sudo caja).
A comparison of the guest-prefs and guestprefs folder structure.
STEP 9: Paste all the guest-prefs home folder contents into the /etcguest-session/skel/guestsession folder. Notice this folder is NOT guest-prefs but guestprefs (the guest account that gets destroyed with every login).
STEP 10: Switch user to guest account (it should be identical to the guest-prefs you just left in Step 5.
STEP 11: Switch back to the root admin account.
STEP 12: From root admin account, open the guestprefs home folder and enter the Desktop folder: /home/guestprefs/Desktop and create a directory there named HR Docs. Hint: If you're not familiar with how to get spaces in the command line, just name the folder "whatever_with_underscores" without the quotes, to make things easier. Example\ /word with the tab button will automatically jump spaces in folder names in the terminal.
STEP 13: Add all files you want guests to have if any.
STEP 14: HR Docs folder and files are to be given modified rights so guests can access them. I applied 777 to the folder with sudo chmod 777 -R /home/guestsession/Desktop/HR/ \Docs/* and then went back under right-click properties under the Others section and marked Read.
This step takes some practice...the differences between guest-prefs and guestprefs are a little confusing per Ubuntu help pages. We realized that if we logged out of the initial guest-prefs session I couldn't change anything (like the 12 hour clock format).
As a check, switch user into the guest account to see if you can open and view the files in that special HR Docs desktop folder. You should be able to delete, move, copy, etc all of its contents. Logout and log in again into a new guest session. The folder will be restored along with all the files and the theme etc will still match the guest-prefs user settings. Remember, the owner of the special shared folder should always be root using sudo chown root:root -R /home/guestprefs/Desktop/HR/ \Docs.
STEP 15: Log out of the guest session (back to LightDM greeter). Log back into the root admin account.
The root admin accounts; intentially made to look very Ubuntu "Unity-like" for the other IT employees.
Create a launcher on the desktop that points to /etc/home/guestprefs/Desktop/HR/ \Docs/ with sudo caja /etc/home/guestprefs/Desktop/HR/ \Docs/ and name the launcher HR Docs Open as Admin (a note to the fellow IT guys). This gives the administrators an easy way to pop in a USB stick with new content from the HR Department , drop them into the folder for the guest sessions used by other employees. One would of course need to make sure the permissions for any new files are correct, repeat Step 14.
Note, it can be confusing/frustrating to log back into the guest account and not see the new files (our experience the first time). Make sure the permission are correct for any new files. If those are ok, and you still can't see the file changes the guest-prefs and guestprefs in the launcher might be incorrectly reversed (that dang hyphen!) or the new file(s) are in the wrong place.
STEP 16: Set the guest user account to automatically login per askubuntu.com/questions/95405/how-to-enable-guest-account-automatic-login#answer-465872 with sudo pico /etc/lightdm/lightdm.conf. This is in the section labeled "For Ubuntu 14.10 this is what worked for me:" answered by JumpingJuniper Feb 2 at 4:38. The other techniques on that ask Ubuntu page didn't work for me.
STEP 17: While in the root admin account, visit Administration > Users and Groups and set the guest-prefs account to match the admin account or whatever you prefer. At this point one could actually delete the account but I left it in case we wanted to further tweak any of the standard guest settings that might require a config file (like from the hidden .mozilla folder for example).
STEP 18: Hiding the root account was preferred, as well as the guest-prefs account from the LightDM greeter but this isn't quite required since the guest account auto-logins. Note: There are conflicting instructions on how to do this. One is from http://askubuntu.com/questions/92349/how-do-i-hide-a-particular-user-from-the-lightdm-login-screen using AccountsService but also using the /etc/lightdm/lightdm.conf file with [SeatDefaults] and also using the users.conf file and adding the usernames to the hidden-users=nobody nobody4 noaccess line. The latter doesn't work when switching users from guest back to LightDM however, it did work for using AccountsService method on at least one machine.
Since the guest auto logins, we didn't care to sort this out (there's also a bug report out on this at https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/857651 but its pretty dated, specifically from Ubuntu 11.10...
The final result: A customized temporary guest session with shared docs folder, auto-login from PC power on/start-up. Intentionally themed to look and feel like "some sort of Windows machine" (but infinitely better obviously).
If your business would like assistance on setting this up in your office, kiosk or virtualized platform, send us a message; we'd love to help!