You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

DigitalOcean上Ubuntu 22.04的Display manager无法切换问题求助

DigitalOcean上Ubuntu 22.04的Display manager无法切换问题求助

Hey there, let’s work through this issue together— I’ve dealt with similar display manager headaches on remote Ubuntu servers before, so here are some practical fixes to try:

  • First, confirm your desktop environments are properly installed
    Run this command to list all available desktop sessions on your system:

    ls /usr/share/xsessions/
    

    You should see entries like xfce.desktop and mate.desktop in the output. If they’re missing, that means the desktop environments didn’t install correctly, and you’ll need to reinstall them first with sudo apt install xfce4 mate-desktop-environment.

  • Manually reconfigure your display manager
    Ubuntu 22.04 typically uses GDM3 by default. You can force a reconfiguration to pick your preferred display manager (and ensure it recognizes your new desktop environments) with:

    sudo dpkg-reconfigure gdm3
    

    This will bring up a prompt where you can select your default display manager. If you prefer using LightDM (which sometimes shows the desktop switch option more reliably), install it first:

    sudo apt install lightdm
    

    During installation, you’ll be asked to choose between GDM3 and LightDM— pick LightDM, then restart your server.

  • Check for the hidden desktop switch option
    On GDM3’s login screen, the desktop environment selector is often a small gear icon located next to your username or the "Sign In" button. It’s easy to miss, so take a close look at the corners or edges of the login interface after restarting.

  • Fix remote connection-related issues (if applicable)
    If you’re accessing the VM via VNC or another remote tool, some remote services override the system’s default desktop environment. For example, if you’re using TightVNC, edit your ~/.vnc/xstartup file and replace any GNOME-related commands with:

    startxfce4 &  # For XFCE
    # OR
    mate-session &  # For MATE
    

    Save the file and restart your VNC server for changes to take effect.

  • Final step: Reboot your VM
    Sometimes configuration changes don’t kick in until you do a full reboot. Run sudo reboot and check the login screen again after the system comes back up.

备注:内容来源于stack exchange,提问作者pl-jay

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.23 10:17:48