Remote Desktop via VNC: Big Fun

Over the weekend, I started playing around with using a remote Linux desktop, via VNC. Because the remote system is actually remote – it’s a virtual dedicated server, in a datacenter somewhere about 160ms away from me – I’m using an SSH tunnel to connect to it.

So far, I’m really impressed, and having a lot of fun.

You’re probably familiar with the idea of how an internet proxy works – an application on your computer (say, a web browser) sends data to another computer somewhere, and the data comes out the other end, appearing to come from the remote system. A VNC setup is a bit different – you connect to the remote machine, and then run applications right on the machine, as if you were sitting right there in front of it.

Once you get it set up, it’s fairly straightforward – and if you know your way around Linux, setting it up is pretty painless. Following a couple tutorials online, I was up and browsing the web in a (remote) Firefox window in about forty-five minutes.

For the most part, a lot of the things you can do on a remote desktop via VNC are things you can do on the web from your browser, thanks to stuff like Google Apps. The difference, of course, is that you have a bit more control over your data when it’s on a computer you administer – which could be significant if you’re distrustful of Big Brother and his Googly appendages.

There are other things you can do, as well – send and receive email on the remote system via Thunderbird, or use instant-messenger clients – which can provide better privacy when done via VNC than other methods (proxying IM and email to hide your real IP address can be non-trivial). In fact, even for things that are relatively straightforward to proxy or tunnel, running them remotely obviates the need to worry about proxy configuration and information leakage. Also, if your server hosts permits it, there’s a whole wide world of IRC and bittorrent to be explored, remotely… a few minutes’ thought should come up with other uses, as well.

I’m leasing a virtual server to use as a remote desktop, for about 5 USD/month. Running Debian 5 under the Xen virtualization system, I have 256MB of RAM to play around with (and another 256MB of swap space, but I really don’t want to use that, ever), a couple hundred gigabytes of transfer every month, and around eight gigs of storage space, as well as the use of a 2.4GHz Xeon core. With the Fluxbox window manager running under xdm, browsing the web in a remote Firefox (Iceweasel) window is slow but usable; CPU usage is about 10%, and memory usage eventually rises slowly from about 110MB. I strongly suspect things would be a bit more responsive if the remote server was closer than 160ms away, but we have to make do with what we’ve got; if I could find a cheap VPS in Chicago, that would cut the latency roughly in half, which would probably be noticeable.

My guess is that 256MB of dedicated RAM is about the bare minimum for a Linux VNC host, assuming nothing else is running, as is the case on my VPS. Having access to multiple CPU cores might make a noticeable difference, too. (As long as they’re not throttled – A single 2GHz core might be better than four 500MHz “slices”.) Depending on what you want to use the machine for, more RAM is probably the most critical component.

Have you found a fun use for VNC? Or an easy way to setup a true multi-user remote desktop on Debian? Leave a comment, or e-mail the usual address…

Published in: Geekiness, General | on April 6th, 2010| 4 Comments »

You can leave a response, or trackback from your own site.

4 Comments Leave a comment.

  1. On 4/6/2010 at 2:26 pm Patrick Said:

    I’ve only explored this in a cursory manner, and by that I mean I managed to get it to work, but you can actually tunnel X over SSH. The advantages of doing this are that you can have individual applications run in a manner that appears to be totally local. PuTTY has X11 forwarding, and server side it’s just enabling some config options in sshd. I assume it’s a bit easier on bandwidth too, as you’re only sending the data for one application instead of the view of a whole desktop.

  2. On 4/9/2010 at 11:54 pm Nemo Said:

    I spent about half an hour trying to get X forwarding working, and gave up in disgust. Maybe I was just using the most innately-retarded Win32 X server software ever, but, urgh. Not fun, on a “compiling qmail with twenty patches on a 110MHz CPU” scale.

    Bandwidth use with VNC is kinda scary – I’m regularly seeing sustained rates of 30KBps/240kbps down when typing a text document in Kate, and I’ve hit 80Kbps / 640kbps reading my GMail account in Iceweasel. Maybe I need to play around with the encoding and compression settings some more…

  3. On 4/10/2010 at 9:29 pm xf Said:

    Try FreeNX with an NX client. It gives you an X11 remote desktop with bandwidth consumption comparable to that of RDP – in other words, dramatically lower than VNC. Of course, you have to tunnel it over ssh, but it sounds like you’ve got that figured out.

    I’ve also tunneled X11 over SSH on LANs; in the kind of places I work it’s a requirement. I use Cygwin on Windows, and once you get X itself configured and running, it’s as simple as “ssh -X”.

  4. On 4/10/2010 at 10:45 pm Nemo Said:

    I did eventually get X11 tunneled over SSH, after a lot of fighting and cursing. Pretty nice for things that don’t involve graphics, though that seems to defeat the whole point of X a bit. I mean, woo, xterm is all nice and responsive, but… I could just log in via SSH. Meh.

    Bandwidth, sadly, is even more alarming when doing direct X tunneling over SSH – typing in Kate results in something between 50KBps, and Iceweasel caps out my ~1.5Mbps line before becoming unresponsive.

    I’m sure it’s useful over a LAN, but over the internet, to a machine half the country away, not so much so.

    I’ll look into FreeNX, but Debian support seems marginal, at best; haven’t looked at the kissing cousins like Fedora, yet, but don’t expect them to be any better.

Leave a Comment