Ubuntu Desktop in the Cloud

For the past few releases, Canonical has put quite a bit of energy into making Ubuntu a first-class OS for use in the cloud. Ubuntu now has cloud support for Amazon’s EC2 and Ubuntu Enterprise Cloud (a “private cloud” system based on Eucalyptus).  This means that it’s easy to spin up Ubuntu instances on EC2 or to make your own private cloud with Ubuntu … where you can spin up more instances of Ubuntu … there’s a lot of “cloud” going on here!

One new feature in Ubuntu 10.04 that caught my attention is the “Desktop in the Cloud” project. Until now, most of the attention on cloud technologies has been focused on servers in the cloud. If you wanted to use a desktop environment on EC2, you needed to do quite a bit of tweaking and installing of packages yourself. With the Lucid release, the Ubuntu team is making desktop in the cloud much easier.

You can now find daily testing images for Ubuntu Lucid desktop in EC2.  These images include a full Ubuntu desktop environment as well as Google’s Neatx open source NX server for connecting remotely to the desktop. Here’s what you need to know to get started (note: This is not a full tutorial, and meant for people who already are familiar with EC2 and have their systems configured for working with EC2. Information for setting up EC2 on Ubuntu can be found here. Perhaps I’ll make a full tutorial for beginners after Lucid’s official release).

To find the latest Lucid daily build, simply search for an AMI in the AWS Management Console with the current date, like “20100302.” You should find daily desktop builds for either today’s or yesterday’s date. Make sure to choose the 32-bit version if you want to launch a small instance.

Once you find the AMI, launch it like you normally would. Make sure that port 22 for SSH is open in the security group that you choose. You will connect to this EC2 instance just like to any other instance with only one difference. The official Ubuntu EC2 images do not allow you to connect via SSH as the root user. Instead, you need to connect with your private key as the user “ubuntu”, like this:

ssh -i /path/to/ec2-keypair.pem ubuntu@external-host-name

You should create a new user and give them a password (a password is required by NX). Now you can connect as this new user to your new cloud Desktop instance with NX Client. If you don’t have an NX client, download a free one from NoMachine. Use your NX client to connect to your EC2 instance via its public DNS address on port 22. If all goes well, you should see your newly spawned desktop.

So, we have a desktop in the cloud … but what is it good for?

Right now, it’s a very quick and easy way to test Lucid daily builds. Instead of downloading a new ISO and installing in a virtual machine, you can test on EC2 and save a lot of time.  In the future, I can see this being useful for those who would like to have their own personal desktop that’s accessible from anywhere. It might also be useful for organizations who want to provide desktop work environments for employees who work from home.

What ideas do you have for using an Ubuntu desktop in the cloud? Share your ideas in the comments below!

http://code.google.com/p/neatx/

14 Responses to “Ubuntu Desktop in the Cloud”

  1. Eric Hammond 03. Mar, 2010 at 10:35 pm #

    I’ve been publishing both Ubuntu server and Ubuntu Desktop AMIs for EC2 since 2007 on http://alestic.com and folks seem to use them for all kinds of things. One of the most interesting I’ve found is that people report getting better performance using NX over a slow connection to a Desktop running on EC2 than running a browser locally.

    Apparently the EC2 instance can download all of the HTML, CSS, JavaScript, and images super-fast, render it, and then just feed a super-compressed version over to the local NX client. I’ve tried this a couple times and have witnessed what they’re talking about.

    I’m glad Canonical is picking up the Desktop again with the upcoming Lucid release.

    • Jim 03. Mar, 2010 at 10:47 pm #

      Eric,
      Thanks for all the work you’ve done to help promote Ubuntu on EC2. I’ve used your images many times. Thanks!

  2. Andrew Cutler 04. Mar, 2010 at 1:21 am #

    Eric,

    I too have witnessed times when NX is faster for web browsing. This is particularly true over slow and congested wifi links. It seems NX is more efficient than using a local browser in these instances for the reasons you have mentioned.

    I’d love to see a report of NX bandwidth usage vs other remote display protocols. My personal experience with it tethered to my mobile seems to indicate that it uses very little at all, and is very responsive even when roaming between cell towers.

  3. Philip Washington 04. Mar, 2010 at 1:35 am #

    This is a very interesting concept and I will be looking into this as a possible remote access solution. If the systems can be locked down and monitored for intrusion , then this could be better than allowing remote users to connect into our network via VPN.

  4. mnk 04. Mar, 2010 at 11:56 am #

    Hi,

    Can more than one person connect to the same ’session’ so that both people can see/use the same mouse and keyboard in the same session?

    Thanks

  5. Eric Hammond 05. Mar, 2010 at 5:24 am #

    mnk: Yes, you can have multiple NX clients accessing the same EC2 instance and they can either be seeing the same desktop session or have their own sessions. I’ve used the shared desktop approach to walk clients through demos. I wouldn’t give them access to my personal desktop, but working together on a temporary EC2 instance at a dime an hour is an easy decision.

  6. BrownieBoy 06. Mar, 2010 at 6:57 am #

    After you’ve created your new user in Ubuntu, you have to copy over the /home/ubuntu/.ssh and folder its one file to your new user’s home folder, or you won’t be able to login.

    Remember to set the ownership on folder and the file to the new user too.

    • Jim 06. Mar, 2010 at 8:02 am #

      If you set a password for your user, you should not have to do this.

  7. Kreg 08. Mar, 2010 at 5:43 am #

    Jim, is there any way you can write up a few more steps? It would be greatly appreciated.

    I’ve made many attempts, but have not been able to get the desktop to display. I think I’m close because I get past many of the NXClient dialogs. However, I’m not able to get past this message:

    Info: Proxy running in client mode with pid
    ‘8160′. Session: Starting session at ‘Sun Mar 7
    10:57:04 2010′.
    Warning: Connected to remote version 3.3.0 with
    local version 3.4.0.
    Info: Connection with remote proxy completed.
    Error: Function fork failed. Error is 11
    ‘Resource temporarily unavailable’.
    Error: Failed to execute the X auth command.
    Error: Cannot read the cookie from the X
    authorization file.
    Error: Error creating the X authorization.
    Session: Session terminated at ‘Sun Mar 7
    10:57:35 2010′.

    A more detailed discussion can be found at:

    http://aws-musings.com/4-easy-steps-to-enable-remote-desktop-on-your-ubuntu-ec2-instance/comment-page-1/#comment-102

    Thanks for the help.

  8. JavaRocky 25. Mar, 2010 at 12:41 pm #

    Mind BLOWN!!!

    Just use ’sudo adduser new-user-name-here’ for the newbies out there.

    And yes it’s very fast. Oh and yo Eric, you are Legend with those AMIs. Keep it up!

  9. Jim 26. Mar, 2010 at 7:28 pm #

    This doesn’t seem to be working with the newest Lucid builds. Hopefully the bugs will get worked out before the final release.

  10. Martti Pitkanen 14. Jun, 2010 at 3:45 pm #

    In NX client, is it possible to see & use local drives and printer,

    as it is in Win TS client?

Trackbacks/Pingbacks

  1. Ubuntu’s New “Light” Style Defaults to Dark Theme? - Starry Hope - 05. Mar, 2010

    [...] styles that have been announced for version 10.04, Lucid Lynx, so I loaded up the today’s daily build in EC2. I was a little bit surprised to see that the default theme is Ambiance, a dark theme. It seems a [...]

  2. Ubuntu Desktop in the Cloud | Ubuntu-News - Your one stop for news about Ubuntu - 06. Mar, 2010

    [...] EC2 and Ubuntu Enterprise Cloud (a “private cloud” system based on Eucalyptus). More here This means that it’s easy to spin up Ubuntu instances on EC2 or to make your own private cloud [...]

Leave a Reply