xfce4-session: fix issue that prevents `startxfce4` from starting

This commit should fix issue when startxfce4 doesn't detect a DISPLAY
variable and exits non-zero code, fixes #734
This commit is contained in:
marcusz 2022-04-12 16:34:59 +08:00 committed by Yaksh Bariya
parent 475ded7195
commit 758b53748f
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
2 changed files with 12 additions and 11 deletions

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A session manager for XFCE environment"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=4.16.0
TERMUX_PKG_REVISION=6
TERMUX_PKG_REVISION=7
TERMUX_PKG_SRCURL=http://archive.xfce.org/src/xfce/xfce4-session/${TERMUX_PKG_VERSION:0:4}/xfce4-session-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=22f273f212481d71e0b5618c62710cd85f69aea74f5ea5c0093f7918b07d17b7
TERMUX_PKG_DEPENDS="gnupg, hicolor-icon-theme, libsm, libwnck, libxfce4ui, xfce4-settings, xfdesktop, pango, xfwm4, xorg-iceauth, xorg-xrdb"

View File

@ -1,20 +1,21 @@
diff -uNr xfce4-session-4.16.0.mod/scripts/startxfce4.in xfce4-session-4.16.0/scripts/startxfce4.in
--- xfce4-session-4.16.0.mod/scripts/startxfce4.in 2016-05-02 21:02:14.000000000 +0000
+++ xfce4-session-4.16.0/scripts/startxfce4.in 2022-03-22 03:38:13.853954163 +0000
@@ -89,14 +89,9 @@
diff -uNr xfce4-session-4.16.0/scripts/startxfce4.in xfce4-session-4.16.0.mod/scripts/startxfce4.in
--- xfce4-session-4.16.0/scripts/startxfce4.in 2016-05-02 21:02:14.000000000 +0000
+++ xfce4-session-4.16.0.mod/scripts/startxfce4.in 2022-04-12 08:25:51.362449242 +0000
@@ -88,14 +88,9 @@
fi
export XDG_CONFIG_DIRS
if test "x$DISPLAY" = "x"
+ echo "$0: Failed to connect to display"
+ exit 1
then
-if test "x$DISPLAY" = "x"
-then
- echo "$0: Starting X server"
- prog=xinit
-
- if test ! "x$XDG_VTNR" = "x"; then
- SERVERRC="vt$XDG_VTNR $SERVERRC"
- fi
-else
+if test "x$DISPLAY" = "x"; then
+ echo "$0: Failed to connect to display"
+ exit 2
else
echo "$0: X server already running on display $DISPLAY"
prog=/bin/sh
fi