Sunday, November 13, 2011

Playing with X

I took some time this week-end to play with X and remote access to computers.

First, I set up a virtual machine running Ubuntu Server edition 11.11. The server edition is plain Ubuntu without the Gnome front-end. It's a much better configuration for a server -- although it does require that one perform administration tasks on the command line. I had to refresh my memory of the 'apt' and 'aptitude' commands.

Second, I configured the virtual machine with a bridged network connection, so it will appear on my local network.

Then I configured Ubuntu Server to use a static IP address. That took some research (a minimal amount, thanks to Google) and some experiments (keep the "auto eth0" line in /etc/network/interfaces) and some tests with 'wget' to ensure that the configuration was correct.

Finally I installed ssh-server and 'xclock' on the Ubuntu Server and tried some connections. Connecting from a Windows PC running Xming and putty worked, and I was able to see the clock. Connecting from an Ubuntu PC failed at first; I had to use the 'ssh -X' command to connect, an 'export DISPLAY=192.168.1.102:0.0' command to identify my display, and also the 'xhosts +' command to allow connections.

I want to create an /etc/X0.hosts file; that should eliminate the need for the 'xhosts +' command. I'm not sure how I can auto-configure the DISPLAY variable... or if that is even desirable.

All in all, I feel pretty good about my accomplishments. Remote access with Linux is quite different from sharing desktops in Windows. The Linux approach has more possibilities: run X applications in my local display, share a KDE session, or share the whole desktop. Windows seems to be limited to the 'share a desktop' approach. (Can one SSH into Windows? That is, get just terminal -- a CMD.EXE terminal -- session?)

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete