remote development / display environment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey guys,

I was fooling around with anaconda over the weekend running on a remote 
machine using X11 port forwarding through SSH.  Everything seems to work
fine except for there is one small bug if you try to run it with root 
priviledges.

I looked through the code and found there is a line which changes the 
Xauth file to point at the wrong place:

if os.environ.has_key('HOME'):
     os.environ['XAUTHORITY'] = os.environ['HOME'] + '/.Xauthority'

..

I've attached a patch which will check to make certain that SSH_TTY isn't 
set in the shell (which should indicate that this is a remote session) 
before reassigning the Xauth path.  It works with OpenSSH but I haven't 
tried it with any other flavours.

--Patrick.

--- anaconda.bak	Mon Jun 30 11:02:39 2003
+++ anaconda	Mon Jun 30 11:09:55 2003
@@ -151,7 +151,7 @@
 signal.signal(signal.SIGINT, signal.SIG_DFL)
 
 # Silly GNOME stuff
-if os.environ.has_key('HOME'):
+if os.environ.has_key('HOME') and not os.environ.has_key('SSH_TTY'):
     os.environ['XAUTHORITY'] = os.environ['HOME'] + '/.Xauthority'
 os.environ['HOME'] = '/tmp'
 os.environ['LC_NUMERIC'] = 'C'

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux