Friday, February 29, 2008

Setting up a Remote Connection

One piece of functionality I wanted was the ability to log in remotely and run applications while I'm watching a video in Elisa.

The first step to this process was creating an additional user, which is pretty self explanatory. Basically I will have two users, a remote-user, which I will use for running applications, downloading, surfing the net, or whatever else; and a media-user, which will run Elisa.

So to create another user go to System -> Administration -> Users and Groups and add a new user. Make sure to make this user an administrator.

Now that you have two users, the next step is to install NX server. This will serve as a Remote Desktop server that you can connect to from any other machine that has the client installed.

Before you install NX Server, make sure to install ssh first:

sudo apt-get install openssh-server

To install nx server, visit the following web site:

You'll need to install the client, node, and server (in that order) on the host machine. Click the download buttons to download and install each of the programs.

To start the service, just enter the following in the terminal:

sudo /usr/NX/bin/nxserver --start

That should do it. The service should automatically start itself in the event of a reboot / shutdown.

To connect to your machine from another computer, go to the same web site on the other computer and download just the NX Client.

If you're setting this up on a laptop, I recommend setting up two connections, one to be used when you're home and on the same LAN, and one to be used when you're away from home.

Open the client and the connection wizard will pop up. To setup the home connection, type in a name for the connection (can be anything), for the host, type in the local IP address (generally 192.168.1.???), leave the port at 22 (unless you changed it), and select LAN for the connection type. Save the connection and when the login screen comes up, enter the login / password information for the remote-user you created on your media center PC.

To setup an away-from-home connection, open the client again to see the connection wizard. Again type in a name for the connection, the IP address of the computer (you may have to look this up as most people have dynamic IP addresses - there is an alternative method I will discuss in a minute), leave the port as is, and select ASDL (most likely) for your connection type. Save the connection. You will again be prompted for login information and again enter the login / password for the remote-user on your media center PC.

The alternative to using an IP address (which often changes) in the above step is to use a dynamic DNS service. I use no-ip's free ManagedDNS service:

Register for this free service from your home network, and you won't have to remember your IP address anymore. You can select a user name and a domain name (like '') and can enter that instead of the IP address in the above step. Just make sure to forward port 22 in your router to the correct local machine. (this means using a static IP address on your local network). This will also work for ftp-servers or web servers or whatever. It basically is a domain configured to route traffic to your router. When you type in a port, your router will forward it to whatever machine you've specified in your router settings.

Continued: Auto-startup of LIRC and Elisa

No comments: