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: xhost problem?


The problem you are having (as has been discussed before, and is readily
available in the archives) is due to the nature of the X server:  When the
last X client terminates its connection with the server, the server resets.

xhost is not a persistent client.  In your scenario, when it exits, there
are no other X clients.

There are several ways to solve the problem:
1) swap xhost and xterm
2) turn off resets (Xwin ... -noreset)
3) turn off access control (Xwin ... -ac)
4) use /etc/X0.hosts

Search the archive for "xhost reset" to find out more.

	-D.
---------------------
David Dawson
david.w.dawson@lmco.com
703-367-3885


-----Original Message-----
From: Felipe Gasper [mailto:fgasper@uiuc.edu] 
Sent: Thursday, June 05, 2003 11:04 PM
To: cygwin-xfree@cygwin.com
Subject: xhost problem?


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.


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