Commit 15e1d4cb authored by Jiri (George) Lebl's avatar Jiri (George) Lebl Committed by George Lebl

Don't use which but our own private shell version since solaris which is


Fri May 28 12:53:42 2004  George Lebl <jirka@5z.com>

	* config/XKeepsCrashing, config/PreSession.in,
	  config/PostSession.in, config/Xsession.in, config/Default.in:
	  Don't use which but our own private shell version since solaris
	  which is broken when there is no TTY.  Fixes #133245, partly
	  based on a patch by Brian Cameron
parent e98cd756
Fri May 28 12:53:42 2004 George Lebl <jirka@5z.com>
* config/XKeepsCrashing, config/PreSession.in,
config/PostSession.in, config/Xsession.in, config/Default.in:
Don't use which but our own private shell version since solaris
which is broken when there is no TTY. Fixes #133245, partly
based on a patch by Brian Cameron
Fri May 28 12:35:22 2004 George Lebl <jirka@5z.com>
* gui/gdmsetup.c, config/Makefile.am: solaris chown doesn't like
......
......@@ -5,9 +5,26 @@
PATH=@X_PATH@:$PATH
gdmwhich () {
COMMAND="$1"
OUTPUT=
IFS=:
for dir in $PATH
do
if test -x "$dir/$COMMAND" ; then
if test "x$OUTPUT" = "x" ; then
OUTPUT="$dir/$COMMAND"
fi
fi
done
unset IFS
echo "$OUTPUT"
}
sysmodmap=/etc/X11/Xmodmap
XMODMAP=`which xmodmap 2>/dev/null`
XMODMAP=`gdmwhich xmodmap`
if [ x$XMODMAP != x ] ; then
if [ x$GDM_PARENT_DISPLAY = x ]; then
if [ -f $sysmodmap ]; then
......@@ -18,7 +35,7 @@ if [ x$XMODMAP != x ] ; then
fi
fi
SETXKBMAP=`which setxkbmap 2>/dev/null`
SETXKBMAP=`gdmwhich setxkbmap`
if [ x$SETXKBMAP != x ] ; then
# FIXME: is this all right? Is this completely on crack?
# What this does is move the xkb configuration from the GDM_PARENT_DISPLAY
......
......@@ -2,7 +2,23 @@
PATH="@X_PATH@:$PATH:/bin:/usr/bin"
SESSREG=`which sessreg 2>/dev/null`
gdmwhich () {
COMMAND="$1"
OUTPUT=
IFS=:
for dir in $PATH
do
if test -x "$dir/$COMMAND" ; then
if test "x$OUTPUT" = "x" ; then
OUTPUT="$dir/$COMMAND"
fi
fi
done
unset IFS
echo "$OUTPUT"
}
SESSREG=`gdmwhich sessreg`
if [ "x$SESSREG" != "x" ] ; then
"$SESSREG" -d -w /var/log/wtmp -u /var/run/utmp -x "$X_SERVERS" -h "$REMOTE_HOST" -l "$DISPLAY" "$USER"
fi
......
......@@ -8,7 +8,23 @@
#
PATH="@X_PATH@:$PATH:/bin:/usr/bin"
XSETROOT=`which xsetroot 2>/dev/null`
gdmwhich () {
COMMAND="$1"
OUTPUT=
IFS=:
for dir in $PATH
do
if test -x "$dir/$COMMAND" ; then
if test "x$OUTPUT" = "x" ; then
OUTPUT="$dir/$COMMAND"
fi
fi
done
unset IFS
echo "$OUTPUT"
}
XSETROOT=`gdmwhich xsetroot`
if [ "x$XSETROOT" != "x" ] ; then
# Try to snarf the BackgroundColor from the config file
BACKCOLOR=`grep '^BackgroundColor' @EXPANDED_SYSCONFDIR@/gdm/gdm.conf | sed 's/^.*=\(.*\)$/\1/'`
......@@ -19,7 +35,7 @@ if [ "x$XSETROOT" != "x" ] ; then
fi
SESSREG=`which sessreg 2>/dev/null`
SESSREG=`gdmwhich sessreg`
if [ "x$SESSREG" != "x" ] ; then
# some output for easy debugging
echo "$0: Registering your session with wtmp and utmp"
......
......@@ -6,20 +6,36 @@ if test "x$UNSAFE_TO_TRANSLATE" = "xyes" ; then
unset LC_MESSAGES
fi
if [ -x "$LIBEXECDIR/gdmtranslate" ] ; then
if test -x "$LIBEXECDIR/gdmtranslate" ; then
GDMTRANSLATE="$LIBEXECDIR/gdmtranslate"
else
GDMTRANSLATE=
fi
gettextfunc () {
if [ "x$GDMTRANSLATE" != "x" ] ; then
if test "x$GDMTRANSLATE" != "x" ; then
"$GDMTRANSLATE" "$1"
else
echo "$1"
fi
}
gdmwhich () {
COMMAND="$1"
OUTPUT=
IFS=:
for dir in $PATH
do
if test -x "$dir/$COMMAND" ; then
if test "x$OUTPUT" = "x" ; then
OUTPUT="$dir/$COMMAND"
fi
fi
done
unset IFS
echo "$OUTPUT"
}
MSG3=`gettextfunc "I cannot start the X server (your graphical interface). It is likely that it is not set up correctly. You will need to log in on a console and rerun the X configuration program. Then restart GDM."`
MSG4=`gettextfunc "Would you like me to try to run the X configuration program? Note that you will need the root password for this."`
MSG5=`gettextfunc "Please type in the root (privileged user) password."`
......@@ -64,9 +80,9 @@ done
#
# Now we check for dialog and gdmaskpass
#
DIALOG=`which dialog`
DIALOG=`gdmwhich dialog`
if test "x$DIALOG" = "x" ; then
DIALOG=`which whiptail`
DIALOG=`gdmwhich whiptail`
fi
if test -x "$LIBEXECDIR/gdmaskpass" ; then
ASKPASS="$LIBEXECDIR/gdmaskpass"
......
......@@ -51,7 +51,23 @@ gettextfunc () {
fi
}
zenity=`which zenity 2>/dev/null`
gdmwhich () {
COMMAND="$1"
OUTPUT=
IFS=:
for dir in $PATH
do
if test -x "$dir/$COMMAND" ; then
if test "x$OUTPUT" = "x" ; then
OUTPUT="$dir/$COMMAND"
fi
fi
done
unset IFS
echo "$OUTPUT"
}
zenity=`gdmwhich zenity`
command="$1"
......@@ -72,7 +88,7 @@ fi
# works for ALL sessions (except ones named 'Failsafe')
# clean up after xbanner
freetemp=`which freetemp 2>/dev/null`
freetemp=`gdmwhich freetemp`
if [ -n "$freetemp" ] ; then
"$freetemp"
fi
......@@ -207,7 +223,7 @@ if [ "x$command" = "xdefault" ] ; then
fi
# add ssh-agent if found
sshagent="`which ssh-agent 2>/dev/null`"
sshagent="`gdmwhich ssh-agent`"
if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ]; then
command="$sshagent -- $command"
elif [ -z "$sshagent" ] ; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment