解决通过远程桌面访问ubuntu20.04出现的异常问题
问题列表
- Ubuntu could not connect to session bus
- 鼠标和键盘无法使用
解决方案
-
安装驱动
# 安装 Xorg 输入驱动 sudo apt install xserver-xorg-input-all xserver-xorg-input-libinput# 安装键盘和鼠标驱动 sudo apt install xserver-xorg-input-kbd xserver-xorg-input-mouse# 安装其他可能需要的驱动 sudo apt install xserver-xorg-input-synaptics xserver-xorg-input-evdev
-
修改/etc/xrdp/startwm.sh文件,在/etc/X11/Xsession上面加入以下信息
unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS mate-session
-
/etc/X11/xrdp/xorg.conf 按照下面来进行修改,增加Option
Section "InputDevice"Identifier "xrdpKeyboard"Driver "xrdpkeyb"Option "CoreKeyboard" EndSectionSection "InputDevice"Identifier "xrdpMouse"Driver "xrdpmouse"Option "CorePointer" EndSection
-
重启服务
sudo systemctl restart xrdp-sesman.service xrdp.service