惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Troy Hunt's Blog
GbyAI
GbyAI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
月光博客
月光博客
Engineering at Meta
Engineering at Meta
The Register - Security
The Register - Security
阮一峰的网络日志
阮一峰的网络日志
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
F
Fortinet All Blogs
博客园 - 司徒正美
博客园 - 聂微东
T
Tailwind CSS Blog
MyScale Blog
MyScale Blog
Microsoft Security Blog
Microsoft Security Blog
Jina AI
Jina AI
A
About on SuperTechFans
Y
Y Combinator Blog
N
Netflix TechBlog - Medium
V
V2EX
I
InfoQ
WordPress大学
WordPress大学
小众软件
小众软件
The Cloudflare Blog
Recent Announcements
Recent Announcements
U
Unit 42
The Last Watchdog
The Last Watchdog
P
Palo Alto Networks Blog
Vercel News
Vercel News
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
M
MIT News - Artificial intelligence
Project Zero
Project Zero
美团技术团队
L
LangChain Blog
S
Security @ Cisco Blogs
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI
W
WeLiveSecurity
S
Securelist
H
Hacker News: Front Page
K
Kaspersky official blog
Martin Fowler
Martin Fowler
Know Your Adversary
Know Your Adversary
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
J
Java Code Geeks
P
Proofpoint News Feed
有赞技术团队
有赞技术团队
Google Online Security Blog
Google Online Security Blog
D
DataBreaches.Net

博客园 - emanlee

把xshell的全部连接和密码,从一台Windows 10电脑,迁移到Windows11电脑。 Windows 远程桌面(mstsc)完整迁移方案(含历史连接记录、RDP 配置、保存的账号密码)【可行】 Endnote,如何能完整迁移库和模版 ubuntu 安装 locate “华为杯”第八届中国研究生人工智能创新大赛 当数据量很大时,执行 mysql> source filename.sql 很慢,有什么办法更快 pip install django-ranged-response==0.2.0 部署Vue+Django 04c,mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory Ubuntu Server 24.04 安装 MySQL, ./mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory Ubuntu Server 24.04 设置锁屏时间 Ubuntu Server 启动过程中,比较慢 Job systemd-networkd-wait-online.service/start running Ubuntu Server 24.04 启用root用户 Ubuntu snap install 安装todesk是否必须检查 CPU 是否支持 AVX / AVX2 命令 Ubuntu Server 24.04下解决SunloginClient 向日葵依赖libgconf-2-4安装问题 Ubuntu Server 24.04 安装图形界面 ubuntu server 24.04 安装 中文输入法 Ubuntu Server 24.04 安装浏览器firefox Ubuntu Server 24.04 安装todesk【先联网,CPU必须支持 AVX / AVX2 】 Ubuntu Server 24.04 安装中文,汉字 Python赋值,什么时候传引用? 大驼峰命名法 python 容易理解类和对象的例子 django+mysql: 如何添加一个新的超级用户?
ubuntu server 24.04: 如何设置默认采用 Xorg 方式登录
emanlee · 2026-05-04 · via 博客园 - emanlee

ubuntu server 24.04: 如何设置默认采用  Xorg 方式登录

Ubuntu Server 默认无图形界面,要默认用 Xorg 登录,需要:安装桌面 + 图形管理器→禁用 Wayland→设默认会话为 Xorg→开机进图形模式。下面以 Ubuntu 22.04/24.04(GDM3)为例。


一、先确认 / 安装图形环境

  1. 检查当前启动目标(服务器默认多为命令行)
    systemctl get-default
    # 若显示 multi-user.target 则为命令行
    
  2. 安装 GNOME 桌面(含 GDM3)
    sudo apt update
    sudo apt install ubuntu-desktop
    
  3. 开机默认进入图形模式
    sudo systemctl set-default graphical.target
    

二、强制 GDM3 默认使用 Xorg(禁用 Wayland)【可行可用】

  1. 编辑 GDM3 配置
    sudo nano /etc/gdm3/custom.conf 
  2. 找到并修改下面这行(取消注释并设为 false
  3. (可选)设置默认会话为 Ubuntu on Xorg(保留 Wayland 可选) 在 [daemon] 段添加:
    DefaultSession=gnome-xorg.desktop
    
  4. 保存退出:Ctrl+O → 回车 → Ctrl+X

三、重启生效

sudo systemctl restart gdm3
# 或直接重启
sudo reboot

四、验证是否生效 

  • 输出 x11 表示成功用 Xorg;
  • 若仍为 wayland,检查配置是否改错文件 / 未取消注释。

五、如果用 LightDM 而非 GDM3 

# 安装 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

六、常见问题

  • 登录界面没有齿轮图标:多为没装桌面 / 没启用图形模式,回到第一步检查。
  • Ubuntu 25.10+ 已移除 GNOME on Xorg:只能用 Wayland 或换 Xfce/KDE 桌面