This is an old revision of the document!
x2goclient-cli was developed for testing purposes, but is still quite usable.
There are some issues with it, the biggest problem is that after a session has ended there are still ssh tunnels running between the client and the server. This will mitigate that problem, add these lines after the last line in x2goclient-cli:
my @SSHS = (); my $ssh; my $pid; my @ssh_split = (); # print "$0: Checking ssh sessions ...\n"; open(GR_SSH,"ps ux | grep \"ssh -p $port .*-N -L $gr_port:localhost:$gr_port $user\@$server\" | grep -v grep |"); @SSHS = <GR_SSH>; close(GR_SSH); if ($sound) { open(SND_SSH,"ps ux | grep \"ssh -p $port .*-N -R $snd_port:localhost:$snd_port $user\@$server\" | grep -v grep |"); push(@SSHS,<SND_SSH>); close(SND_SSH); } if (scalar(@SSHS) > 0) { foreach $ssh (@SSHS) { $ssh =~ s/\s+/\|/g; @ssh_split = split(/\|/,$ssh); $pid = $ssh_split[1]; # print "$0: Ending ssh session with pid $pid ...\n"; system("kill -1 $pid"); } } else { # print "$0: No ssh sessions found.\n"; }