安装xfce 4.14
环境Ubuntu 20
root@iZ8vbd40c7nplpkfmtyq5jZ:~# uname -a Linux iZ8vbd40c7nplpkfmtyq5jZ 5.4.0-47-generic #51-Ubuntu SMP Fri Sep 4 19:50:52 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
安装过程
更新软件包
sudo apt-get update
安装xfce4
sudo apt-get install xfce4
添加源仓库
sudo apt install software-properties-common
安装 xfce 4.14
sudo add-apt-repository ppa:xubuntu-dev/staging
sudo apt-get update sudo apt-get install xfce4
如果安装过其他版本xfce,可以直接更新
sudo apt dist-upgrade
卸载命令如下:
sudo apt install ppa-purge
sudo ppa-purge ppa:xubuntu-dev/staging
xrdp的安装及使用
安装gnu桌面,默认的
(由于上面已经安装了xfce,下面是安装gnu桌面的命令)
sudo apt update
sudo apt install ubuntu-desktop
安装xrdp
sudo apt install xrdp
查看启动状态
root@iZ8vbd40c7nplpkfmtyq5jZ:~# systemctl status xrdp ● xrdp.service - xrdp daemon Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2020-10-27 12:50:31 CST; 8s ago Docs: man:xrdp(8) man:xrdp.ini(5) Main PID: 42158 (xrdp) Tasks: 1 (limit: 1111) Memory: 1.1M CGroup: /system.slice/xrdp.service └─42158 /usr/sbin/xrdp Oct 27 12:50:30 iZ8vbd40c7nplpkfmtyq5jZ xrdp[42157]: (42157)(139728068642624)[INFO ] address [0.0.0.0] port [3389] mode 1 Oct 27 12:50:30 iZ8vbd40c7nplpkfmtyq5jZ xrdp[42157]: (42157)(139728068642624)[INFO ] listening to port 3389 on 0.0.0.0 Oct 27 12:50:30 iZ8vbd40c7nplpkfmtyq5jZ xrdp[42157]: (42157)(139728068642624)[INFO ] xrdp_listen_pp done Oct 27 12:50:30 iZ8vbd40c7nplpkfmtyq5jZ xrdp[42157]: (42157)(139728068642624)[DEBUG] Closed socket 7 (AF_INET6 :: port 3> Oct 27 12:50:30 iZ8vbd40c7nplpkfmtyq5jZ systemd[1]: xrdp.service: Can't open PID file /run/xrdp/xrdp.pid (yet?) after st> Oct 27 12:50:31 iZ8vbd40c7nplpkfmtyq5jZ systemd[1]: Started xrdp daemon. Oct 27 12:50:32 iZ8vbd40c7nplpkfmtyq5jZ xrdp[42158]: (42158)(139728068642624)[INFO ] starting xrdp with pid 42158 Oct 27 12:50:32 iZ8vbd40c7nplpkfmtyq5jZ xrdp[42158]: (42158)(139728068642624)[INFO ] address [0.0.0.0] port [3389] mode 1 Oct 27 12:50:32 iZ8vbd40c7nplpkfmtyq5jZ xrdp[42158]: (42158)(139728068642624)[INFO ] listening to port 3389 on 0.0.0.0 Oct 27 12:50:32 iZ8vbd40c7nplpkfmtyq5jZ xrdp[42158]: (42158)(139728068642624)[INFO ] xrdp_listen_pp done
默认情况下,Xrdp 使用/etc/ssl/private/ssl-cert-snakeoil.key
,它仅仅对“ssl-cert” 用户组成语可读。运行下面的命令,将xrdp
用户添加到这个用户组:
root@iZ8vbd40c7nplpkfmtyq5jZ:~# adduser xrdp ssl-cert
Adding user `xrdp' to group `ssl-cert' ... Adding user xrdp to group ssl-cert Done.
重启 Xrdp 服务
systemctl restart xrdp
防火墙配置,最好不开
## 设置某一网段可以连接 sudo ufw allow from 192.168.33.0/24 to any port 3389 ## 设置任意地址可以连接 sudo ufw allow 3389