xinitrc in 3.99.1

Martti Kuparinen martti.kuparinen at iki.fi
Mon Jul 14 10:38:46 CEST 2003


Hi!

I'm testing 3.99.1 now and discovered few problems with startxfce4 (well,
it's in fact the xinitrc script invoked by startxfce4).

/usr/X11R6/bin/startxfce4: Starting X server

XFree86 Version 4.3.0
...
(==) Using config file: "/etc/X11/XF86Config"
XXX::XXX
test: 0: unexpected operator
YYY:no xfce4-session in /sbin /usr/sbin /bin /usr/bin /usr/pkg/sbin /usr/pkg/bin /usr/local/sbin /usr/local/bin /usr/X11R6/bin /home/martti/bin:YYY
exec: no: not found

And the X server quits here. Here's the patch I used to produce the output:


--- xinitrc.orig	Mon Jul 14 11:04:01 2003
+++ xinitrc	Mon Jul 14 11:19:17 2003
@@ -14,10 +14,12 @@
 EOF

 # Launch xscreensaver (if available), but only as non-root user
+echo XXX:${UID}:XXX
 test $UID -gt 0 && xscreensaver -no-splash &

 # Run xfce4-session if installed
 xfcesm=`which xfce4-session`
+echo YYY:${xfcesm}:YYY
 if test "x$xfcesm" != "x" ; then
 	exec $xfcesm
         # Shouldn't get there, but anyway...


So, for some reason UID is not defined even though it's available
from the shell prompt. Then the "which xfce4-session" test is not
working as expected. Please remember that /bin/sh is NOT bash...

Shouldn't we have something like this?


--- xinitrc.orig	Mon Jul 14 11:04:01 2003
+++ xinitrc	Mon Jul 14 11:32:32 2003
@@ -14,7 +14,7 @@
 EOF

 # Launch xscreensaver (if available), but only as non-root user
-test $UID -gt 0 && xscreensaver -no-splash &
+test `id -u` -gt 0 && xscreensaver -no-splash &

 # Run xfce4-session if installed
 xfcesm=`which xfce4-session`


And maybe the which-statement should be replaced by a for loop?


Martti



More information about the Xfce4-dev mailing list