hmmm..
It needed not be as complex as hacking the vncserver perl script.
vncserver script creates the cookie file and passes it to the Xvnc
server it launches as the auth parameter
Also, you can use vncserver to override this behaviour by passing your
own xauth file.
So if you could say 
 
# vncserver -auth /home/<username>/.Xauthority
 
The Xvnc will use the Xauthority file in the user's home directory.
Now if you run from your shell
 
# DISPLAY=:1 XAUTHORITY=/home/<username>/.Xauthority <xapplication>
This should work for you.
 
Also, try this without XAUTHORITY option, as that may be the default
value anyway.
 
Vamsi

>>> "Robert Echlin" <[EMAIL PROTECTED]> 04/19/05 7:06 PM >>>

> -----Original Message-----
> From: Dave Love [mailto:[EMAIL PROTECTED] 
> Sent: Monday, April 18, 2005 1:41 PM
> To: Robert Echlin
> Cc: vnc-list@realvnc.com
> Subject: Re: X authentication
> 
> "Robert Echlin" <[EMAIL PROTECTED]> writes:
> 
> > every copy of bash that I run generates a different XAUTHORITY
...
> Presumably your setup is different, but normally Fedora 3 running
gdm
> puts xauth cookies for the console in /var/gdm/:0.Xauth,
> i.e. something like this will work (as root) with VNC on 0.0:
> 
> # DISPLAY=:0.0 XAUTHORITY=/var/gdm/:0.Xauth vncconfig -list

I am not running VNC on :0, as confirmed by variations of your
command:
(sudo did not work - it assumed that DISPLAY was an executable)

>su root -c "DISPLAY=:0 XAUTHORITY=/var/gdm/:0.Xauth vncconfig -list
>Password:
>No VNC extension on display :0

>DISPLAY=:0.0 XAUTHORITY=/home/builder/.XauthVG!zFg vncconfig -list
>No VNC extension on display :0

-- Thanks, Vamsi, for the ps parameters "ps ax | grep Xvnc" - it
showed
(partial list) 
>Xvnc :1 ... -auth /home/builder/.Xauthority ...
This confirms VNC's display and Xauth file

>DISPLAY=:1 XAUTHORITY=/home/builder/.Xauthority vncconfig -list
(result = long list of names, one per line, including:
localhost,desktop, rfbport,rfbwait, httpPort, httpd, rfbauth,
PasswordFile)

There are no listings in /var/gdm that include a ":1".

However, it looks like I can manually run my programs in :1 from :0
using a command line that sets DISPLAY and XAUTHORITY before the main
program is run. Thank you, Dave!

Since the /var/gdm stuff is only useful for root processes, I can see
why a bash process might be given a copy of it with a unique name. 

How early are the Xauth files created in /var/gdm?
Would they be available to a script run from /etc/rc.d/rc.local, or is
there a race condition?
I could use sudo to make a copy of the Xauth file in /var/gdm to
replace
/home/builder/.Xauthority before running vncserver.
Would that give it the same cookie as the :0 (regular X) display?
Or is it replaced by vncserver, so that I would have to hack the
vncserver perl script to do this?

Anyway, assigning DISPLAY and XAUTHORITY on the command line looks
like
it will work for me.

Robert
_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list
_______________________________________________
VNC-List mailing list
VNC-List@realvnc.com
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list

Reply via email to