Discussion:
Xvnc auth errors
James H. Cloos Jr.
2001-01-12 14:12:01 UTC
Permalink
I just grabbed the current version from the main web site.
(vnc-3.3.3r2_x86_linux_2.0.tgz). When I try to use it I
get this in the log:

===============================================================================
AUDIT: Fri Jan 12 07:02:59 2001: 7356 Xvnc: client 1 rejected from local host
Xlib: connection to ":1.0" refused by server
Xlib: Client is not authorized to connect to Server
xrdb: Can't open display ':1'
===============================================================================

Each of the commands which failed to work are in the ~/.vnc/xstartup; the only
change I made from the default (so far) is the wm.

This took me some time to debug. The problem is that openssh w/ X forwarding
on sets not just DISPLAY but also XAUTHORITY as it uses /tmp/ssh-XXXXX/cookies
rather than ~/.Xauthority for its own DISPLAYs.

The fix is for vncserver to $ENV{XAUTHORITY} = $xauthorityFile; and possibly
also to delete $ENV{DISPLAY};.

-JimC
--
James H. Cloos, Jr. <http://jhcloos.com/public_key> 1024D/ED7DAEA6
<***@jhcloos.com> E9E9 F828 61A4 6EA9 0F2B 63E7 997A 9F17 ED7D AEA6
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to ***@uk.research.att.com
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------
Tim Waugh
2001-01-12 14:24:36 UTC
Permalink
Post by James H. Cloos Jr.
The fix is for vncserver to $ENV{XAUTHORITY} = $xauthorityFile; and possibly
also to delete $ENV{DISPLAY};.
Indeed. (This was discussed on this list a month or two back.)

Here's the patch we're shipping:

--- vnc_unixsrc/vncserver.xauth Tue Oct 31 15:11:26 2000
+++ vnc_unixsrc/vncserver Tue Oct 31 15:10:35 2000
@@ -37,7 +37,9 @@
$desktopName = "X";
$vncClasses = "/usr/local/vnc/classes";
$vncUserDir = "$ENV{HOME}/.vnc";
-$xauthorityFile = "$ENV{HOME}/.Xauthority";
+unless ($xauthorityFile = "$ENV{XAUTHORITY}") {
+ $xauthorityFile = "$ENV{HOME}/.Xauthority";
+}

$defaultXStartup
= ("#!/bin/sh\n\n".


Tim.
*/

[demime 0.97b removed an attachment of type application/pgp-signature]
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to ***@uk.research.att.com
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------
Loading...