new question

Tristan Richardson tjr "at" orl.co.uk
Wed, 01 Apr 1998 15:33:24 +0000


I'm a bit confused about what you're saying here.  From your original message
(subject: users?) I thought I had an idea what was happening.  I'll describe
the problem anyway, and then you can see if it's the same one you're having.

If an Xvnc crashes, or a machine is rebooted, then it leaves behind the unix
domain socket /tmp/.X11-unix/Xn.  When you start a VNC desktop with vncserver,
it checks the TCP ports and finds the lowest display number n which is
available.  However, if a previous Xvnc run by a different user has left
behind /tmp/.X11-unix/Xn then the new one fails because it can't remove this
file.  Possible workarounds:

  1. Remove the duff /tmp/.X11-unix/Xn - this should fix things for now, but
     won't stop it happening in the future.

  2. Remove the sticky-bit from /tmp/.X11-unix so that all users can remove
     files from there.  However this introduces a security loophole as
     discussed in http://www.orl.co.uk/vnc/faq.html

  3. Fix the vncserver script so that as well as checking TCP port
     availability, it also checks that there isn't a /tmp/.X11-unix/Xn when
     finding the lowest display number.  This is the best fix, but each time
     an Xvnc crashes (or the machine is rebooted without killing Xvnc first),
     its display number will be unavailable until someone with
     appropriate permissions removes /tmp/.X11-unix/Xn.  The reboot case
     could be handled by removing /tmp/.X11-unix/* from somewhere in the
     machine's startup scripts.


>>>>>>>>>>> Eric Banker writes:
>
> ok i seem to have figured the User problem out, the X servers listed
> there were all root. so i figured that out and now users can start the
> server but only one can be started at a time becasue it will only allow
> one window manager to be open at a time. I can't for some reason, unless
> i am root of course, open up more than one instance of a window manager.
> So say for instance i want to run qvwm on one server and another user
> wants to use that one also, well it won't allow that. even if you try
> and force a xterm up on the screen nothing happens. just a blank gray
> screen. Here is the output that i get from the server after it is
> started. :
> 
> rfbInitSockets: listening on TCP port 5902
> httpInitSockets: listening on TCP port 5802
> AUDIT: Sun Mar 29 04:49:47 1998: 1967 Xvnc: client 1 rejected from IP
> ************
> Xlib: connection to "eric:2.0" refused by server
> Xlib: Client is not authorized to connect to Server
> qvwm: Can't open display eric:2
> AUDIT: Sun Mar 29 04:49:47 1998: 1967 Xvnc: client 1 rejected from IP
> ************
> Xlib: connection to "eric:2.0" refused by server
> Xlib: Client is not authorized to connect to Server
> Error: Can't open display: eric:2
> rfbCheckFds: got connection
> 
> the rest of the file is as if it had started normally. The ****'s are
> just masking my ip. It was there. Anyways i can't figure this one out.
> If you an help thanks. If more info is needed let me know.
> thanks
> Eric


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           |
+--------------------------------------------------------------------+