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,

You need to use startxwin.bat, which is in /usr/X11R6/bin.

You will need to modify the file, ever so slightly, to connect to a remote machine instead of launching local apps.

In fact, such a modified file is attached.

I think I am going to make a new release of the startup packages now that contains this file and changes the default startxwin.bat to use -multiwindow.

Harold


Ruth Ivimey-Cook wrote:


Folks,

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?

Thanks

Ruth

@echo off
SET DISPLAY=127.0.0.1:0.0

REM
REM Change REMOTE_HOST to the IP address or hostname of your remote host,
REM unless your remote host happens to have the address 10.0.0.1.
REM

SET REMOTE_HOST=10.0.0.1


REM 
REM The path in the CYGWIN_ROOT environment variable assignment assume
REM that Cygwin is installed in a directory called 'cygwin' in the root
REM directory of the current drive.  You will only need to modify
REM CYGWIN_ROOT if you have installed Cygwin in another directory.  For
REM example, if you installed Cygwin in \foo\bar\baz\cygwin, you will need 
REM to change \cygwin to \foo\bar\baz\cygwin.
REM 
REM This batch file will almost always be run from the same drive (and
REM directory) as the drive that contains Cygwin/XFree86, therefore you will
REM not need to add a drive letter to CYGWIN_ROOT.  For example, you do
REM not need to change \cygwin to c:\cygwin if you are running this
REM batch file from the C drive.
REM 

SET CYGWIN_ROOT=\cygwin

SET PATH=.;%CYGWIN_ROOT%\bin;%CYGWIN_ROOT%\usr\X11R6\bin;%PATH%


REM
REM Cleanup after last run.
REM

if not exist %CYGWIN_ROOT%\tmp\.X11-unix\X0 goto CLEANUP-FINISH
attrib -s %CYGWIN_ROOT%\tmp\.X11-unix\X0
del %CYGWIN_ROOT%\tmp\.X11-unix\X0

:CLEANUP-FINISH
if exist %CYGWIN_ROOT%\tmp\.X11-unix rmdir %CYGWIN_ROOT%\tmp\.X11-unix


REM
REM Startup the X Server and attempt to connect to a remote XDM server.
REM 
REM The error "Fatal server error: could not open default font 'fixed'" is
REM caused by using a DOS mode mount for the mount that the Cygwin/XFree86
REM fonts are accessed through.  See the Cygwin/XFree86 FAQ for more 
REM information:
REM http://xfree86.cygwin.com/docs/faq/cygwin-xfree-faq.html#q-error-font-eof
REM

if "%OS%" == "Windows_NT" goto OS_NT

REM Windows 95/98/Me
echo startxwin.bat - Starting on Windows 95/98/Me

goto STARTUP

:OS_NT

REM Windows NT/2000/XP
echo startxwin.bat - Starting on Windows NT/2000/XP

:STARTUP


REM
REM A few examples of initiating an XDMCP connection are
REM given below.  The default is to connect to a specified host
REM with -query.  The second example connects to the first
REM responding host with -broadcast.  The third example shows
REM how to connect to the font server of a remote host.
REM 

REM Connect to a specified machine.

start XWin -query %REMOTE_HOST% -nodecoration -lesspointer


REM Connect to the first XDM machine to respond.

REM start XWin -broadcast -nodecoration -lesspointer


REM Connect to a specified machine and a specified font server.

REM start XWin -query %REMOTE_HOST% -nodecoration -lesspointer -fp tcp/%REMOTE_HOST%:7100

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