Tuesday, May 28, 2013

Export Display over TELNET on Ubuntu 12.04 64 bit LTS


The solution is derived from this link

Edit the file /etc/lightgdm/lightgdm.conf and add the following line towards the end of file:

xserver-allow-tcp=true

and restart your system.

Open a terminal and run the following commands:

$ xhost +

allow any user to connect to the xserver


$ telnet  

Once you login, type in the following commands:

$ export DISPLAY=:0.0

$ xterm &

You should be able to see the terminal.

On your own computer (not the remote server), you can run the following command to verify if there is any "-nolisten" variable with tcp.

$ ps -ef | grep listen
nobody    1182   839  0 19:33 ?        00:00:00 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/var/run/sendsigs.omit.d/network-manager.dnsmasq.pid --listen-address=127.0.0.1 --conf-file=/var/run/nm-dns-dnsmasq.conf --cache-size=0 --proxy-dnssec
mayank    5323  5064  0 20:17 pts/0    00:00:00 grep --color=auto listen


As you can see, it is not there and hence things should work properly now.

2 comments:

awhan said...

telnet??? now that is highly insecure. the traffic is not encrypted and even your password travels in clear text.

what happened to good old ssh?

Swagat said...

I know ... I know. We still use SSH. However, we wanted to test if the connection will be faster if we use Telnet which does not use encryption. We were displaying videos over wireless and we found it slow ...

Anyway, Telnet did not solve the problem either ...