# x11docker

{% embed url="<https://github.com/mviereck/x11docker>" %}

```
curl -fsSL https://raw.githubusercontent.com/mviereck/x11docker/master/x11docker | sudo bash -s -- --update
```

執行x11docker-gui

![](/files/-M1NkDNfuTujWMwr5m3D)

x11docker可以使用標準系統實用程序運行，而無需對主機或映像進行額外依賴。作為核心程序只需要一個X服務器，還有在X上運行Docker容器。x11docker在啟動時檢查所選選項的依賴關係，並顯示終端消息。

在主機上安裝xpra Xephyr weston Xwayland xdotool xauth xclip xrandr xdpyinfo，或保持不變。

## sudo apt install xserver-xephyr nxagent xpra

```
sudo x11docker --user=root --xephyr --size=800x600 --desktop x11docker/lxqt
```

中文化

建立自己的Dockerfile

```
FROM x11docker/lxqt

RUN apt-get update && apt-get install -y fonts-droid-fallback && apt install -y vl
```

```
docker build -t kawsing/lxqt .
```

```
sudo x11docker --user=root --xephyr --lang=$LANG --size=800x600 --desktop kawsing/lxqt
```

![](/files/-M1O6R0IL_Ol27NsfB3J)

使用音效與剪貼簿

```
x11docker --size "800x600" --clipboard --pulseaudio --alsa="HDMI" --lang="zh_TW" --share="/home/ubuntu-mate/" --  --  kawsing/lxqt
x11docker --nxagent --clipboard --pulseaudio --alsa="HDMI" --lang="zh_TW" --share="/home/ubuntu-mate/" --  --  kawsing/lxqt

```

![](/files/-M1Omt5v1uKB0iE_hp97)

以root 身份使用桌面

```
x11docker --nxagent --clipboard --pulseaudio --alsa="HDMI" --lang="zh_TW" --user=RETAIN --share="/home/ubuntu-mate/" --  --  kawsing/lxqt
x11docker --clipboard --pulseaudio --alsa="HDMI" --lang="zh_TW" --share="/home/ubuntu-mate/" --user="RETAIN" --name="lxqt" --  --  kawsing/lxqt
```

使用另一個tty

選項--xorg的設置 選項--xorg從控制台運行，無需額外設置。 要在已經運行的X會話中運行第二個核心Xorg服務器，必須編輯或者創建文件/etc/X11/Xwrapper.config並替換行： 複製代碼

allowed\_users=console

用直線：

複製代碼

allowed\_users=anybody

needs\_root\_rights=yes

```
x11docker --xorg --clipboard --pulseaudio --alsa="HDMI" --lang="zh_TW" --share="/home/ubuntu-mate/" --name="lxqt" --  --  kawsing/lxqt
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kawsing.gitbook.io/opensystem/docker-cong-an-zhuang-dao-ying-yong-ru-men-pian/docker-kodi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
