"Demo Mode" for OEMs
@smspillaz
Submitted by Sam Spilsbury Link to original bug (#786090)
Description
At Endless we are interested in having a "demo mode" for our OEMs so that when computers are displayed in a shopfront they maintain a temporary interactive session and display a product demonstration video when idle.
This is sort-of related to https://bugzilla.gnome.org/show_bug.cgi?id=619526 but is a special case of it.
We've implemented this through a couple of tricks, involving some patches to gnome-initial-setup to mount overlayfs'es redirecting everything to /run when a hotkey is pressed (prevents the disk from being touched), automatically creating a new user and changing some of their settings and some other things which impact gdm more directly:
- We have a "forced auto login" mode which always skips the greeter and logs a given user in the configuration file in. This is slightly different from the existing AutomaticLogin mode which only logs the user in on the first boot but displays the greeter every time after that.
- We change /org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-type to 'logout' so that the user is automatically logged out after a given amount of time.
- We added some scripts to /etc/gdm3/PostLogin / /etc/gdm3/PostSession to wipe the home directory of the demo user and set it up again just before they are logged in and after they are logged out.
(This involved some distro-patching to GDM, which is being tracked here https://github.com/endlessm/gdm/pull/40/)
We think that upstream would be interested in something like this, so I wanted to get some thoughts on implementation. I saw something in the existing guest user bug report about using systemd user sessions to implement a temporary user, which I guess satisfies the user-creation part of the story, though we would need to be able to tell gdm to always log that user in.