I have upgraded my Ubuntu 16.04 to 20.04 and have installed Xfce which I'd like to set as the default DE when logging into my system. However, everytime I login with Xfce and logout, Ubuntu forgets Xfce as the default DE and goes back to the option Ubuntu (Unity).

Following How do I set the default desktop environment on 18.04 (Bionic)?

I tried

sudo update-alternatives --config x-session-manager

in the terminal. However, what I get is

There are 3 choices for the alternative x-session-manager (providing /usr/bin/x-session-manager).

  Selection    Path                    Priority   Status
  0            /usr/bin/gnome-session   50        auto mode
  1            /usr/bin/gnome-session   50        manual mode
  2            /usr/bin/startxfce4      50        manual mode
* 3            /usr/bin/xfce4-session   40        manual mode

Press <enter> to keep the current choice[*], or type selection number: 

which apparently indicates that Xfce should be the default DE which is not the case. Any help would be appreciated.

  • 2
    You should be able to select XFCE in the login screen. Also, since you upgraded from 16.04, you probably have GNOME, Unity and XFCE installed in your system, which would unnecessarily consume a lot of space. Consider fresh installing Xubuntu 20.04 if you want to use XFCE. Jan 18 at 15:48
  • @ArchismanPanigrahi Of course, I can select xfce, but I cannot set it as the default log in and hence the question. Unity is the default...
    – Simon
    Jan 19 at 10:35
  • Welcome to AskUbuntu, perhaps this Login screen has a variation, which doesn't talk each other, the branch before the selection of DE won't be loaded in the maze. Jan 22 at 4:59

2 Answers 2


check cat /var/lib/AccountsService/users/your-username. Make sure that XSession is set to xfce.

  • xsession is set to xfce. Here is what I got from the terminal. [User] XSession=xfce Background=/usr/share/backgrounds/The_Land_of_Edonias_by_Γιωργος_Αργυροπουλος.jpg Icon=/home/..../.face SystemAccount=false [InputSource0] xkb=us [InputSource1] xkb=ir
    – Simon
    Jan 20 at 12:54

When I upgraded to Ubuntu 22.04 LTS from the previous LTS I also had the issue where the default desktop stopped being Xfce. In my case, my /var/lib/AccountsServices/users/<my-user-name> contained a Session property as well as the XSession property. The Session property was empty.


Setting Session=xfce made Xfce the default desktop environment for me again.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.