Cannot open a xterm on a remote machine through ssh
Hello everyone. I am trying to run nodes on multiple machines, run a "talker" node on a machine called "hxj" and a "listenner" node on a machine called "lili"(the talker and listener nodes are from the tutorials). I want to see the output of listener on the screen, I add a launch-prefix attribute for the node "listener", so I wrote my launch file like this:
<launch>
<machine name="hxj" address="hxj-ideapad.local" user="hxj" env-loader="/opt/ros/indigo/mine_env.sh" default="true"/>
<machine name="lili" address="lili-pc.local" user="lili" env-loader="/opt/ros/indigo/mine_env.sh" default="true"/>
<node pkg="beginner_tutorials" name="talker" type="talker" machine="hxj">
</node>
<node pkg="beginner_tutorials" name="listener" type="listener" machine="lili" output="screen" launch-prefix="xterm -e"/>
</launch>
And I got an error like this:
[lili-pc.local-0]: ... done launching nodes
[lili-pc.local-0]: [listener-1] process has died [pid 3779, exit code 1, cmd xterm -e /home/lili/catkin_ws/deve/lib/beginner_tutorials/listener __name:=listener __log:=/home/lili/.ros/log/a0ecf616-5732-11e4-ad32-8ca982b606e6/listener-1.log].
log file: /home/lili/.ros/log/a0ecf616-5732-11e4-ad32-8ca982b606e6/listener-1*.log
[lili-pc.local-0]: all processes on machine have died, roslaunch will exit
remote[lili-pc.local-0]: xterm: Xt error: Can't open display:
xterm: DISPLAY is not set
I googled this error, the problem may be that it is not allowed to open a window through ssh, I tried to modified the configuration file of sshd /etc/ssh/sshd_config, but cannot find the corresponding variable. Who can give me any advice?