On 02/10/2012 04:21 PM, Atsuhiko Yamanaka wrote: > Hi, > > +-From: Mattia<mat...@tekno-soft.it> ---- > |_Date: Fri, 10 Feb 2012 16:00:30 +0100 __ > | > |Just to make sure that I'm doing everything right: the parameters > |to setX11host and setX11port are supposed to be the hostname and > |port where I can find the X server that commands the display I > |want to show the program in, right? So if I'm connecting FROM the > |physical machine TO the virtual one (therefore I want to launch > |one of the programs installed in the virtual machine and show it > |in the physical machine display) I should pass to those functions > |the hostname of the physical machine (maybe whatever the command > |`hostname` spits out? or should 127.0.0.1 be enough?) and the > |port where the X server is listening to, right? so if `echo > |$DISPLAY` says something like :0 I connect to 127.0.0.1, port > |6000. > > No, ":0" means you are connecting to with the unix domain socket. > > | If it says :10, then 127.0.0.1, port 6010. What about the > |fact that (in the virtual machine) I have a value of :10.0 in the > |$DISPLAY variable? > > Try the following sample after uncommenting out lines for X forwarding, > where the string "xhost" should be a name of the host, where X sever is > running and "xhost +" has been exec-ed for it, > http://www.jcraft.com/jsch/examples/Exec.java > You don't have to care for $DISPLAY variable. The string "command" should > be just like "xdpyinfo", "xlogo". > > > Sincerely, > -- > Atsuhiko Yamanaka > JCraft,Inc. > 1-14-20 HONCHO AOBA-KU, > SENDAI, MIYAGI 980-0014 Japan. > Tel +81-22-723-2150 > Skype callto://jcraft/ > Twitter: http://twitter.com/ymnk > Facebook: http://facebook.com/aymnk > All right, now we're in business :D!
So, this works exactly as I though it would, now to understand why it does and what differs from my code. As far as I can see, the changes are all about the streams. I don't explicitly set to null the channel's input stream nor do I set it's error stream. And I don't have the while loop to read from the input stream. Might this be it? ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ JSch-users mailing list JSch-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jsch-users