[Xfce-bugs] [Bug 5557] startxfce4 doesn't work on Solaris

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Sun Jul 12 12:17:00 CEST 2009


http://bugzilla.xfce.org/show_bug.cgi?id=5557





--- Comment #7 from Yves-Alexis Perez <corsac at debian.org>  2009-07-12 10:17:00 UTC ---
Hmhm, seems that “type” should be replaced by “which” so here's my diff:

diff --git a/scripts/xinitrc.in b/scripts/xinitrc.in
index e19dbe1..7358162 100755
--- a/scripts/xinitrc.in
+++ b/scripts/xinitrc.in
@@ -28,12 +28,12 @@ fi

 # set up XDG user directores.  see
 # http://freedesktop.org/wiki/Software/xdg-user-dirs
-if type xdg-user-dirs-update >/dev/null 2>&1; then
+if which xdg-user-dirs-update >/dev/null 2>&1; then
     xdg-user-dirs-update
 fi

 if test -f "$XDG_CONFIG_HOME/user-dirs.dirs"; then
-    source "$XDG_CONFIG_HOME/user-dirs.dirs"
+    . "$XDG_CONFIG_HOME/user-dirs.dirs"
     # i'm deliberately not 'export'-ing the XDG_ vars, because you shouldn't
     # rely on the env vars inside apps, since the file could be changed at
     # any time by the user.  this is solely here for migration purposes.
@@ -165,11 +165,11 @@ if test -d "$XDG_CONFIG_HOME/autostart"; then
     # check for TryExec
     trycmd=`grep -E "^TryExec=" "$i" | cut -d'=' -f2`
     if test "$trycmd"; then
-      type "$trycmd" >/dev/null 2>&1 || continue
+      which "$trycmd" >/dev/null 2>&1 || continue
     fi

     cmd=`grep -E "^Exec=" "$i" | cut -d'=' -f2`
-    if test "$cmd" && type "$cmd" >/dev/null 2>&1; then
+    if test "$cmd" && which "$cmd" >/dev/null 2>&1; then
       $cmd &
     fi
   done

-- 
Configure bugmail: http://bugzilla.xfce.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Xfce-bugs mailing list