[X2go-dev] Bug in x2golistsessions with z-shell

Ralf Schulze ralf.schulze at ikp.uni-koeln.de
Tue Jul 21 18:45:52 CEST 2009


Hello together.

I stumbled over a bug concerning the resume of sessions with users that
have 'zsh' as their default shell. The problem is the following:

Somewhere during the resume something like 'export HOSTNAME &&
x2golistsessions' is executed. In 'bash' 'export HOSTNAME' sets the
environment variable to the current hostname. In 'zsh' (and probably
other shells, too) this fails leaving an empty HOSTNAME envirtonment
variable.

I suggest to change the perl script x2golistsessions to the following:

#!/usr/bin/perl
use strict;
use Sys::Hostname; # <-- New line

...

my $serv=shift;
if( ! $serv)
{
   #$serv=$ENV{'HOSTNAME'}; # delete this
   $serv = hostname;	    # <-- New line
}
...


This is probably much more robust and works fine here.


Ralf

P.S. I'm not on the list (yet), so please CC.

-- 
Institut für Kernphysik - Universität zu Köln --------------------
Zülpicher Str. 77    E-Mail: Ralf.Schulze at ikp.uni-koeln.de
50937 Köln           Fon:    +49 -(0)221 / 470-3649   
Germany              www:    http://www.ikp.uni-koeln.de/~rschulze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20090721/cab87319/attachment.pgp>


More information about the x2go-dev mailing list