> -----Original Message-----
> From: Jeremiah Campbell [mailto:[EMAIL PROTECTED]]
> 
> I seem to be having a problem with one user that can connect to his X
> server but cannot start any X application or window manager on it. It
> always throws an error about like this:
> 
> <snip>
> 30/05/02 16:35:44 Listening for VNC connections on TCP port 5902
> 30/05/02 16:35:44 Listening for HTTP connections on TCP port 5802
> 30/05/02 16:35:44   URL http://<hostname>:5802
> Xlib: connection to "unix:2.0" refused by server
> Xlib: Client is not authoriz
> 30/05/02 16:35:44 Got connection from client <ip address>
> 30/05/02 16:35:44 Protocol Version 3.3
> <snip>
> 
> The same machine works fine for my login and any other user name I
> create. I have checked that he is _not_ setting his DISPLAY variable.
> The only place I have found this "unix:2.0" is in the vncserver perl
> script. The following two lines are snipped from it.
> 
> <snip>
> system("xauth -f $xauthorityfile add $host:$displayNumber . $cookie");
> system("xauth -f $xauthorityfile add $host/unix:$displayNumber .
> $cookie");
> <snip>
> 
> I have removed his .Xauthority file in his home dir and reran the
> server and still this did not fix it.

Just removing the .Xauthority file does not remove the X11 security, it only
makes it harder to gain X11 access as this file is used in the `xauth`
administration.

>From your messages, I understand vncviewer can connect to vncserver and it
can be used. Hence the vnc side of the system works. I see your problem is
X11 security: applications are not allowed to access the X11 display. Some
things to do:

To realy remove the X11 security so everyone can access the desktop: start
Xvnc (or vncserver) with the `-ac` option. This removes all X11 security, as
if the user adds a `xhost +` to the ~/.vnc/xstartup file.

X11 security can be verry complicated if you don't know details on the X11
system. Check manual pages on commands like `xauth` and `xhost` to gain
knowledge on X11 security.

As for the $DISPLAY variable: it's the address for the application to put
it's windows on. Most X11 apps have the option '-display' to overrule the
$DISPLAY settings. That you cannot find any more invocations of setting
$DISPLAY is true, it is generally passed to all subprograms.

TIP: To avoid problems like the above, have a look at this setup:
http://www.sourcecodecorner.com/articles/vnc/linux.asp. It gives a login in
a vnc window as if at the local console. The base is for linux and with a
little unix admin knowledge, you can arange it for solaris.

CBee
_______________________________________________
VNC-List mailing list
[EMAIL PROTECTED]
http://www.realvnc.com/mailman/listinfo/vnc-list

Reply via email to