3

I've installed ubuntu-dekstop-minimal on 20.04 and I'd like to make the "Ubuntu" session the default (as opposed to "GNOME on Xorg").

As this is being provisioned by Vagrant, I'd like to be able to do this by command rather than using the cog icon. Any ideas?

Here's an image of what I see at the login screen, note GNOME on Xorg is default, I want to make Ubuntu the default:

screenshot of login screen

2
  • After you log in to Ubuntu, doesn't that stay selected for the next login? It does on mine, but I use lightdm. Jul 18, 2020 at 15:16
  • @OrganicMarble yeah it does stay the default which is a first step. However, I'd like to set this default ahead of time with a bash command if possible.
    – Matt Gill
    Jul 18, 2020 at 15:34

1 Answer 1

3

You need to edit the file /var/lib/AccountsService/users/<username-of-Vagrant> and change the valid session name under XSession= line.

[User]
Language=
Session=
XSession=gnome-xorg
Icon=/home/admin/.face
SystemAccount=false

you can use command line tools to change the line XSession=

Be-careful with the name of the session, the text shown on the gdm screen is not the actual session name. You need to look in for the files in /usr/share/xsessions/ and/or (based on session x or Wayland) /usr/share/wayland/

Warning: wrong edit will result not able to login.

1
  • 1
    Thanks! This worked for me sudo sed -i 's/XSession=gnome-xorg/XSession=ubuntu.desktop/g' /var/lib/AccountsService/users/vagrant
    – Matt Gill
    Jul 18, 2020 at 16:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .