在Ubuntu 20.04中设置默认桌面环境

Sim*_*mon 7 xfce desktop-environments

我已将 Ubuntu 16.04 升级到 20.04 并安装了 Xfce,我希望在登录系统时将其设置为默认 DE。然而,每次我使用 Xfce 登录并注销时,Ubuntu 都会忘记 Xfce 作为默认 DE,并返回到选项 Ubuntu (Unity)。

以下如何在 18.04 (Bionic) 上设置默认桌面环境?

我试过

sudo update-alternatives --config x-session-manager
Run Code Online (Sandbox Code Playgroud)

在终端中。然而,我得到的是

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: 
Run Code Online (Sandbox Code Playgroud)

这显然表明 Xfce 应该是默认的 DE,但事实并非如此。任何帮助,将不胜感激。

jus*_*ncc 6

当我从之前的 LTS 升级到 Ubuntu 22.04 LTS 时,我还遇到了默认桌面不再是 Xfce 的问题。就我而言,我/var/lib/AccountsServices/users/<my-user-name>包含 Session 属性以及 XSession 属性。会话属性为空。

[User]
Session=
XSession=xfce
Run Code Online (Sandbox Code Playgroud)

设置Session=xfce使 Xfce 再次成为我的默认桌面环境。


s3i*_*ani 3

查看cat /var/lib/AccountsService/users/your-username。确保XSession设置为xfce