(ETC) Windows to Ubuntu 원격데스크탑 연결 Xrdp
How to configure xRDP server on Ubuntu 18.04 | Serverspace
What is xRDP?
Xrdp is a free, open-source implementation of Microsoft’s RDP (remote desktop Protocol) that allows non-Microsoft Windows operating systems (such as Linux and BSD) to provide a fully functional RDP-compliant remote desktop.
Installation and setup
Connect to the virtual server using SSH and perform the system update:
sudo apt-get update
Install and enable the xRDP tool:
sudo apt-get install xrdp
sudo systemctl enable xrdp
Choose and set the environment, Xfce or MATE, and allow xRDP to use it:
case1) Xfce:
sudo apt-get install xfce4 xfce4-terminal
sudo sed -i.bak '/fi/a #xrdp multiple users configuration n xfce-session n' /etc/xrdp/startwm.sh
case) MATE:
sudo apt-get install mate-core mate-desktop-environment mate-notification-daemon
sudo sed -i.bak '/fi/a #xrdp multiple users configuration n mate-session n' /etc/xrdp/startwm.sh
Open the RDP port for remote connection:
sudo ufw allow 3389/tcp
Restart the xRDP server for the changes to take effect:
sudo /etc/init.d/xrdp restart
Desktop Connection
***만약 접속시 검은 화면이 나온다면 아래를 수정해보자.
sudo /etc/xrdp/startwm.sh
맨아래 줄을 주석 처리 후 아래와 같이 변경한 후 xrdp 재시작
#test -x /etc/X11/Xsession && exec /etc/X11/Xsession
#exec /bin/sh /etc/X11/Xsession
test -x/usr/bin/startxfce4 && exec /usr/bin/startxfce4
exec /bin/sh /usr/bin/startxfce4
*****xfce 에서 terminal 이 열리지 않을때
sudo update-alternatives --config x-terminal-emulator
xfce 터미널 선택