[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#270887: xbase-clients: startx does not preserve client args (patch)



Package: xbase-clients
Version: 4.3.0.dfsg.1-4
Followup-For: Bug #270887


My previous attempts to try to solve the ARG problem did
not wotrk, but I found a way. In case reportbug -A attaches
this patch to this message, please take a look.

It solves the problem at hand. 

If reportbug did not attach the patch to this message, I'll
file new bug report and mak it as [patch], so you can close this 
one.


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.26-1-386
Locale: LANG=C, LC_CTYPE=C (ignored: LC_ALL set to en_US)

Versions of packages xbase-clients depends on:
ii  cpp                    4:3.3.4-2         The GNU C preprocessor (cpp)
ii  libc6                  2.3.2.ds1-13      GNU C Library: Shared libraries an
ii  libdps1                4.3.0.dfsg.1-4    Display PostScript (DPS) client li
ii  libexpat1              1.95.6-8          XML parsing C library - runtime li
ii  libfontconfig1         2.2.3-1           generic font configuration library
ii  libfreetype6           2.1.7-2.2         FreeType 2 font engine, shared lib
ii  libice6                4.3.0.dfsg.1-4    Inter-Client Exchange library
ii  libncurses5            5.4-4             Shared libraries for terminal hand
ii  libpng12-0             1.2.5.0-7         PNG library - runtime
ii  libsm6                 4.3.0.dfsg.1-4    X Window System Session Management
ii  libstdc++5             1:3.3.4-6sarge1.2 The GNU Standard C++ Library v3
ii  libxaw7                4.3.0.dfsg.1-4    X Athena widget set library
ii  libxcursor1            1.1.3-1           X cursor management library
ii  libxext6               4.3.0.dfsg.1-4    X Window System miscellaneous exte
ii  libxft2                2.1.2-6           FreeType-based font drawing librar
ii  libxi6                 4.3.0.dfsg.1-4    X Window System Input extension li
ii  libxmu6                4.3.0.dfsg.1-4    X Window System miscellaneous util
ii  libxmuu1               4.3.0.dfsg.1-4    lightweight X Window System miscel
ii  libxpm4                4.3.0.dfsg.1-4    X pixmap library
ii  libxrandr2             4.3.0.dfsg.1-4    X Window System Resize, Rotate and
ii  libxrender1            0.8.3-7           X Rendering Extension client libra
ii  libxt6                 4.3.0.dfsg.1-4    X Toolkit Intrinsics
ii  libxtrap6              4.3.0.dfsg.1-4    X Window System protocol-trapping 
ii  libxtst6               4.3.0.dfsg.1-4    X Window System event recording an
ii  libxv1                 4.3.0.dfsg.1-4    X Window System video extension li
ii  xlibmesa-gl [libgl1]   4.3.0.dfsg.1-4    Mesa 3D graphics library [XFree86]
ii  xlibmesa-glu [libglu1] 4.3.0.dfsg.1-4    Mesa OpenGL utility library [XFree
ii  xlibs                  4.3.0.dfsg.1-4    X Window System client libraries m
ii  xlibs-data             4.3.0.dfsg.1-4    X Window System client data
ii  zlib1g                 1:1.2.1.1-5       compression library - runtime

-- no debconf information
--- startx	2004/09/09 15:59:34	1.1
+++ startx	2004/09/09 17:17:43	1.3
@@ -54,8 +54,13 @@
 	    if [ x"$clientargs" = x ]; then
 		client="$1"
 	    else
+		#  If the string includes spaces, preserve those.
+		if expr "$1" : ".* " > /dev/null 2>&1; then
+		    clientargs="$clientargs ARGARG${1}ARGARG"
+		else
 		clientargs="$clientargs $1"
 	    fi
+	    fi
 	else
 	    if [ x"$serverargs" = x ]; then
 		server="$1"
@@ -69,7 +74,12 @@
 	;;
     *)
 	if [ "$whoseargs" = "client" ]; then
+	    #  If arg includes spaces, preserve those.
+	    if expr "$1" : ".* " > /dev/null 2>&1; then
+		clientargs="$clientargs ARGARG${1}ARGARG"
+	    else
 	    clientargs="$clientargs $1"
+	    fi
 	else
 	    # display must be the FIRST server argument
 	    if [ x"$serverargs" = x ] && 		 expr "$1" : ':[0-9][0-9]*$' > /dev/null 2>&1; then
@@ -84,6 +94,7 @@
     shift
 done
 
+
 # process client arguments
 if [ x"$client" = x ]; then
     # if no client arguments either, use rc file instead
@@ -137,7 +148,7 @@
 done
 
 
-xinit $client $clientargs -- $server $display $serverargs
+eval $client `echo $clientargs| sed "s/ARGARG/\"/g"` -- $server $display $serverargs
 
 if [ x"$removelist" != x ]; then
     xauth remove $removelist

Reply to: