public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
From: Igor Pechtchanski <pechtcha@cs.nyu.edu>
To: cygwin-xfree@cygwin.com
Subject: Re: Cygwin XFree86 startx Problem
Date: Thu, 20 Nov 2003 17:30:00 -0000	[thread overview]
Message-ID: <Pine.GSO.4.56.0311201143050.17640@slinky.cs.nyu.edu> (raw)
In-Reply-To: <20031120150754.62955.qmail@web60307.mail.yahoo.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 3353 bytes --]

On Thu, 20 Nov 2003, Chan Seng Loong wrote:

> hi...
>
> I having problem using startx to startx the X window
> or X server.......
>
> here are the error:
>
> Chan Seng Loong@amd1500mhz ~
> $ startx
> + userclientrc=/home/Chan Seng Loong/.xinitrc
> + userserverrc=/home/Chan Seng Loong/.xserverrc
> + sysclientrc=/usr/X11R6/lib/X11/xinit/xinitrc
> + sysserverrc=/usr/X11R6/lib/X11/xinit/xserverrc
> + defaultclient=/usr/X11R6/bin/xterm
> + defaultserver=/usr/X11R6/bin/X
> + defaultclientargs=
> + defaultserverargs=
> + clientargs=
> + serverargs=
> + [ -f /home/Chan Seng Loong/.xinitrc ]
> [: Seng: unknown operand
> + [ -f /usr/X11R6/lib/X11/xinit/xinitrc ]
> + defaultclientargs=/usr/X11R6/lib/X11/xinit/xinitrc
> + [ -f /home/Chan Seng Loong/.xserverrc ]
> [: Seng: unknown operand
> + [ -f /usr/X11R6/lib/X11/xinit/xserverrc ]
> + whoseargs=client
> + [ x != x ]
> + [ x = x ]
> + [ x = x ]
> + client=/usr/X11R6/lib/X11/xinit/xinitrc
> + [ x = x ]
> + [ x = x -a x = x ]
> + server=
> + [ x = x ]
> + XAUTHORITY=/home/Chan Seng Loong/.Xauthority
> + export XAUTHORITY
> + removelist=
> + xinit /usr/X11R6/lib/X11/xinit/xinitrc --
>
> + userresources=/home/Chan Seng Loong/.Xresources
> + usermodmap=/home/Chan Seng Loong/.Xmodmap
> + sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
> + sysmodmap=/usr/X11R6/lib/X11/xinit/.Xmodmap
> + [ -f /usr/X11R6/lib/X11/xinit/.Xresources ]
> + [ -f /usr/X11R6/lib/X11/xinit/.Xmodmap ]
> + [ -f /home/Chan Seng Loong/.Xresources ]
> [: Seng: unknown operand
> + [ -f /home/Chan Seng Loong/.Xmodmap ]
> [: Seng: unknown operand
> + twm
> + xclock -geometry 50x50-1+1
> + xterm -geometry 80x50+494+51
> + xterm -geometry 80x20+494-0
> + exec xterm -geometry 80x66+0+0 -name login
> Fontconfig error: Cannot load default config file
> Warning: Cannot convert string "" to type XftFont
>
> I tried to fix the probelm using the XF86Config and .xinitrc file.....
> but failed.....
>
> Can someone help me to solve the problem......?
>
> Thanks
> John

John,

Your username (and, consequently, your home directory) has spaces in it.
The startx script is not space-in-filename friendly (missing quotes), and
thus some parts of it don't run correctly.  Below is a patch to the startx
script that should make it work with home dirs containing spaces
(untested).  Please save the attached patch as /tmp/startx.patch and run
'cd /usr/X11R6/bin && patch -p0 < /tmp/startx.patch'.  You should then be
able to use the script.

Harold, this patch is against /usr/X11R6/bin/startx from
XFree86-bin-4.3.0-7 (CVS revision "XFree86: startx.cpp 3.16"). I have a
feeling this file is auto-generated (haven't looked at the build process).
I don't know if you can incorporate this patch as-is as Cygwin-specific,
or if you need a patch to the original source, startx.cpp (either for
Cygwin or to send upstream).  Let me know either way, and I'll either
create a ChangeLog for this patch, or create one against the CVS source.
HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

[-- Attachment #2: Type: TEXT/PLAIN, Size: 3157 bytes --]

--- startx-orig	2003-10-28 12:10:43.000000000 -0500
+++ startx	2003-11-20 12:11:31.068496000 -0500
@@ -14,8 +14,8 @@
 # $XFree86: xc/programs/xinit/startx.cpp,v 3.16 2003/01/24 21:30:02 herrb Exp $
 
 
-userclientrc=$HOME/.xinitrc
-userserverrc=$HOME/.xserverrc
+userclientrc="$HOME/.xinitrc"
+userserverrc="$HOME/.xserverrc"
 sysclientrc=/usr/X11R6/lib/X11/xinit/xinitrc
 sysserverrc=/usr/X11R6/lib/X11/xinit/xserverrc
 defaultclient=/usr/X11R6/bin/xterm
@@ -30,19 +30,16 @@ serverargs=""
 
 
 
-if [ -f $userclientrc ]; then
-    defaultclientargs=$userclientrc
-elif [ -f $sysclientrc ]; then
-    defaultclientargs=$sysclientrc
+if [ -f "$userclientrc" ]; then
+    defaultclientargs="\"$userclientrc\""
+elif [ -f "$sysclientrc" ]; then
+    defaultclientargs="\"$sysclientrc\""
 fi
 
-
-
-
-if [ -f $userserverrc ]; then
-    defaultserverargs=$userserverrc
-elif [ -f $sysserverrc ]; then
-    defaultserverargs=$sysserverrc
+if [ -f "$userserverrc" ]; then
+    defaultserverargs="\"$userserverrc\""
+elif [ -f "$sysserverrc" ]; then
+    defaultserverargs="\"$sysserverrc\""
 fi
 
 whoseargs="client"
@@ -52,15 +49,15 @@ while [ x"$1" != x ]; do
     /''*|\./''*)
 	if [ "$whoseargs" = "client" ]; then
 	    if [ x"$clientargs" = x ]; then
-		client="$1"
+		client="\"$1\""
 	    else
-		clientargs="$clientargs $1"
+		clientargs="$clientargs \"$1\""
 	    fi
 	else
 	    if [ x"$serverargs" = x ]; then
-		server="$1"
+		server="\"$1\""
 	    else
-		serverargs="$serverargs $1"
+		serverargs="$serverargs \"$1\""
 	    fi
 	fi
 	;;
@@ -69,14 +66,15 @@ while [ x"$1" != x ]; do
 	;;
     *)
 	if [ "$whoseargs" = "client" ]; then
-	    clientargs="$clientargs $1"
+	    clientargs="$clientargs \"$1\""
 	else
 	    # display must be the FIRST server argument
-	    if [ x"$serverargs" = x ] && 		 expr "$1" : ':[0-9][0-9]*$' > /dev/null 2>&1; then
+	    if [ x"$serverargs" = x ] && \
+		 expr "$1" : ':[0-9][0-9]*$' > /dev/null 2>&1; then
 
-		display="$1"
+		display="\"$1\""
 	    else
-		serverargs="$serverargs $1"
+		serverargs="$serverargs \"$1\""
 	    fi
 	fi
 	;;
@@ -90,7 +88,7 @@ if [ x"$client" = x ]; then
     if [ x"$clientargs" = x ]; then
 	client="$defaultclientargs"
     else
-	client=$defaultclient
+	client="$defaultclient"
     fi
 fi
 
@@ -100,39 +98,26 @@ if [ x"$server" = x ]; then
     if [ x"$serverargs" = x -a x"$display" = x ]; then
 	server="$defaultserverargs"
     else
-	server=$defaultserver
+	server="$defaultserver"
     fi
 fi
 
 if [ x"$XAUTHORITY" = x ]; then
-    XAUTHORITY=$HOME/.Xauthority
+    XAUTHORITY="$HOME/.Xauthority"
     export XAUTHORITY
 fi
 
 removelist=
 
+#xinit $client $clientargs -- $server $display $serverargs
 
-xinit $client $clientargs -- $server $display $serverargs
+# correctly process quotes, etc
+eval "set -- $client $clientargs -- $server $display $serverargs"
+
+xinit "$@"
 
 if [ x"$removelist" != x ]; then
+    # Note: this is still not space-friendly!
     xauth remove $removelist
 fi
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

  parent reply	other threads:[~2003-11-20 17:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-20 15:07 Chan Seng Loong
2003-11-20 15:24 ` Harold L Hunt II
2003-11-20 17:30 ` Igor Pechtchanski [this message]
2003-11-20 15:26 Henrik Schultz
2003-11-20 15:33 ` Harold L Hunt II
2003-11-20 17:54 Chan Seng Loong
2003-11-20 17:57 ` Harold L Hunt II
2003-11-21 19:20 Chan Seng Loong
2003-11-21 19:52 ` Igor Pechtchanski
2003-11-21 20:04   ` Harold L Hunt II
2003-11-22 14:25     ` Igor Pechtchanski
2003-11-22 18:36       ` Harold L Hunt II
2003-11-29 18:57         ` Igor Pechtchanski
2003-12-02 20:44           ` Igor Pechtchanski
2003-12-03  1:38             ` Harold L Hunt II
2003-11-22  2:02 Chan Seng Loong
2003-11-22  3:04 ` David Andersen
2003-11-22  4:40 ` Andrew Markebo
2003-11-22  4:53   ` Robert McNulty Junior
2003-11-22 23:25     ` Igor Pechtchanski
2003-11-24  8:10       ` Hans Dekker
2003-11-24 16:13         ` Igor Pechtchanski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.56.0311201143050.17640@slinky.cs.nyu.edu \
    --to=pechtcha@cs.nyu.edu \
    --cc=cygwin-xfree@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).