Net::SSH::Perl and X11 forwarding

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I want to run X application remotely. I use Net::SSH::Perl and specify
option 'ForwardX11 yes'.
Also in my .ssh/config this option is enabled but X11 connection is not
redirected - application doesn't run. I get an errror 'Could not open
This is the code snippet:
$cmd = '/some/X/appl';
$ssh = Net::SSH::Perl->new($host, port => 22, options=>["ForwardX11 yes"]);
$ssh -> login($login, $p);
($out,$err,$ex) = $ssh->cmd($cmd);
print "out:$out\n","error:$err\n","exit: $ex\n";

Running the application from the command line or through ssh commands
wrapper Net::SSH is ok.
Does anyone have any suggestions?

Thanks Radek H.

Re: Net::SSH::Perl and X11 forwarding

Radomir Hejl wrote:
Quoted text here. Click to load it

is the DISPLAY-variable set correct in the environment where the cmd is
executed? Maybe its not a perl-problem, but the launched application
tries to connect a non-existant local X-server?



Re: Net::SSH::Perl and X11 forwarding

Quoted text here. Click to load it

When I run ssh through Net::SSH modul I can connect to X-server. But through
Net::SSH::Perl I cannot.
So I suppose something's wrong with Net::SSH::Perl module regarding X11
Thanks, Radek

Site Timeline