



























ubuntu server 24.04: 如何设置默认采用 Xorg 方式登录
Ubuntu Server 默认无图形界面,要默认用 Xorg 登录,需要:安装桌面 + 图形管理器→禁用 Wayland→设默认会话为 Xorg→开机进图形模式。下面以 Ubuntu 22.04/24.04(GDM3)为例。
systemctl get-default
# 若显示 multi-user.target 则为命令行
sudo apt update
sudo apt install ubuntu-desktop
sudo systemctl set-default graphical.target
sudo nano /etc/gdm3/custom.conf
[daemon] 段添加:
DefaultSession=gnome-xorg.desktop
sudo systemctl restart gdm3
# 或直接重启
sudo reboot
# 安装 LightDM
sudo apt install lightdm
sudo dpkg-reconfigure lightdm # 选 lightdm 为默认
# 编辑 LightDM 配置
sudo nano /etc/lightdm/lightdm.conf
# 在 [Seat:*] 下添加
user-session=ubuntu-xorg
# 重启
sudo systemctl restart lightdm
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。