This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fwd: Re: Various starting X problems


Luke,



luke.kendall@cisra.canon.com.au wrote:
   cat: /cygdrive/d/home/luke/.Xauthority: No such file or directory
   xinit:  No such file or directory (errno 2):  no program named "/usr/X11R6/bin/xterm" in PATH


Something else must be wrong with your path.


I don't think so.  FWIW, here is my full and ugly PATH, wrapped for
easy reading but no other changes:

Oh no, once again I am right on this one... read on for a full explanation of what you need to tell us in the future when you have such problems.


I think you have a custom ~/.xinitrc or your /etc/X11/xinit/xinitrc has been modified. Or, you might have ~/.xserverrc or /etc/X11/xinit/xserverrc (which are not installed by anything I have written). Please send in any of these files if you find them so that we can see what they are doing. For starters, they are obviously starting a window manager, which is not something that the version from X-startup-scripts-1.0.5-1 does.


I definitely have a custom .xinitrc file.  In fact part of our site
post-install process was to create a default one, since initially
Cygwin's XFree didn't include it.  I hadn't realised it was colliding
with one from Cygwin.  Our standard site post-install creates the
~/.xinitrc.  Sounds like I'd better try to back that out.

/etc/X11/xinit/xinitrc can be copied to ~/.xinitrc, but your copy looks pretty close to stock except for the window manager that you are running.


How much does Cygwin's XFree depend on the (traditionally)
user-controlled .xinitrc file, to work properly?  Does it also depend
on specific Cygwin things in ~/.Xresources?

Not sure what you are asking here... I don't think the things you are worried about matter in this case.


I'll zip up and attach the files, anyway.  I've included an XWin.log
from a failure when started with -multiwindow.

Archive:  /u/luke/xwin.zip
  Length     Date   Time    Name
 --------    ----   ----    ----
     1698  04-01-04 14:22   .xinitrc
      509  11-06-02 17:31   .Xresources
      688  03-17-04 14:53   cygwin/startx.bat
     3857  04-01-04 14:25   cygwin/tmp/XWin.log
 --------                   -------
     6752                   4 files


So if I remove the "exec wmaker" from .xinitrc, X starts and stops
instantly.  So I add an "xterm" at the end of .xinitrc (since X doesn't
realise the wmaker would have started lots of windows from its saved
workspace state if it had been given a few seconds to run).


Yeah, you have to have a "magic client" that is started with an exec at the end of your .xinitrc, otherwise the behavior that you described is exactly what is supposed to happen.


Yep, I recognised the behaviour.


I think you can override the defaultserverargs in your .xinitrc so that you could have a .xinitrc that both starts its own wm and prevents startx from passing "-multiwindow" to XWin.exe. I'm not an xinit/startx expert, so you'll have to look for docs on that elsewhere.


Are there any docs on -multiwindow and using the Windows desktop as
your window manager?


It looks like no window manager is running at all.

I wonder how I can run multiwindow with wmaker as my window manager?
Maybe keep the "exec wmaker" and set display to :1 ...  No, "startx
-multiwindow -- :1" triggers the "no program named
"/usr/X11R6/bin/xterm" in PATH" crash.  So I don't quite see how to
achieve that.  I tried xinit -multiwindow but that started up a full
desktop.


Seriously, the easiet way is to use startxwin.bat and modify it according to the instructions in that file. Or, if you really want to start from a Cygwin shell, use startxwin.sh and modify it accorinding to its instructions. There are pre-made lines that are just commented out that start a window manager etc.


Ah, yes, I knew there were some new startup scripts but I couldn't
remember what they were.  I'm still using the version of /startx.bat
that I modified, and pointed to from a desktop shortcut I've set up.


Lets have you try these things first and see where it goes.


Absolutely. Thanks, Harold.

I tried startxwin.sh without a lot of joy.  I can't see where it gets
its starting set of windows, and I can't see how to start up any
windows conveniently either.  (Currently it has -multiwindow and
-clipboard hardwired in - it doesn't seem to do any argument
processing.)

I may change that and send you a revised one, if you'd be interested.

Perhaps my question is, why would anyone choose to run multiwindow
using the Windows desktop?  There seems to be no easy way to start X
applications, except presumably from the command line.

It doesn't seem to use .xinitrc how I'd expect.  Sure, if I add an
"exec wmaker" then it all fails because it thinks a window manager (the
Windows desktop) is running, and bails out.  But if instead I add an
xmessage "Quit X" at the end instead, that never appears.  I just end
up with the "console window" with yellow text on black background, and
an icon in the Windows tray, that I can use to exit X or unhide the
root window.

If I unhide the root window, then the X cursor disappears.  Nor can you
call up a root menu, since I suppose Windows doesn't understand that.
And I know of no way to get a root menu in the Windows + multiwindow
"environment" or mode.

Also, as I said, if I unhide the root window in this mode you can't
exit from X.  You can request to do so, but it doesn't exit until you
rehide the root window.  You can also exit from the taskbar icon if you
have the root window hidden, but not if the root window is displayed.

Hope this makes some sense, and/or is of some use!

Oh: given that I had my own .xinitrc file, how can I get a copy of the
one Cygwin would have installed?  Move it aside and re-run setup?

luke

----------------------- .xinitrc -------------------------

This looks fine to me.


----------------------- cygwin/startx.bat -------------------------
@echo off

rem	The D: gets replaced by the real Cygwin drive during installation:
C:

chdir \cygwin\bin

rem	For use with sample .profile: stop the exec in user's .profile for the
rem	case where we're really starting the X server.
set STARTX=df

rem
rem 	Comment out the -rootless line if you *do* want the whole X desktop.
rem	-multiwindow had both hopeless performance and inability to get
rem	character input into an rxvt or xterm window under WindowMaker.
rem

	bash --login -c "PATH=$PATH:/usr/X11R6/bin; startx"
rem	bash --login -c "PATH=$PATH:/usr/X11R6/bin; startx -- -rootless"
rem	bash --login -c "PATH=$PATH:/usr/X11R6/bin; startx -- -multiwindow"

pause

Yeah, there is the money shot baby. This whole time you've been using a poorly named file that you guys created on your own called "startx.bat", while we've been assuming that you've been reporting a legitimate problem with a file that we are distributing called "startx", living in /usr/X11R6/bin/startx.


Now that we know which script we are trying to fix (your startx.bat, not our startx shell script), there are two things that I see wrong:

1) You should not need to set the PATH in the -c argument to bash. You should have a file called /etc/profile.d/00XFree86-bin.sh that does this for you. You can test this by removing your -c command altogether and observing that the PATH still has /usr/X11R6/bin in it. I recommend removing your setting of the PATH unless you can prove that it does not work otherwise because it is likely to continue to cause confusion to anyone looking at in the future.

2) We keep telling you to either edit /usr/X11R6/startx and change the line:

defaultserverargs="-multiwindow -clipboard"

to:

defaultserverargs=""

-or-, pass " -- :0" to startx. I think there has been a lot of confusion here by your naming your batch file "startx.bat"... what you need to do in this case is edit your startx.bat and change the end of the line that reads "[...] startx" to be "[...] startx -- :0". That will prevent -multiwindow from being passed by the defaultserverargs in /usr/X11R6/startx.

Okay, this is really getting into the nitty-gritty now about a problem with a script that you guys wrote, so I can't really spend anymore time on this issue. You'll either have to look up generic resources on how to write proper shell scripts, batch files, and use xinit, or you'll have to help that someone else here helps you. Sorry I can't do anymore.

Harold


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]