Skip to content

Instantly share code, notes, and snippets.

@crazygit
Last active January 3, 2024 05:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save crazygit/a6d09118e1718fe5d8b96bd70353008b to your computer and use it in GitHub Desktop.
Save crazygit/a6d09118e1718fe5d8b96bd70353008b to your computer and use it in GitHub Desktop.
使用容器快速搭建服务端远程桌面连接环境

项目参考

使用容器快速创建远程桌面的GUI连接

技术实现:

  • Guacamole Server
  • xrdp Server

参考文档

修改默认密码

默认用户名和密码都是abc

  • 连接远程桌面后,运行终端,输入passwd 命令修改

http://your_ip:3000/?login=true

在网页左侧的中间会有一个箭头,点击可以可以开启复制模式或者上传文件。

注意

使用docker-compose up命令启动服务之后,不要docker-compose down来停止服务,这样会把创建的container一起删除,所有安装的软件信息都会丢失 使用docker-compose stop来停止服务

常用软件安装

# 安装中文语言包
$ sudo apt-get install -y language-pack-zh-han*

# 查看中文字体
$ fc-list :lang=zh-cn

# 安装中文字体
$ sudo apt-get intall -y fonts-wqy-microhei ttf-wqy-zenhei

# 再次查看中文字体
$ fc-list :lang=zh-cn

# 安装ibus
$ apt install -y ibus ibus-pinyin

# 启动ibus-daemon
$ ibus-daemon -d -x -r

# 安装chrome
$ apt install -y gdebi-core wget
$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
$ sudo gdebi google-chrome-stable_current_amd64.deb
---
version: "2.1"
services:
webtop:
image: ghcr.io/linuxserver/webtop:ubuntu-mate
container_name: webtop
privileged: true #optional
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
# - SUBFOLDER=/ #optional, Specify a subfolder to use with reverse proxies, IE /subfolder/
# By default the desktop applications will only be launched when the user logs into the web interface,
# if you need your application to run on container spinup you will need to set the environment variable
- GUIAUTOSTART=true
# If the user changes the in container password from the default abc,
# they will also need to pass a password option to ensure the application autostarts:
- PASSWORD=REPLACE_ME_WITH_YOUR_PASSWORD
volumes:
- /root/src/docker-webtop/data:/config # abc users home directory
# - /var/run/docker.sock:/var/run/docker.sock #optional
ports:
- 3000:3000
shm_size: "1gb" #optional
restart: unless-stopped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment