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: Starting XWin in XDM mode with no console app?


Ruth Ivimey-Cook <Ruth.Ivimey-Cook@ivimey.org> wrote in
<5.2.0.9.0.20030514235333.00bb0c40@mailhost.ivimey.org>
in gmane.os.cygwin.xfree on Wed, 14 May 2003 23:59:03 +0100:

> I was wondering if there is any easy way around this issue. I normally use 
> XWin.exe in it's X-Terminal mode, connecting to an external Linux box. This 
> works fine, but the way I do it leaves a redundant Win32 console window open.
> What I do is run:
>     C:\cygwin\bin\bash.exe --login -c "/usr/X11R6/bin/XWin.exe -broadcast 
> -unixkill -fullscreen -dpi 100"
> from a taskbar shortcut.
> bash.exe is only needed because if omitted XWin.exe (or things it runs) 
> can't find various libraries (if I set the "Start In" dir to "\cygwin\bin", 
> I get complaints about libs in "\cygwin\usr\X11R6\bin", for example).
> However, running 'bash' creates itself a blank console window. The reason 
> running bash helps is, I assume, to do with setting up env vars in the 
> profile script.
> Is there any "cure" for this, or should I just ignore it?

The other two suggestions in this thread are good.

I use a variation on your approach though.

I have a two line script called doX:
--- CUT HERE ---
#!/bin/sh
XWin.exe -broadcast -unixkill -fullscreen -dpi 100 &
--- CUT HERE ---

I make sure this is in the PATH that exists after /etc/profile has
run. (I put it in /usr/local/bin for example.)

I then put the following in the Windows shortcut that launches it:
C:\cygwin\bin\bash.exe --login -c doX

I make the shortcut run minimized so that the bash console window only
appears in the taskbar. Once it has launched XWin it exits and the
taskbar entry disappears. Bingo. XWin.exe running with your normal
/etc/profile, ~/.bash_profile start-up done but without any extra
bash.exe hanging around. :-)

(Actually, my doX builds the command line from various bits depending
upon the value of `hostname` so that I can use one script on multiple
machines but you get the idea.)

Regards,

-- 
Sam Edge


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