1
0
forked from mir/linux-vm-tools

Make Debian installer differentiate KDE / GNOME.

This commit is contained in:
Michael De Roover 2024-11-02 07:02:10 +01:00
parent b68432dbd7
commit 94a8fcd02c

13
debian/12/install.sh vendored
View File

@ -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