From b27a5ff13324cc6a32858026bfbbf7edbf1d9a06 Mon Sep 17 00:00:00 2001 From: Kevin Kim Date: Fri, 9 Aug 2024 10:20:09 +0900 Subject: [PATCH] If there is no X, skip the xrdp-genkeymap command. --- debian/changelog | 6 ++++++ debian/xrdp.postinst | 26 +++++--------------------- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/debian/changelog b/debian/changelog index c7c1a21..532cff2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +xrdp (0.10.0-1hamonikr6) stable; urgency=medium + + * If there is no X, skip the xrdp-genkeymap command. + + -- HamoniKR Fri, 09 Aug 2024 10:18:55 +0900 + xrdp (0.10.0-1hamonikr5) stable; urgency=medium * Release for paektu arm64 diff --git a/debian/xrdp.postinst b/debian/xrdp.postinst index 40e85cf..91dd734 100644 --- a/debian/xrdp.postinst +++ b/debian/xrdp.postinst @@ -2,26 +2,6 @@ set -e -# This maintainer script can be called the following ways: -# -# * new-postinst "configure" [$most_recently_configured_version] -# The package is unpacked; all dependencies are unpacked and, when there -# are no circular dependencies, configured. -# -# * old-postinst "abort-upgrade" $new_version -# * old-postinst "abort-remove" -# * conflictors-postinst "abort-remove" "in-favour" $new_package -# $new_version -# * deconfigureds-postinst "abort-deconfigure" "in-favour" -# $failed_install_package $fip_version # new-package -# ["removing" $conflicting_package $cp_version] # old-package -# The package is unpacked; all dependencies are at least Half-Installed, -# previously been configured, and not removed. In some error situations, -# dependencies may not be even fully unpacked. -# -# * postinst "triggered" "${triggers[*]}" -# For trigger-only calls, i.e. if "configure" is not called. - case $1 in configure) getent passwd xrdp >/dev/null 2>&1 || adduser \ @@ -53,7 +33,11 @@ configure) adduser xrdp ssl-cert ) - test -e /etc/xrdp/km-e0010412.ini || xrdp-genkeymap /etc/xrdp/km-e0010412.ini + if [ -n "$DISPLAY" ]; then + test -e /etc/xrdp/km-e0010412.ini || xrdp-genkeymap /etc/xrdp/km-e0010412.ini + else + echo "Skipping xrdp-genkeymap as no DISPLAY is set." + fi ;;