1

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.

UPDATE:

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".

  • It would be beneficial to turn off the the desktop selection drop down at login for single DE machines. Also to turn off the User Name selection for single User machines. Of course both should be able to be turned back on later using sudo powers. Hopefully your request is doable and not a new feature request. – WinEunuuchs2Unix May 11 '18 at 1:58
  • It's going to amount to a minor feature request; I've had one of my contractors hack into the unity-greeter source code and add a configuration option to the XML schema that lets you specify a list of users for whom the session badge is rendered invisible. ... we'll be submitting this, and possibly, an enhanced version that lets you specify exactly which desktop sessions are available to which users via the greeter. Of course, this doesn't prevent users with shell access from bypassing these limitations, but that's another issue entirely. – Thomas Van Ness Leavitt May 15 '18 at 18:43
  • Users with shell you can tell them all there entries are logged to a special history file they can't access. As for. XML Resource file I began project to extract and recompile the GDM login screen in order to set background wallpaper last night got about half way done. So yes it does sound minor. – WinEunuuchs2Unix May 15 '18 at 19:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.