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

推荐订阅源

N
News and Events Feed by Topic
A
About on SuperTechFans
D
DataBreaches.Net
量子位
云风的 BLOG
云风的 BLOG
T
The Blog of Author Tim Ferriss
U
Unit 42
M
MIT News - Artificial intelligence
小众软件
小众软件
博客园 - Franky
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Help Net Security
Help Net Security
Recorded Future
Recorded Future
The Last Watchdog
The Last Watchdog
S
Secure Thoughts
S
Security @ Cisco Blogs
MongoDB | Blog
MongoDB | Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
IT之家
IT之家
L
LINUX DO - 热门话题
H
Hacker News: Front Page
V
Vulnerabilities – Threatpost
Security Latest
Security Latest
C
CXSECURITY Database RSS Feed - CXSecurity.com
博客园 - 叶小钗
J
Java Code Geeks
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
PCI Perspectives
PCI Perspectives
Cyberwarzone
Cyberwarzone
S
Schneier on Security
Scott Helme
Scott Helme
Microsoft Security Blog
Microsoft Security Blog
Attack and Defense Labs
Attack and Defense Labs
T
The Exploit Database - CXSecurity.com
C
Cisco Blogs
Y
Y Combinator Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
T
Tenable Blog
Google DeepMind News
Google DeepMind News
T
Threat Research - Cisco Blogs
H
Hackread – Cybersecurity News, Data Breaches, AI and More
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V
V2EX
美团技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
大猫的无限游戏
大猫的无限游戏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Know Your Adversary
Know Your Adversary

Lei Mao's Log Book

2026 FIFA World Cup 备受嘲讽的会徽 Python Debugging Via VS Code In Docker Container Vargas Plateau Regional Park 徒步 Vargas Plateau Regional Park Apex 2026 FIFA World Cup 小组赛赛程 Retaining EXIF Metadata In GIMP San Francisquito Creek Joint Powers Authority 2025 Calendar Photo 麦当劳 The FIFA World Cup 套餐 Ardenwood Historic Farm 徒步 Ardenwood Historic Farm Synchronizations With TorchRec KeyedJaggedTensor Pacific Commons Linear Park 徒步 Pacific Commons Linear Park 2026 San Jose Half Marathon 竞赛 目标 Mountain View Shoreline Park 徒步 Mountain View Shoreline Park PyTorch AOTInductor Hybrid Lowering Carquinez Strait Regional Shoreline 徒步 Carquinez Strait Regional Shoreline PyTorch Triton Kernel Transparent Tracing and Compilation 脸庞 PyTorch Fake Export 2026 BRAIN Foundation 10K 竞赛 2026 Wild and Scenic Film Festival 参观 2026 Wild and Scenic Film Festival 系统工程程序员修 Bug FIFA 官方网站的语言 PyTorch Custom Operation 汉堡王 The Mandalorian and Grogu 套餐 Tilden Regional Parks Botanic Garden 参观 Tilden Regional Park Tilden Regional Parks Botanic Garden Tilden Regional Park 徒步 《寻秦记》电影版 ICML 2026 Area Chair Experience 2026 Foster City 5K Fun Run 竞赛 2026 年 3 月和 4 月该入手的模型手办 马拉松破二 2026 Heart & Soles Run 5K 竞赛 How Is FARS, The Fully Automated Research System? 算计: 七天的死亡游戏 Lake Chabot Regional Park 徒步 Lake Chabot Regional Park 2023 年恐怖电影《感恩节》 2026 Airport Runway Run at San Carlos Airport 5K 竞赛 Page Table for Page-Locked Host Memory Don Edwards San Francisco Bay National Wildlife Refuge - Ravenswood 徒步 Don Edwards San Francisco Bay National Wildlife Refuge - Ravenswood 法外风云 PyTorch Graph Symbolic Integer Contra Costa Canal Regional Trail 徒步 Contra Costa Canal Regional Trail 娑婆诃 PyTorch Export 2026 Western Pacific 5K 竞赛 浮躁的科研和胡扯的自媒体 Connecting Logitech Devices On Linux 2026 Oakland Half Marathon 竞赛 Del Valle Regional Park 徒步 Del Valle Regional Park CUDA_LAUNCH_BLOCKING=1 踏切时间 Wildcat Canyon Regional Park 徒步 Wildcat Canyon Regional Park Credit Card Unauthorized Transaction While In Possession 莎拉的真伪人生 2026 Union City Superhero Fun Run 5K 竞赛 McLaughlin Eastshore State Park 徒步 McLaughlin Eastshore State Park Cloudflare Worker Proxy R2 Bucket Access Zorro 和 Batman Fix MacBook Pro Space Key Stuck Problem 2026 年 1 月和 2 月该入手的模型手办 2026 Brazen Victory 10K 竞赛 儿时的玩伴李峰 Marsh Creek Regional Trail 徒步 Marsh Creek Regional Trail Perfetto GPU Flow Artifacts 百万人推理 System Performance Optimizations QQ 幻想 2026 Brazen Bay Breeze 5K 竞赛 CUDA Shared Memory Bank Conflict-Free Vectorized Access Dota 闪电站出售 Mountain View Downtown 徒步 Mountain View Downtown C++ Latch and Barrier 2025 年跑步总结 2026 Rotary Mission Ten Half Marathon 竞赛 狗的素质等于人的素质 CUDA Rendezvous Stream Pleasanton Ridge Regional Park 徒步 Pleasanton Ridge Regional Park Xfinity Internet 多年来的使用感受 Randomized SVD Don Castro Regional Recreation Area 徒步 Don Castro Regional Recreation Area 拖车公司的大汉们
Docker Container GUI Display Using Wayland
Lei Mao · 2026-04-29 · via Lei Mao's Log Book

