Friday, June 28, 2013

Remote Desktop on Linux

I *finally* discovered a quick, easy, and reliable way to access the desktop of remote linux machines.  It's called XRDP.

I've been using linux laptops exclusively since 2001.  And most of my desktop and server machines have been linux since years before that.  But for various reasons, I have never found a good way to access the desktop GUI view remotely.  SSH command-line is my friend, but sometimes you just need a good GUI.  I finally found it.

And it works with Ubuntu linux servers presenting either the good-old gnome desktop (ie gnome-session-fallback) or Unity.

Here's what I did...

Summary

On both machines:  Ubuntu 12.04
On the server:  xrdp
On the client:  remmina

Minimum Setup


Server-side

sudo apt-get -y install xrdp

Client-side

Applications-> Internet-> Remmina Remote Desktop Client

Connection-> New->
Name: <your server's name, nickname, or whatever you like>
Protocol: RDP Remote Desktop Protocol
Server: <your server hostname or IP>
User Name: <account user name on your server>
Password:  <******>
Save

Double-click the connection.  It connects.  Say yay.

Server-side Tweaks


If you prefer the gnome desktop (instead of Unity), and have already installed gnome-session-fallback on your server machine, you can access it using xrdp and remmina with one easy tweak...

On the server machine, sign-in as your user account (ie, not root), open a command-prompt, go to your home directory, and create a new hidden file named .xsession

/home/username> echo "gnome-session --session=gnome-fallback" > .xsession

The next time you connect to the GUI desktop using Remmina, you will get the gnome desktop.

To revert, simply delete file /home/username/.xsession


To speed up repaint performance over slow internet connections, I switch the server desktop background from a pretty image to single color.

On the server machine, right-click the desktop background-> tab Appearance-> dropdown Colors & Gradients-> Click the solid color block (no gradients)-> then select a pleasing color.

Client-side Tweaks


I like a remote desktop window to be smaller than my screen size, so that I can see other windows and navigate easily.

On your linux client machine, in the Remmina app, right-click the connection-> Edit

Resolution-> Custom-> dropdown select a resolution that fits.

In the same dialog, you can also tweak the colors to look better.

Bonus

The XRDP service on the linux servers can also be accessed well from Windows clients (using the Microsoft Remote Desktop client), and Mac clients (using Microsoft's Remote Desktop Connection Client for Mac).

Try it.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.