Hi, +-From: Mattia <[email protected]> ---- |_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 ------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/jsch-users
