Is there a clean way to either hide the session chooser "Select desktop environment" widget from the unity-greeter screen, or force a particular user to use a particular desktop environment (even if others are installed)? I'm building a kiosk on Ubuntu 16.04, and need to prevent the kiosk user from having access to anything other than the stripped down Openbox environment which autolaunches a particular application. On the other hand, I need the admin user to have full access to the standard Ubuntu Unity environment.
The only option I've seen is a hackish editing of the *.desktop session files to point the Exec and TryExec options to external scripts that check who the user is logged in as and exec a specific desktop session for the user regardless of which one they select on the unity-greeter screen.
I'm kind of surprised that this isn't an easily configurable option.
I built a custom version of unity-greeter from source. Commenting out these two lines (see diff output below) causes the badge to disappear. Not the ideal solution, as this disables the session chooser for all users, but since this functionality is not actually necessary post-install, I'm o.k. with it (especially since I have no facility with "vala"). The ideal solution would be to duplicate the "hidden user" functionality with a "hidden session" equivalent, but a couple of hours of trying to implement this in a naive fashion suggest that's beyond my coding capabilities.
849c849 < /* e.show_options.connect (prompt_box_show_options_cb); */ --- > e.show_options.connect (prompt_box_show_options_cb); 934c934 < /* if (!should_show_session_badge ()) */ --- > if (!should_show_session_badge ())
Since this is disabled, I needed to edit the AccountServices file for the user account needing a full desktop session /var/lib/AccountServices/users/username and set "XSession" to "ubuntu".