OS/Linux
Ubuntu 22.04 : XRDP를 통해 KDE 데스크톱 환경 구축
파란크리스마스
2022. 11. 19. 13:09
728x90
출처
- Ubuntu 20.04: Connect to KDE desktop environment via XRDP
- WSL2 ubuntu에 원격 데스크탑으로 접속하기.. :: Sean.s `s blog
- install-xrdp-kde
- wsl2 xrdp 사용하기 : 생각나는대로 ...
패키지 업데이트 진행
$ sudo apt update && sudo apt -y upgrade
kde-plasma-desktop 설치
$ sudo apt-get install kde-plasma-desktop
설치 스크립트 다운로드(install-xrdp.sh)
bluesanta@bluesanta-Default-string:~$ wget -O install-xrdp.sh https://gist.githubusercontent.com/crnisamuraj/49bc667c4c7c788c602bd29e58bbd049/raw/a1978e4720342280e3bc98bd92385f0412f6cb75/install-xrdp.sh
설치 스크립트 실행 가능 하도록 권한 변경
bluesanta@bluesanta-Default-string:~$ chmod 755 install-xrdp.sh
설치 스크립트 실행
bluesanta@bluesanta-Default-string:~$ sudo ./install-xrdp.sh
환경 설정 ( /etc/xrdp/xrdp.ini )
bluesanta@bluesanta-Default-string:~$ vi ~/.xsession
.xsession 내용
startplasma-x11
export XDG_SESSION_DESKTOP=KDE
export XDG_DATA_DIRS=/usr/share/plasma:/usr/local/share:/usr/share:/var/lib/snapd/desktop
export XDG_CONFIG_DIRS=/etc/xdg/xdg-plasma:/etc/xdg:/usr/share/kubuntu-default-settings/kf5-settings
환경 설정 ( /etc/xrdp/xrdp.ini )
install-xrdp.sh 내용
#!/bin/bash -e
# Install XRDP.
sudo apt install -y xrdp
#sudo sed -e 's/^new_cursors=true/new_cursors=false/g' \
# -i /etc/xrdp/xrdp.ini
sudo systemctl enable xrdp
sudo systemctl restart xrdp
# Load Ubuntu config.
echo "startplasma-x11" > ~/.xsession
# D=/usr/share/plasma:/usr/local/share:/usr/share:/var/lib/snapd/desktop
# C=/etc/xdg/xdg-plasma:/etc/xdg
# C=${C}:/usr/share/kubuntu-default-settings/kf5-settings
# cat <<EOF > ~/.xsessionrc
# export XDG_SESSION_DESKTOP=KDE
# export XDG_DATA_DIRS=${D}
# export XDG_CONFIG_DIRS=${C}
# EOF
# Avoid Authentication Required dialog.
cat <<EOF | \
sudo tee /etc/polkit-1/localauthority/50-local.d/xrdp-NetworkManager.pkla
[Netowrkmanager]
Identity=unix-group:sudo
Action=org.freedesktop.NetworkManager.network-control
ResultAny=yes
ResultInactive=yes
ResultActive=yes
EOF
cat <<EOF | \
sudo tee /etc/polkit-1/localauthority/50-local.d/xrdp-packagekit.pkla
[Netowrkmanager]
Identity=unix-group:sudo
Action=org.freedesktop.packagekit.system-sources-refresh
ResultAny=yes
ResultInactive=auth_admin
ResultActive=yes
EOF
sudo systemctl restart polkit