Introduction

Wayland is a modern display server protocol for Linux that aims to replace the older X11 protocol. Wayland provides a more efficient and secure way to handle graphical display on Linux systems.

Starting from Ubuntu 26.04 LTS, Wayland has become the default display server protocol, and X11 support has been completely dropped. In this blog post, I would like to discuss how to run GUI applications from Docker container using Wayland on Ubuntu 26.04 LTS.

Examples

Starting with version 121, Firefox defaults to Wayland on Linux. If Wayland is not available, it will fall back to X11. We will use Firefox in a Ubuntu 26.04 Docker container as an example to demonstrate how to run GUI applications from Docker container using Wayland.

Firefox on Ubuntu 26.04

We could slightly modify the Dockerfile of Firefox on Ubuntu 24.04 for Ubuntu 26.04. The modified Dockerfile is as follows.

firefox.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM ubuntu:26.04

ENV DEBIAN_FRONTEND=noninteractive
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8


RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
wget \
gpg \
dbus \
libwayland-client0 \
libwayland-egl1 \
fonts-wqy-microhei && \
apt-get clean


RUN install -d -m 0755 /etc/apt/keyrings && \
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null && \
gpg -n -q --import --import-options import-show /etc/apt/keyrings/packages.mozilla.org.asc | awk '/pub/{getline; gsub(/^ +| +$/,""); if($0 == "35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3") print "\nThe key fingerprint matches ("$0").\n"; else print "\nVerification failed: the fingerprint ("$0") does not match the expected one.\n"}' && \
echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | tee -a /etc/apt/sources.list.d/mozilla.list > /dev/null && \
echo 'Package: *\nPin: origin packages.mozilla.org\nPin-Priority: 1000' | tee /etc/apt/preferences.d/mozilla && \
apt-get update && apt-get install -y --no-install-recommends \
firefox && \
apt-get clean

CMD ["firefox"]

To build the Docker image, please run the following command.

1
$ docker build -f firefox.Dockerfile -t firefox:26.04 .

Using Wayland

To start Firefox from the Docker container using Wayland, please run the following command. The operating system that hosts the Docker container must use Wayland as the display server protocol. In this case, I was running on Ubuntu 26.04 LTS which completely dropped support for X11 and only supports Wayland.

1
2
3
4
5
$ docker run -it --rm \
-e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR \
-e WAYLAND_DISPLAY=$WAYLAND_DISPLAY \
-v $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY \
firefox:26.04

To verify that Firefox is running using Wayland, we could open the about:support page in Firefox and check the “Window Protocol” information. It should show “Wayland” instead of “X11”.

Using xWayland

To start Firefox from the Docker container using xWayland, i.e., the X11 compatibility layer for Wayland, please run the following command. The operating system that hosts the Docker container does not have to use Wayland as the display server protocol. In this case, Ubuntu 24.04 LTS or Ubuntu 26.04 LTS both worked.

1
2
3
4
5
6
$ xhost +
$ docker run -it --rm \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
firefox:26.04
$ xhost -

To verify that Firefox is running using xWayland, we could open the about:support page in Firefox and check the “Window Protocol” information. It should show “X11” instead of “Wayland”, even if the host operating system is using Wayland as the display server protocol.

Conclusions

Wayland is the future of display server protocol for Linux. We should start using Wayland for GUI display as much as possible from now on.

References