summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--startx.in92
-rw-r--r--xinitrc.in54
2 files changed, 73 insertions, 73 deletions
diff --git a/startx.in b/startx.in
index 453fb4c..9b224af 100644
--- a/startx.in
+++ b/startx.in
@@ -12,18 +12,18 @@
# Site administrators are STRONGLY urged to write nicer versions.
#
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-xinitdir=@XINITDIR@
-xterm=@XTERM@
-xserver=@XSERVER@
-xinit=@XINIT@
-bundle_id_prefix=@bundleidprefix@
-xauth=@XAUTH@
-bindir=@bindir@
-libexecdir=@libexecdir@
-mk_cookie=@MCOOKIE@
-has_cookie_maker=@HAS_COOKIE_MAKER@
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
+xinitdir="@XINITDIR@"
+xterm="@XTERM@"
+xserver="@XSERVER@"
+xinit="@XINIT@"
+bundle_id_prefix="@bundleidprefix@"
+xauth="@XAUTH@"
+bindir="@bindir@"
+libexecdir="@libexecdir@"
+mk_cookie="@MCOOKIE@"
+has_cookie_maker="@HAS_COOKIE_MAKER@"
unset SESSION_MANAGER
@@ -39,7 +39,7 @@ if [ "$(uname -s)" = "Darwin" ] ; then
case $PATH in
*:$bindir | *:$bindir:* | $bindir:*) ;;
- *) PATH=$bindir:$PATH ;;
+ *) PATH="$bindir:$PATH" ;;
esac
# Now the "old" compiled path
@@ -48,7 +48,7 @@ if [ "$(uname -s)" = "Darwin" ] ; then
if [ -d "$oldbindir" ] ; then
case $PATH in
*:$oldbindir | *:$oldbindir:* | $oldbindir:*) ;;
- *) PATH=$PATH:$oldbindir ;;
+ *) PATH="$PATH:$oldbindir" ;;
esac
fi
@@ -57,15 +57,15 @@ if [ "$(uname -s)" = "Darwin" ] ; then
export PATH
fi
-userclientrc=$HOME/.xinitrc
+userclientrc="$HOME/.xinitrc"
[ -f "${XINITRC}" ] && userclientrc="${XINITRC}"
-sysclientrc=@XINITDIR@/xinitrc
+sysclientrc="@XINITDIR@/xinitrc"
-userserverrc=$HOME/.xserverrc
+userserverrc="$HOME/.xserverrc"
[ -f "${XSERVERRC}" ] && userserverrc="${XSERVERRC}"
-sysserverrc=$xinitdir/xserverrc
-defaultclient=$xterm
-defaultserver=$xserver
+sysserverrc="$xinitdir/xserverrc"
+defaultclient="$xterm"
+defaultserver="$xserver"
defaultclientargs=""
defaultserverargs=""
defaultdisplay=""
@@ -77,7 +77,7 @@ vtarg=""
if [ "$(uname -s)" = "Darwin" ] ; then
if [ "$X11_PREFS_DOMAIN" = "" ] ; then
- export X11_PREFS_DOMAIN=$bundle_id_prefix".X11"
+ export X11_PREFS_DOMAIN="$bundle_id_prefix"".X11"
fi
# Initialize defaults (this will cut down on "safe" error messages)
@@ -99,19 +99,19 @@ if [ "$(uname -s)" = "Darwin" ] ; then
# First, start caching fonts
if [ "$(defaults read $X11_PREFS_DOMAIN cache_fonts)" = 1 ] ; then
- if [ -x $bindir/font_cache ] ; then
- $bindir/font_cache
- elif [ -x $bindir/font_cache.sh ] ; then
- $bindir/font_cache.sh
- elif [ -x $bindir/fc-cache ] ; then
- $bindir/fc-cache
+ if [ -x "$bindir"/font_cache ] ; then
+ "$bindir"/font_cache
+ elif [ -x "$bindir"/font_cache.sh ] ; then
+ "$bindir"/font_cache.sh
+ elif [ -x "$bindir"/fc-cache ] ; then
+ "$bindir"/fc-cache
fi
fi
- if [ -x $libexecdir/privileged_startx ] ; then
+ if [ -x "$libexecdir"/privileged_startx ] ; then
# Don't push this into the background because it can cause
# a race to create /tmp/.X11-unix
- $libexecdir/privileged_startx
+ "$libexecdir"/privileged_startx
fi
if [ "$(defaults read $X11_PREFS_DOMAIN no_auth)" = 0 ] ; then
@@ -192,26 +192,26 @@ done
# process client arguments
if [ "$client" = "" ]; then
- client=$defaultclient
+ client="$defaultclient"
# For compatibility reasons, only use startxrc if there were no client command line arguments
if [ "$clientargs" = "" ]; then
if [ -f "$userclientrc" ]; then
- client=$userclientrc
+ client="$userclientrc"
elif [ -f "$sysclientrc" ]; then
- client=$sysclientrc
+ client="$sysclientrc"
fi
fi
fi
# if no client arguments, use defaults
if [ "$clientargs" = "" ]; then
- clientargs=$defaultclientargs
+ clientargs="$defaultclientargs"
fi
# process server arguments
if [ "$server" = "" ]; then
- server=$defaultserver
+ server="$defaultserver"
if [ "$(uname -s)" = "Linux" ] ; then
# When starting the defaultserver start X on the current tty to avoid
@@ -219,7 +219,7 @@ if [ "$(uname -s)" = "Linux" ] ; then
# "https://bugzilla.redhat.com/show_bug.cgi?id=806491"
tty=$(tty)
if expr "$tty" : '/dev/tty[0-9][0-9]*$' > /dev/null; then
- tty_num=${tty#/dev/tty}
+ tty_num="${tty#/dev/tty}"
vtarg="vt$tty_num -keeptty"
fi
fi
@@ -227,16 +227,16 @@ fi
# For compatibility reasons, only use xserverrc if there were no server command line arguments
if [ "$serverargs" = "" ] && [ "$display" = "" ]; then
if [ -f "$userserverrc" ]; then
- server=$userserverrc
+ server="$userserverrc"
elif [ -f "$sysserverrc" ]; then
- server=$sysserverrc
+ server="$sysserverrc"
fi
fi
fi
# if no server arguments, use defaults
if [ "$serverargs" = "" ]; then
- serverargs=$defaultserverargs
+ serverargs="$defaultserverargs"
fi
# if no vt is specified add vtarg (which may be empty)
@@ -252,12 +252,12 @@ fi
# if no display, use default
if [ "$display" = "" ]; then
- display=$defaultdisplay
+ display="$defaultdisplay"
fi
if [ "$enable_xauth" = 1 ] ; then
if [ "$XAUTHORITY" = "" ]; then
- XAUTHORITY=$HOME/.Xauthority
+ XAUTHORITY="$HOME/.Xauthority"
export XAUTHORITY
fi
@@ -283,7 +283,7 @@ if [ "$enable_xauth" = 1 ] ; then
dummy=0
# create a file with auth information for the server. ':0' is a dummy.
- xserverauthfile=$HOME/.serverauth.$$
+ xserverauthfile="$HOME/.serverauth.$$"
trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP BUS TERM
xauth -q -f "$xserverauthfile" << EOF
add :$dummy . $mcookie
@@ -306,13 +306,13 @@ EOF
authcookie=$(xauth list "$displayname" \
| sed -n 's/.*'"$displayname"'[[:space:]*].*[[:space:]*]//p' 2>/dev/null);
if [ "z${authcookie}" = "z" ] ; then
- $xauth -q << EOF
+ "$xauth" -q << EOF
add $displayname . $mcookie
EOF
removelist="$displayname $removelist"
else
dummy=$(($dummy+1));
- $xauth -q -f "$xserverauthfile" << EOF
+ "$xauth" -q -f "$xserverauthfile" << EOF
add :$dummy . $authcookie
EOF
fi
@@ -321,17 +321,17 @@ fi
case "$(uname -s)" in
CYGWIN_NT*|Darwin)
- eval $xinit \"$client\" $clientargs -- \"$server\" $display $serverargs
+ eval "$xinit" \"$client\" $clientargs -- \"$server\" $display $serverargs
;;
*)
- $xinit "$client" $clientargs -- "$server" $display $serverargs
+ "$xinit" "$client" $clientargs -- "$server" $display $serverargs
;;
esac
retval=$?
if [ "$enable_xauth" = 1 ] ; then
if [ "$removelist" != "" ]; then
- $xauth remove $removelist
+ "$xauth" remove $removelist
fi
if [ "$xserverauthfile" != "" ]; then
rm -f "$xserverauthfile"
diff --git a/xinitrc.in b/xinitrc.in
index a1c2127..9d9a78c 100644
--- a/xinitrc.in
+++ b/xinitrc.in
@@ -1,56 +1,56 @@
#!@SHELL_CMD@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-xrdb=@XRDB@
-xinitdir=@XINITDIR@
-xclock=@XCLOCK@
-xterm=@XTERM@
-twm=@TWM@
-xmodmap=@XMODMAP@
-
-userresources=$HOME/.Xresources
-usermodmap=$HOME/.Xmodmap
-sysresources=$xinitdir/.Xresources
-sysmodmap=$xinitdir/.Xmodmap
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
+xrdb="@XRDB@"
+xinitdir="@XINITDIR@"
+xclock="@XCLOCK@"
+xterm="@XTERM@"
+twm="@TWM@"
+xmodmap="@XMODMAP@"
+
+userresources="$HOME/.Xresources"
+usermodmap="$HOME/.Xmodmap"
+sysresources="$xinitdir/.Xresources"
+sysmodmap="$xinitdir/.Xmodmap"
# merge in defaults and keymaps
-if [ -f $sysresources ]; then
+if [ -f "$sysresources" ]; then
if [ -x /usr/bin/cpp ] ; then
- $xrdb -merge $sysresources
+ "$xrdb" -merge "$sysresources"
else
- $xrdb -nocpp -merge $sysresources
+ "$xrdb" -nocpp -merge "$sysresources"
fi
fi
-if [ -f $sysmodmap ]; then
- $xmodmap $sysmodmap
+if [ -f "$sysmodmap" ]; then
+ "$xmodmap" "$sysmodmap"
fi
if [ -f "$userresources" ]; then
if [ -x /usr/bin/cpp ] ; then
- $xrdb -merge "$userresources"
+ "$xrdb" -merge "$userresources"
else
- $xrdb -nocpp -merge "$userresources"
+ "$xrdb" -nocpp -merge "$userresources"
fi
fi
if [ -f "$usermodmap" ]; then
- $xmodmap "$usermodmap"
+ "$xmodmap" "$usermodmap"
fi
# start some nice programs
-if [ -d $xinitdir/xinitrc.d ] ; then
+if [ -d "$xinitdir"/xinitrc.d ] ; then
for f in "$xinitdir/xinitrc.d"/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
-$twm &
-$xclock -geometry 50x50-1+1 &
-$xterm -geometry 80x50+494+51 &
-$xterm -geometry 80x20+494-0 &
-exec $xterm -geometry 80x66+0+0 -name login
+"$twm" &
+"$xclock" -geometry 50x50-1+1 &
+"$xterm" -geometry 80x50+494+51 &
+"$xterm" -geometry 80x20+494-0 &
+exec "$xterm" -geometry 80x66+0+0 -name login