终端改目录改英文
export LANG=en_US
xdg-user-dirs-gtk-update
export LANG=zh_CN.UTF-8
xdg-user-dirs-gtk-update
=================================================
xrdp是原生方案,兼容性是最好的,也不需要太多额外的软件支持。
sudo apt install xrdp
sudo systemctl enable xrdp
第49行,new_cursors=true改为false
sudo sed -e 's/^new_cursors=true/new_cursors=false/g' \
-i /etc/xrdp/xrdp.ini
sudo systemctl restart xrdp
创建 ~/.xsessionrc
vi ~/.xsessionrc
export GNOME_SHELL_SESSION_MODE=ubuntu
export XDG_CURRENT_DESKTOP=ubuntu:GNOME
export XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop
export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
----------------------------------------------------------------------------
$ D=/usr/share/ubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop
$ cat <<EOF > ~/.xsessionrc
export GNOME_SHELL_SESSION_MODE=ubuntu
export XDG_CURRENT_DESKTOP=ubuntu:GNOME
export XDG_DATA_DIRS=${D}
export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
EOF
---------------------------
sudo vi /etc/polkit-1/localauthority/50-local.d/xrdp-color-manager.pkla
[Netowrkmanager]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device
ResultAny=no
ResultInactive=no
ResultActive=yes
sudo systemctl restart polkit
-------------------------------
$ cat <<EOF | \
sudo tee /etc/polkit-1/localauthority/50-local.d/xrdp-color-manager.pkla
[Netowrkmanager]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device
ResultAny=no
ResultInactive=no
ResultActive=yes
EOF
-------------------------------------------
sudo ufw enable
sudo ufw allow 22/tcp
sudo ufw allow 3389/tcp