[Xfce4-commits] [xfce/xfce4-session] 03/05: xinitrc: Remove fallback path when xfce4-session is not installed

noreply at xfce.org noreply at xfce.org
Wed May 8 19:06:33 CEST 2019


This is an automated email from the git hooks/post-receive script.

s   k   u   n   n   y   k       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfce4-session.

commit a7a413a6f3644d052a504a6a0e286f28053920b1
Author: Romain Bouvier <skunnyk at alteroot.org>
Date:   Wed May 8 15:52:56 2019 +0200

    xinitrc: Remove fallback path when xfce4-session is not installed
    
    - xinitrc file *is* provided by xfce4-session
    - It is a legacy case, before the introduction of xfce4-session years
    ago
    - Initially, startxfce4/xinitrc were provided by a 3rd party package
    (xfce-utils), that's why you can have a pattern where you run xinitrc
    without xfce4-session installed
    - However since xfce 4.10 xinitrc has been merged in xfce4-session
    - Fix Bug #14681
---
 scripts/xinitrc.in.in | 121 +++++++-------------------------------------------
 1 file changed, 16 insertions(+), 105 deletions(-)

diff --git a/scripts/xinitrc.in.in b/scripts/xinitrc.in.in
index 366924b..e493098 100755
--- a/scripts/xinitrc.in.in
+++ b/scripts/xinitrc.in.in
@@ -78,112 +78,23 @@ cat /dev/null $XRESOURCES | xrdb -merge -
 # load local modmap
 test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
 
-# run xfce4-session if installed
-if command -v xfce4-session >/dev/null 2>&1; then
-
-  # check if we start xfce4-session with ck-launch-session. this is only
-  # required for starting from a console, not a login manager
-  if test "x$XFCE4_SESSION_WITH_CK" = "x1"; then
-    if command -v ck-launch-session >/dev/null 2>&1; then
-      ck-launch-session xfce4-session
-    else
-      echo
-      echo "You have tried to start Xfce with consolekit support, but"
-      echo "ck-launch-session is not installed."
-      echo "Aborted startup..."
-      echo
-
-      exit 1
-    fi
+# check if we start xfce4-session with ck-launch-session. this is only
+# required for starting from a console, not a login manager
+if test "x$XFCE4_SESSION_WITH_CK" = "x1"; then
+  if command -v ck-launch-session >/dev/null 2>&1; then
+    ck-launch-session xfce4-session
   else
-    # start xfce4-session normally
-    xfce4-session
+    echo
+    echo "You have tried to start Xfce with consolekit support, but"
+    echo "ck-launch-session is not installed."
+    echo "Aborted startup..."
+    echo
+    exit 1
   fi
-
-  exit 0
-fi
-
-##################
-# IMPORTANT NOTE #
-##################
-
-# Everything below here ONLY gets executed if you are NOT using xfce4-session
-# (Xfce's session manager).  If you are using the session manager, everything
-# below is handled by it, and the code below is not executed at all.  If you're
-# not sure if you're using the session manager, type 'ps -e|grep xfce4-session'
-# in a terminal while Xfce is running.
-
-##################
-
-# Use dbus-launch if installed.
-if test x"$DBUS_SESSION_BUS_ADDRESS" = x""; then
-  if command -v dbus-launch >/dev/null 2>&1; then
-    eval `dbus-launch --sh-syntax --exit-with-session`
-    # some older versions of dbus don't export the var properly
-    export DBUS_SESSION_BUS_ADDRESS
-  else
-    echo "Could not find dbus-launch; Xfce will not work properly" >&2
-    fi
-fi
-
-# this is only necessary when running w/o xfce4-session
-xsetroot -solid black -cursor_name watch
-
-# or use old-fashioned startup script otherwise
-
-xfsettingsd &
-xfwm4 --daemon
-
-# start up stuff in $XDG_CONFIG_HOME/autostart/
-if test -d "$XDG_CONFIG_HOME/autostart"; then
-  for i in ${XDG_CONFIG_HOME}/autostart/*.desktop; do
-    grep -q -E "^Hidden=true" "$i" && continue
-    if grep -q -E "^OnlyShowIn=" "$i"; then
-      # need to test twice, as lack of the line entirely means we still run it
-      grep -E "^OnlyShowIn=" "$i" | grep -q 'XFCE;' || continue
-    fi
-    grep -E "^NotShowIn=" "$i" | grep -q 'XFCE;' && continue
-
-    # check for TryExec
-    trycmd=`grep -E "^TryExec=" "$i" | cut -d'=' -f2`
-    if test "$trycmd"; then
-      command -v "$trycmd" >/dev/null 2>&1 || continue
-    fi
-
-    cmd=`grep -E "^Exec=" "$i" | cut -d'=' -f2`
-    if test "$cmd" && command -v "$cmd" >/dev/null 2>&1; then
-      $cmd &
-    fi
-  done
+else
+  # start xfce4-session normally
+  xfce4-session
 fi
 
-xfdesktop&
-orage &
-
-panel=`command -v xfce4-panel`
-case "x$panel" in
-	x|xno*)
-		;;
-	*)
-		$panel
-		ret=$?
-		while test $ret -ne 0; do
-			xmessage -center -file - -timeout 20 -title Error <<EOF
-A crash occured in the panel
-Please report this to the xfce4-dev at xfce.org list
-or on http://bugs.xfce.org
-Meanwhile the panel will be restarted
-EOF
-			cat >&2 <<EOF
-A crash occured in the panel
-Please report this to the xfce4-dev at xfce.org list
-or on http://bugs.xfce.org
-Meanwhile the panel will be restarted
-EOF
-			$panel
-			ret=$?
-		done
-		;;
-esac
-
-xsetroot -bg white -fg red  -solid black -cursor_name watch
+# if we got here, then exec failed
+exit 1

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list