diff --git a/debian/12/install.sh b/debian/12/install.sh index 58fbd0d..e255864 100644 --- a/debian/12/install.sh +++ b/debian/12/install.sh @@ -1,8 +1,7 @@ #!/bin/bash # -# This script is for Ubuntu 18.04 Bionic Beaver to download and install XRDP+XORGXRDP via -# source. +# This script is for Debian 12 Bookworm to download and install XRDP. # # Major thanks to: http://c-nergy.be/blog/?p=11336 for the tips. # @@ -55,13 +54,15 @@ sed -i_orig -e 's/crypt_level=high/crypt_level=none/g' /etc/xrdp/xrdp.ini # disable bitmap compression since its local its much faster sed -i_orig -e 's/bitmap_compression=true/bitmap_compression=false/g' /etc/xrdp/xrdp.ini -# Add script to setup the ubuntu session properly -# TODO: Differentiate between KDE and GNOME (ask OS). +# Add script to setup the Debian session properly +# Tested on Debian 12, should work for at least GNOME and KDE now (probably more). +# See https://wiki.archlinux.org/title/Environment_variables#Examples +source /etc/os-release if [ ! -e /etc/xrdp/startdebian.sh ]; then cat >> /etc/xrdp/startdebian.sh << EOF #!/bin/sh -export GNOME_SHELL_SESSION_MODE=debian -export XDG_CURRENT_DESKTOP=debian:KDE +export GNOME_SHELL_SESSION_MODE=$ID +export XDG_CURRENT_DESKTOP=$ID:$XDG_CURRENT_DESKTOP exec /etc/xrdp/startwm.sh EOF chmod a+x /etc/xrdp/startdebian.sh