madscientist / msjnc

MadScientist Juniper Network Connect Session Manager
MIT License
69 stars 20 forks source link

Remote command line execution #1

Closed brutog closed 11 years ago

brutog commented 11 years ago

I've found this script very useful...thank you for your work.

I have a use case that is presenting problems. I am trying to use a remote machine as a "VPN portal". I log into the machine via SSH, and try to start msjnc using my typical command line options but I get:

Gtk-WARNING **: cannot open display: at /usr/lib/perl5/Gtk2.pm line 138.

I didn't think it opened a window when I used command line locally on the machine, but it seems I'm erroring out because it can't find a display to draw a window on. Is there an easy workaround? Or perhaps this is a feature request that simply says "don't do any GUI stuff"?

Thanks, bru

madscientist commented 11 years ago

Can you specify what "my typical command line options" are?

There's an option --connect (which I appear to have left out of the documentation :-/) which should allow you to do purely CLI-based connections. Note you MUST have a GUI interface to create or edit profiles, but once you have a working profile it should be possible to start the session from the terminal with --connect.

Alternatively, when you ssh to the remote machine be sure to pass the -X option to ssh ("ssh -X me@remote"), which will allow you to run graphical apps with the display redirected through your ssh secure tunnel.

madscientist commented 11 years ago

Whoops. I'm not so familiar with github bug tracking :-)

brutog commented 11 years ago

These are the aliases I use (I do already have a profile).

alias vpn='msjnc --profile sc4 --connect' alias vpnd='msjnc --disconnect'

I'll probably need to use the X forwarding method until another solution is found. I'll test that later today to see if that works. Thanks.

madscientist commented 11 years ago

Hm that should work. I'll have to test it again but won't be able to do that until later.

madscientist commented 11 years ago

Should be fixed in version 2.5.

brutog commented 11 years ago

Thanks for fixing!