vncserver works but X don't show

Hugo van der Kooij hvdkooij "at" caiw.nl
Sun, 08 Mar 1998 21:39:22 +0000


On Sun, 8 Mar 1998, Manuel Clos, The Llanero Of The IRC wrote:

> Here's the problem :((((
> 
> rfbInitSockets: listening on TCP port 5901
> httpInitSockets: listening on TCP port 5801
> AUDIT: Sun Mar  8 16:58:43 1998: 401 Xvnc: client 1 rejected from IP
> 127.0.0.1 p
> ort 4
> Xlib: connection to "localhost.localdomain:1.0" refused by server
> Xlib: Client is not authorized to connect to Server
> xhost:  unable to open display "localhost.localdomain:1"
> AUDIT: Sun Mar  8 16:58:43 1998: 401 Xvnc: client 1 rejected from IP
> 127.0.0.1 p
> ort 260
> Xlib: connection to "localhost.localdomain:1.0" refused by server
> Xlib: Client is not authorized to connect to Server
> xrdb: Can't open display 'localhost.localdomain:1'
> AUDIT: Sun Mar  8 16:58:43 1998: 401 Xvnc: client 1 rejected from IP
> 127.0.0.1 p
> ort 772
> Xlib: connection to "localhost.localdomain:1.0" refused by server
> Xlib: Client is not authorized to connect to Server
> xsetroot:  unable to open display 'localhost.localdomain:1'
> AUDIT: Sun Mar  8 16:58:44 1998: 401 Xvnc: client 1 rejected from IP
> 127.0.0.1 p
> ort 1028
> Xlib: connection to "localhost.localdomain:1.0" refused by server
> Xlib: Client is not authorized to connect to Server
> twm:  unable to open display "localhost.localdomain:1"
> AUDIT: Sun Mar  8 16:58:45 1998: 401 Xvnc: client 1 rejected from IP
> 127.0.0.1 p
> ort 1284
> Xlib: connection to "localhost.localdomain:1.0" refused by server
> Xlib: Client is not authorized to connect to Server
> Error: Can't open display: localhost.localdomain:1
> Could not attach shm.
> AUDIT: Sun Mar  8 16:58:51 1998: 401 Xvnc: client 1 rejected from IP
> 127.0.0.1 p
> ort 6148
> 
> 
> Has anyone the solution?

Here goes the real answer:

> > Okay, heres an pieve of X.log
> > 
> > Any ideas??
> > <><><><><><><><><><><><><><><><><><>
> > Xlib: connection to "steel:1.0" refused by server
> 
> Obviously you have not allowed that system to work with that display. You
> even have to do it for your own system. A quick fix would be to add a line
> to the start of xstartup
> 
> 	xhost +localhost
> 
> or
> 	xhost: +client.domain.com 
>

If this is the Xauthority problem that I think it is, a neater solution is to
add an extra line to the vncserver script - where it stores the magic cookie
for the display "hostname:1", you also need to add the same cookie for display
"hostname/unix:1", i.e. where you have

  system("xauth -f $xauthorityFile add $host:$displayNumber . $cookie");

add another line

  system("xauth -f $xauthorityFile add $host/unix:$displayNumber . $cookie");


Cheers

Tristan

+--------------------------------------------------------------------+
|  Tristan Richardson                 Email:  tjr "at" orl.co.uk          |
|  ORL                                  Tel:  +44 1223 343000        |
|  24a Trumpington Street               Fax:  +44 1223 313542        |
|  Cambridge, CB2 1QA, UK               WWW:  http://www.orl.co.uk/  |
+--------------------------------------------------------------------+
|          ORL - The Olivetti & Oracle Research Laboratory           |
+--------------------------------------------------------------------+

I just hope that bugger called majordomo leaves this message intact.

Hugo.

	+------------------------+------------------------------+
	| Hugo van der Kooij     | Hugo.van.der.Kooij "at" caiw.nl   |
	| Oranje Nassaustraat 16 | http://www.caiw.nl/~hvdkooij |
	| 3155 VJ  Maasland      | (De man met de rode hoed)    |
	+------------------------+------------------------------+
    "Computers let you make more mistakes faster than any other invention in 
      human history, with the possible exception of handguns and tequila."
		(Mitch Radcliffe)