Troubles with exporting display
I recently started working from home with a Linux box. I want to telnet to a machine at work and export it's display back to my box. Here's what I do:
1) Connect to the office network VPN and jot down the internal IP addres it gives me 2) xhost <machine name> where <machine name> is the name of the machice I want to get the display from 2) Telnet to <machine name> 3) export DISPLAY=<ip adress I jotted down>:0 4) test by running something like xeyes No luck... :-( I then went into my router and added port forwarding of 6000 to my linux box as a friend suggested. Still no luck. Any ideas? Am I going about this wrong? -Adam |
What error do you get when running the x application?
Is X listening on port 6000? netstat -nlp Check your hosts allow list looks ok? xhost |
Quote:
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:32770 0.0.0.0:* LISTEN 1172/rpc.statd tcp 0 0 0.0.0.0:32771 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:13000 0.0.0.0:* LISTEN 8337/mozilla-bin tcp 0 0 127.0.0.1:29000 0.0.0.0:* LISTEN 4625/attvpnctl tcp 0 0 0.0.0.0:813 0.0.0.0:* LISTEN 1482/rpc.mountd tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1150/portmap tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN 4065/X tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN 1416/xinetd tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1340/cupsd tcp 0 0 0.0.0.0:796 0.0.0.0:* LISTEN 1464/rpc.rquotad udp 0 0 0.0.0.0:32768 0.0.0.0:* 1172/rpc.statd udp 0 0 0.0.0.0:2049 0.0.0.0:* - udp 0 0 0.0.0.0:32770 0.0.0.0:* - udp 0 0 0.0.0.0:793 0.0.0.0:* 1464/rpc.rquotad udp 0 0 0.0.0.0:924 0.0.0.0:* 1172/rpc.statd udp 0 0 0.0.0.0:810 0.0.0.0:* 1482/rpc.mountd udp 0 0 0.0.0.0:68 0.0.0.0:* 1080/dhclient udp 0 0 0.0.0.0:68 0.0.0.0:* 878/dhclient udp 0 0 0.0.0.0:7001 0.0.0.0:* - udp 0 0 0.0.0.0:111 0.0.0.0:* 1150/portmap udp 0 0 192.168.0.4:500 0.0.0.0:* 4625/attvpnctl udp 0 0 0.0.0.0:631 0.0.0.0:* 1340/cupsd Active UNIX domain sockets (only servers) Proto RefCnt Flags Type State I-Node PID/Program name Path unix 2 [ ACC ] STREAM LISTENING 125701 4185/gconfd-2 /tmp/orbit-adamc/linc-1059-0-21e3a52aa5b74 unix 2 [ ACC ] STREAM LISTENING 125709 4105/gnome-session /tmp/orbit-adamc/linc-1009-0-573840d8c393d unix 2 [ ACC ] STREAM LISTENING 126847 4198/bonobo-activat /tmp/orbit-adamc/linc-1066-0-3e91bef03546c unix 2 [ ACC ] STREAM LISTENING 126871 4200/gnome-settings /tmp/orbit-adamc/linc-1068-0-6e5e9cbc629d0 unix 2 [ ACC ] STREAM LISTENING 126936 4216/metacity /tmp/orbit-adamc/linc-1078-0-5dc72a25e6a8c unix 2 [ ACC ] STREAM LISTENING 127005 4220/gnome-panel /tmp/orbit-adamc/linc-107c-0-5f910e4885aa4 unix 2 [ ACC ] STREAM LISTENING 127649 4222/nautilus /tmp/orbit-adamc/linc-107e-0-5f910e48ac584 unix 2 [ ACC ] STREAM LISTENING 127675 4224/magicdev /tmp/orbit-adamc/linc-1080-0-5f910e48dd4a9 unix 2 [ ACC ] STREAM LISTENING 127713 4229/eggcups /tmp/orbit-adamc/linc-1085-0-4adff3c0638ec unix 2 [ ACC ] STREAM LISTENING 127803 4248/notification-a /tmp/orbit-adamc/linc-1098-0-78f135c24e9e7 unix 2 [ ACC ] STREAM LISTENING 128486 4253/mixer_applet2 /tmp/orbit-adamc/linc-109d-0-78f135c2db40c unix 2 [ ACC ] STREAM LISTENING 128512 4234/python /tmp/orbit-adamc/linc-108a-0-78f135c3ac55 unix 2 [ ACC ] STREAM LISTENING 385572 7210/gnome-terminal /tmp/orbit-adamc/linc-1c2a-0-2e8befa2c385d unix 2 [ ACC ] STREAM LISTENING 495221 8337/mozilla-bin /tmp/orbit-adamc/linc-2091-0-57fe5e4014d6b unix 2 [ ACC ] STREAM LISTENING 3392 1781/gdm-binary /tmp/.gdm_socket unix 2 [ ACC ] STREAM LISTENING 2860 1661/gpm /dev/gpmctl unix 2 [ ACC ] STREAM LISTENING 2911 1700/xfs /tmp/.font-unix/fs7100 unix 2 [ ACC ] STREAM LISTENING 120408 4065/X /tmp/.X11-unix/X0 unix 2 [ ACC ] STREAM LISTENING 125690 4181/ssh-agent /tmp/ssh-AMEa4105/agent.4105 unix 2 [ ACC ] STREAM LISTENING 126834 4105/gnome-session /tmp/.ICE-unix/4105 Thanx for any help... this stuff is new 2 me. |
Quote:
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN 4065/X But you may want to check your firewall rules too: iptables -nL What about errors when you run the X application? Can you also check that the correct IP is being allowed access to your X server by running: xhost |
iptables -nL shows the following:
Chain INPUT (policy DROP) target prot opt source destination ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED ACCEPT esp -- 0.0.0.0/0 0.0.0.0/0 ACCEPT 254 -- 0.0.0.0/0 0.0.0.0/0 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:500 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5900 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:12080 REJECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:113 reject-with icmp-port-unreachable ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 3 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 4 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 11 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 12 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 5 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 9 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 8 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 0 DROP all -- 0.0.0.0/0 0.0.0.0/0 Chain FORWARD (policy DROP) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination ================================================================================== If I do an xhost I get:access control enabled, only authorized clients can connect INET:isengard.btv.ibm.com INET:adam.btv.ibm.com And the remote machine machine I'm on is adam.btv.ibm.com. When I export the display and try xeyes... after about a minute I get: Error: Can't open display: <IP address> where <IP Address> is the IP address given to my box by the VPN software. I can ping this address from adam.btv.ibm.com so I know the connection's good. I tried telnetting back using this address as well but just get 'Trying...' |
You will need to add a rule to your firewall to allow incomming connections to port 6000, how you do it will probably depend on how your firewall is set up.
|
That did the tick...
Thanks! |
All times are GMT -5. The time now is 10:51 AM. |