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: How to get xdm working?


> 
> CYGWIN_95-4.0 myhost 1.5.3(0.90/3/2) 2003-09-01 13:15 i586 unknown
> unknown Cygwin
> 
> I am running these tests on a Samba partition which is mounted
> on the F: drive.
> 
> I can make an XDMCP connection using startxdmcp.bat or the command line
> Xwin.exe -query remotehost. (Having learnt to mount the /tmp as a bin
> type mount! )
> 
> This works fine and I can get the indirect list of machines on my net
> served up to me via the remotename machine. Connect to that machine
> and get the remote xdm to give me a login prompt.

To make my life simple I decided to retreat from running X and xdm
separately under cygwin for the moment. 
So I have enabled the following line in the /etc/xdm/Xservers file:
  localhost:0 local /usr/X11R6/bin/X

I put the "localhost" infront of :0 n the Xervers file because of my own
now redundent attempts to do the xauth for xdm. But in the archives there
are comments that this might be a good thing to do for other reasons so
I decided to leave it in. If I can fix my other problems I'll come back
to it.

I have created a root user in the /etc/passwd file and another ordinary
user with no password entry.

I can run xdm inside an strace as a -nodaemon and it does not crash:
strace xdm -nodaemon >/tmp/log

I had to alter the line in the /etc/X11/xdm/xdm-config
from
  DisplayManager.*.authFile: Xauthority
to
  DisplayManager.*.authFile: /etc/X11/xdm/authdir/authfiles/Xauthority

Because otherwise xdm put the Xauthority file into home dir
of root ( I am not sure if it was just putting it into ./ or into $HOME/
because I was running xdm there -- life is too short to test this).

I have added a script /etc/profile.d/xauthority.sh
  if [ -f /etc/X11/xdm/authdir/authfiles/Xauthority ]
  then
	  XAUTHORITY=/etc/X11/xdm/authdir/authfiles/Xauthority
	  export XAUTHORITY
  fi
So that all users get the xdm generated XAUTHORITY file.

The local "/etc/hosts" file was linked to C:/windows/hosts
which on my version of Windows 95 does not exist. So for
the moment I have removed the link and created it locally
with 2 lines:
	127.0.0.1 localhost
	192.168.0.10 thismachine

I have messed around with 127.0.0.1:0.0 but it does not seem
to make a difference. (Monkey sees in cygwin, archives monkey tires)

To try to make the local display as permissive a possible I have created
/etc/X0.hosts file and put all the combinations of the localhost and
its hostname.


I have been able to get the login box under xdm and enter either root
or the other user without a password. But the execution of an xterm as
an .xsession under these users always fails.

The fail in the same way for both users and the error is logged
in $HOME/.xsessions-errors:
	_X11TransSocketOpen: socket() failed for tcp
	_X11TransSocketOpenCOTSClient: Unable to open socket for tcp
	_X11TransOpen: transport open failed for tcp/localhost:0
	/usr/X11R6/bin/xterm Xt error: Can't open display: localhost:0

I can replicate this error without having to use xdm. If I open a bash
window using the windows cygwin.bat file from an MS windows user called
"root" and then execute an xterm onto an xserver on another machine
(which has already been made agreeable to this with a "xhost +") eg
	xterm -display remotehost:0
then the window opens. 
But if I now invoke "su - root" or "login root" and try the same command
I get the error:
	_X11TransSocketOpen: socket() failed for tcp
	_X11TransSocketOpenCOTSClient: Unable to open socket for tcp
	_X11TransOpen: transport open failed for tcp/remothost:0

I also get this if I "su -" and then run bash --login -i

I have trawled the archives and I can not find any thing which explains
this failure. I did find http://sources.redhat.com/ml/cygwin/2001-04/msg01458.html
: * Subject: Windows path an logins.
: [snip]
: NB: This error is NOT caused by missing /etc/hosts entry!
: 
: This error is produced by the network not being able to start. It is
: because the windows path is not in the SHELLS path environment. Is there a
: [snip]

But taking the path which exists for the successful opening and importing
it into the failure did not fix the problem.

I have seen some mention in the archives that there is a difference beteween
UNIX sockets and Window sockets which might related to this problem. But
I don't know enough to say one way or another.

BTW thanks Igor for pointing out /dev/mem exists. But I can not use it with
sum (as xdm does) because it is not readable by root. I can not sum 
/dev/urandom either (it just hangs).  I think the neatest I can come up with
at the moment is to use the xdm Xauthority file as its own seed.

Can any one shed some light on why I get the _X11TransSocketOpen failure?

Regards Philip


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