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

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
S
Securelist
V
Vulnerabilities – Threatpost
C
Cyber Attacks, Cyber Crime and Cyber Security
Schneier on Security
Schneier on Security
Cyberwarzone
Cyberwarzone
Simon Willison's Weblog
Simon Willison's Weblog
Hacker News - Newest:
Hacker News - Newest: "LLM"
P
Palo Alto Networks Blog
T
Troy Hunt's Blog
SecWiki News
SecWiki News
Security Archives - TechRepublic
Security Archives - TechRepublic
T
The Blog of Author Tim Ferriss
Project Zero
Project Zero
Microsoft Security Blog
Microsoft Security Blog
The Register - Security
The Register - Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
J
Java Code Geeks
F
Full Disclosure
阮一峰的网络日志
阮一峰的网络日志
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Attack and Defense Labs
Attack and Defense Labs
Know Your Adversary
Know Your Adversary
WordPress大学
WordPress大学
PCI Perspectives
PCI Perspectives
N
News | PayPal Newsroom
The Last Watchdog
The Last Watchdog
酷 壳 – CoolShell
酷 壳 – CoolShell
P
Privacy & Cybersecurity Law Blog
P
Proofpoint News Feed
V
Visual Studio Blog
C
CERT Recently Published Vulnerability Notes
H
Help Net Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
云风的 BLOG
云风的 BLOG
月光博客
月光博客
T
The Exploit Database - CXSecurity.com
I
InfoQ
大猫的无限游戏
大猫的无限游戏
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
U
Unit 42
腾讯CDC
小众软件
小众软件
V2EX - 技术
V2EX - 技术
罗磊的独立博客
Cloudbric
Cloudbric
Recorded Future
Recorded Future
IT之家
IT之家
Google DeepMind News
Google DeepMind News
C
CXSECURITY Database RSS Feed - CXSecurity.com

博客园 - 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 桌面