Sunday, September 23, 2012

Working Remotely on Linux

The beauty of remote access is that nobody knows or cares what operating system you use, as long as you have client software that can access your firm's server. Most of my work is done remotely, so that means I get to use Linux all day long! There are several clients available for Linux; this post discusses the ones I have found to work best.

Remote Desktop Clients

For the richest remote access experience, it's hard to beat Microsoft's Remote Desktop Services (fka Terminal Services), which has been available on Windows Server for as long as I can remember (at least back to Windows 2000 Server). I recently set this up for our law firm on Windows Server 2008 R2. All of our software, from office applications to law-specific programs, have been installed on our Windows Server, and multiple users can log in to the server remotely with full access to everything they would have on their in-office desktop.

To access Windows servers running RDS from Linux machines, the rdesktop command line program is unparalleled. There are many GUI-based RDS clients, but most of them are simply front ends for rdesktop, and none that I have tried have the power and flexibility of using rdesktop from the command line. If you have command-line phobia, it's not nearly as hard as it seems, and this post explains how to use it. But if, after reading this post, you insist on using a GUI-based client, try Gnome-RDP. It doesn't have even 15% of the options available on the command line, but it has the most of any other Linux RDS client I've tried.

The beauty of using rdesktop is that once you decide on your optimal settings, you only need to enter the command once, and then you never need to see the command line again. It does require some extra time up front to figure out what settings you like, but that initial work will ensure that you have the best possible experience. The list of options for rdesktop is extensive, but most of them are not needed. Here is the basic command format, followed by a description of the most common options:

Basic Command Format:

rdesktop -u [network user name] -p [network password] -d [network domain name] [options] [server IP address]:[server RDS port number]

Command Options:

-a [8, 15, 16 or 24 sets the color depth; use 8 for 8-bit color for fastest speed; 24 for richest color]

-x [experience; m disables all desktop effects for faster speeds; l enables all effects]

-f [use fullscreen mode]

-g [desired height x width of RDS screen, e.g., 1910x1100]

-z [enable compression, but only works with 8bpp color depth]

-P [enable bitmap caching to speed access]

-r disk:remote=[path to a local folder to use for sharing files with RDS]

-r sound:local [directs sound to my local PC] [server IP address]:[server RDS port number]

Sample Command:

So here is the full command I use to access our firm's server:

rdesktop -u [my network user name] -d [our firm's domain name] -p [my network password] -a 8 -x m -g 1910x1100 -z -P -r disk:remote=[path to a local folder on my computer to use for sharing files with RDS] -r sound:local  [server IP address]:[server RDS port number]

Once you've figured out your best settings, simply add the command to your menu or panel or whatever. In Ubuntu 10.04, go to the System menu, Main Menu, and then add your RDS command wherever you want. To add it to your panel, just right-click on the Panel, choose "Add to Panel," and then enter the command.

VNC Client

With RDS, your access is invisible to someone who is working on the physical server; they cannot see what you are doing. If you want someone to be able to observe what you are doing (such as for tech support), VNC is helpful. Special software on the Windows host machine is required. I use RealVNC, but there are many other options. On the Linux client side, many, if not most, of the RDS clients also support VNC. I prefer to use the GUI-based Remote Desktop Viewer tool, aka vinagre. It is simple, but adequate.