Install KDE Plasma and XRDP on Ubuntu Server

2022-12-11 08:53:07 浏览数 (1)

Install KDE Plasma and XRDP on Ubuntu Server

It has been a long time since I last installed my desktop environment: I can't remember many things, and I've encountered new problems. Here's a brief record of what happened and possible solutions, just in case.


Install KDE Plasma

代码语言:shell复制
sudo apt-get install kde-plasma-desktop

Choose sddm.


Install XRDP

代码语言:shell复制
sudo apt-get install xrdp
代码语言:shell复制
sudo sed -e 's/^new_cursors=true/new_cursors=false/g' 
           -i /etc/xrdp/xrdp.ini
sudo adduser xrdp ssl-cert
代码语言:shell复制
echo "/usr/bin/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
代码语言:shell复制
sudo systemctl enable xrdp
sudo systemctl restart xrdp

Quit immediately after credentials

Stop xrdp with sudo service xrdp stop.

Edit the xrdp start script: sudo nano /etc/xrdp/startwm.sh.

In this file, replace the lines

代码语言:shell复制
test -x /etc/X11/Xsession && exec /etc/X11/Xsession
exec /bin/sh /etc/X11/Xsession

with

代码语言:shell复制
#(@obsolete)startxfce4
/usr/bin/startplasma-x11

Restart xrdp with sudo service xrdp start.


Strange KDE bug: can’t resize or move windows

代码语言:shell复制
#(@obsolete)killall kwin
killall kwin_x11
#(@obsolete)kwrapper kwin -replace &
kwrapper5 kwin_x11 --replace &

The desktop is black (No desktop)

代码语言:shell复制
#(@Obsolete)killall plasma-desktop
#(@Obsolete)kstart plasma-desktop
#(@Obsolete)killall plasmashell #to stop it
#(@Obsolete)kstart plasmashell #to restart it
kquitapp5 plasmashell
kstart5 plasmashell

0 人点赞