Hello again list.
I am having some trouble when trying to set the environment of the
newly opened channel. This is a ChannelExec instance, where I would
like to set the name/value pairs I can get calling System.getEnv(). I
tried also with the test Example/Shell.java (where the Channel is not
of type exec) and it doesn't work for me. Using something as simple as
// Set environment variable
((ChannelShell)channel).setEnv("ALTERNATE_EDITOR", "vim");
, without having changed anything else in the application, makes
channel.connect() give me the following exception:
"com.jcraft.jsch.JSchException: failed to send channel request".
If I don't manually set the environment value, all is fine. I would
like to know if there's a way around this, and in particular if
there's a way to pass arbitrary values to a ChannelExec instance.
~~~~
On another note, what's the suggested way to handle X11
authorization by cookie? That is, X11 Forwarding
works (finally!) fine if I manually call `xhost` to allow
connections before running my applications. I would like to use
Session#setX11Cookie to do this, but haven't found a reliable and
portable way to get the session cookie, short of calling `xauth
list` and parsing the output which really is not doable in my
scenario.
Thanks.
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users