This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
xhost problem?
- From: Felipe Gasper <fgasper at uiuc dot edu>
- To: cygwin-xfree at cygwin dot com
- Date: Thu, 05 Jun 2003 22:04:14 -0500
- Subject: xhost problem?
- Reply-to: cygwin-xfree at cygwin dot com
Hello,
Since Cygwin/XFree86 now has a functioning rootless mode, I would like to start
it up when Windows starts up. I have two computers networked: my Windows machine
and a FreeBSD box that does web serving, mail, DHCP/NAT, etc. Since I often
connect to the FBSD box via serial terminal over a null modem, I use xhost to
allow it to run applications on the Cygwin/XF86 server.
My problem is that when starting up, the start script that I have in my Startup
directory doesn't do the xhost correctly. I have (essentially) the following in
my startup batch script:
-------------------
@echo off
SET DISPLAY=127.0.0.1:0.0
SET CYGWIN_ROOT=\cygwin
SET PATH=.;%CYGWIN_ROOT%\bin;%CYGWIN_ROOT%\usr\X11R6\bin;%PATH%
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
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
start XWin -multiwindow
run xhost +10.0.0.1
rem run xterm -sl 1000 -sb -rightbar -ms red -fg yellow -bg black -e
/usr/bin/bash
--------------
(The last two lines are one line in the batch file.) When this script runs at
system startup, the xhost line "doesn't take", as typing "xhost" from a Cygwin
bash shell indicates when the system is loaded. Two things, though, can make the
script do the xhost correctly: 1) uncommenting the xterm, or 2) running the
unmodified script after system startup.
Does anyone have any ideas on this? Hopefully this isn't somnething that's been
discussed to death; I did comb the archives and didn't find anything.
Thanks for reading!
regards,
-Felipe Gasper
Champaign, IL
--
-----------------------
Felipe M. L. M. Gasper
http://fgmusic.org
Judge ideas, not people.
Love people, not ideas.