Remote Graphical Linux Desktop on EC2

As a starting point I have used a very nice post ; parts of it have become outdated (e.g. freenx installation) for which a more updated instructions are provided, in addition to several settings that I have found to be more convenient.

Launching AMI

One of the best distributions for running on EC2 is Ubuntu.  You can launch an official  AMI version from http://cloud.ubuntu.com/ami/ by simply clicking on the AMI-ID of the instance that you want to launch.  Another option (that gives you more flexibility; e.g. using spot instances) is to launch the instance through AWS Console by clicking on Instances/Launch Instance https://console.aws.amazon.com/ec2/ search for the official ubuntu ID: 099720109477
Recommendations:

  • EBS Root Device: ensures that any changes that you make will persist even if you shutdown your machine.
  • 64-bit version: more fully utilizes computational resources.
  • instance type:
    • don’t get micro instance; will be too slow for most UI tasks
    • don’t use spot instance at this point, since it can’t be stopped, and when is terminated the EBS volume will be deleted
      [AWS Ref] Although Spot Instances can use Amazon EBS-backed AMIs, they don’t support Stop/Start. In other words, you can’t stop and start Spot Instances launched from an AMI with an Amazon EBS root device. 

Then you just need to follow the EC2 Wizard Steps.

[MHM's post] If you do not have a keypair, then select Create a new Key Pair, name your keypair and download it. You will need to put it somewhere accessible as we will be modifying the permissions of this file later. Once you have copied the keypair information, click Continue to head to the next screen.

 

Then create a new security group (or select an existing ones; if you are familiar with security group settings):

Once you complete the wizard you should be able to see your instance launching & then running.  Make sure to select the region in which you were launching the instance (otherwise it will not be displayed).

Instance Configuration

[MHM's post] Now that the instance is running, you will need to access it via SSH. I will assume you are usnig a Linux distribution with access to a terminal or equivalently, you can use Putty in Windows.

Attempting to use the keypair (downloaded in the previous step) while logging in will cause SSH to throw an error that the default read permissions on the file are too insecure. Therefore we need to remove the read permissions for groups and others, while retaining it for the user. Thus we change permissions from 644 to 400:

chmod 400 keypair.pem

Now we can SSH into the Amazon instance using the keypair. Remember to replace the asterisks below with your specific host (Public DNS field) which can be seen from the AWS Management Console:

ssh -i /path/to/keypair.pem ubuntu@ec2-***-***-***-***.compute-1.amazonaws.com

Now that we are logged into the Amazon instance, we need to perform some essential system maintenance, which includes updates, an upgrade and installation of some additional packages:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential

In order to be able to use NX, we now need to create a new user with admin rights (lets call it ec2usr).

sudo adduser ec2usr
sudo adduser ec2usr admin

We also need to allow SSH to use a password login:

sudo vi /etc/ssh/sshd_config

[MHM's post] Set PasswordAuthentication to “yes” where it says “no”, then save and exit. You will have to restart the SSH daemon for this to take effect:

sudo /etc/init.d/ssh restart

 UI (Desktop) Installation

 

[MHM's post] The next step is to install the Ubuntu Desktop functionality. This essentially means install the X window system and the window manager. Bear in mind that the last command will take around 15-20 minutes:

export DEBIAN_FRONTEND=noninteractive
sudo -E apt-get update
sudo -E apt-get install -y ubuntu-desktop

Restart to complete upgrades.

You now have an Ubuntu Desktop living in the cloud! Although, we can’t do much with it yet as we can’t connect to it via a GUI remote connection.

Installing NX Sever

FreeNX is a traditional NX Sever; however the support for it has been lacking lately (does not work well on latest ubuntu releases).  Therefore we go with the NX Free Edition for Linux from NoMachine (which has a limit of 2 sessions per server).  These packages are not in the software repository so need to be downloaded (for the latest version see NX Free Edition for Linux DEB amd64):

wget http://64.34.161.181/download/3.5.0/Linux/nxclient_3.5.0-7_amd64.deb
wget http://64.34.161.181/download/3.5.0/Linux/nxnode_3.5.0-7_amd64.deb
wget http://64.34.161.181/download/3.5.0/Linux/FE/nxserver_3.5.0-9_amd64.deb

and then installed:

sudo dpkg -i nxclient_3.5.0-7_amd64.deb
sudo dpkg -i nxnode_3.5.0-7_amd64.deb
sudo dpkg -i nxserver_3.5.0-9_amd64.deb

Installer will automatically launch the NX server.  But just do double check you can check it’s status by:

sudo /usr/NX/bin/nxserver --status

Other command options (in case you need them) are: |–start|–stop|–restart

NX Client Installation

Now you need to install NX client on your local machine.  Download the latest NX client from NoMachine.  One option to download the latest stable version, or the beta (could be unstable), right now that is NX 4 Beta/Preview  (NX Player: Windows, Linux, Mac OS X ).

OSX update:   NX 4 Preview seems to be quite unstable on OSX (but is the only option if you have OSX  >= 10.7; the stable 3.5 version seems to work better).

For some reason running System Monitor made NX client quite slugish.

Launch NX Player (Warning: UI is not very intuitive); and “create new connection” by filling in “host” field; and click X to go back to the main menu.

To connect to your server click on the leftmost icon (make sure to use NX login):

Enter username ec2usr and corresponding password.
Click on “Create a new session” and select “Create a new GNOME virtual Desktop”.

You will now see the ubuntu gui that is running in the cloud  8-)

Troubleshooting NX

Due to some glitch in NX; you may start getting the following error:
NX is unable to connect.  Authentication failed for user XXX …

Thanks to this post (with minor modifcations) this issued could be resolved as follows:

 sudo cp /usr/NX/home/nx/.ssh/known_hosts /usr/NX/home/nx/.ssh/known_hosts.bak
sudo rm /usr/NX/home/nx/.ssh/known_hosts
sudo touch /usr/NX/home/nx/.ssh/known_hosts
sudo /usr/NX/bin/nxserver --restart

The NoMachine service is not available on host

If you are connecting from NoMachine Player to NX server 3.5.0,  be sure you select “Use the NoMachine login” rather than  “Use the system login” in the Connect GUI and re-try to run the session [ref-post].

Very slow Response UI; large latency

Seem to get fixed by changing display setting on the NX client: low quality and disabling optimization options.

Making EBS/AMI Image

Before you stop your instance; go to the instances in AWS console; select yours and click on “Create Image (EBS AMI)” this way you can save it, and launch it later. This will create an AMI under AMI section; as well as a snapshot called something like “Created by CreateImage(i-fb2xxxx) for ami-683xxxx from vol-132cxxx”

Starting/Stopping Your machine in the cloud

Assuming that you have followed instructions carefully and selected an instance with EBS root store, you can now shutdown and start you cloud machine at will.  To do this just go to the https://console.aws.amazon.com/ec2/  (make sure you select the right region in the left upper corner; in my case it is Tokyo (Gigabit speeds in Japan are sweeeet)).  Then right-click on instance and select start or stop depending on your intentions (note if you click terminate, the ebs volume will be detached and renamed, and then when you start AMI the original volume will be launch (so you will not see the data from the last session); if stop is greyed out it may indicate that you are running a spot instance).

update: some of the above procedures may not be needed if you are running a regular instance (non-spot one).

Note: every time that you start/stop your instance it’s address will change; so you will need to update it accordingly in NX Player (unless you set up static ip).

You may also want to install Dropbox for easy and relatively pain free way of sharing files with your cloud machine; could be easily installed from “Software Center” of Ubuntu.

Tips

 Resizing EBS Volume

http://www.steinpalmer.com/blog/?p=39 provides a nice description of how this could be done by using AWS GUI Console

  1. [If the volume is already attached to an EC2 instance] Detach it from the instance (Right-click on the instance and select the detach option)
  2. Take a snapshot of the EBS Volume
  3. Go to your snapshots listing and right-click on the newly created snapshot. select the option to create a new volume from the snapshot
  4. Enter the new size of the volume and fill out the other fields as desired.
  5. Voila, you have now successfully re-sized your volume. you can now attach it to your instances. <Neil> you should attach it as /dev/sda1  (unless you have other volumes)

Once the system starts up; you need to reconfigure it so that it knows of a new size:

sudo resize2fs /dev/xvda1

to make sure that it worked properly:

df -h

 

Saving Money by Running Spot Instances

You can save significant amount of money by running a spot instance.  Of course this comes at a price (your instances might be terminated if your minimum price is not met).  Moreover, spot instances could not be manually stopped (only terminated); when you terminate an instance your EBS volume is detached and is renamed; so if you launch your AMI it will be pointing to the old EBS volume.  There are several optins of coping with this.

Create a new AMI from the detached-renamed EBS volume.  Useful if you want to launch multiple instances.

* Create an additional EBS volume, and attach it to the instance.  The drawback of this approach: volume can be attached only to a single instance, so if you want to launch multiple instances you would need to make copies and they will get out of sync.

Click on the volume that you want to attach (make sure it is in the same availability zone as your instance);
specify the device, e.g.: /dev/sdb
although it will be mounted as /dev/xvdb  [ref]
make sure that it is visible: sudo fdisk -l
format it:  sudo mkfs -t ext4 /dev/xvdb
edit /etc/fstab and add this :
/dev/xvdb /var auto defaults,nobootwait,noatime 0 0
reboot from AWS Console
[ref]

Choosing Availability Region/Zone

If you do a lot of UI interactions you may want to optimize your network latency.  The following website is quite handy: http://www.cloudping.info/

Although I’ve used  US-East (since it tends to have the cheapest spot prices) with 300 ms delay; without too much trouble.

Luckily I am based in Japan; so for a bit of extra money I can get EC2 instances in the same region (Japan) with gigabit bandwidth and 20 ms latency; now I can do a lot of heavy lifting computationally wise from my mac air while seeping some green tea :)

Migrating/Copy AMI between Regions

It used to be quite troublesome to move AMI’s between regions; Amazon has finally addressed this issue: http://aws.typepad.com/aws/2012/12/ebs-snapshot-copy.html

[Deprecated]

@see above

Oddly, AWS does not provide any straightforward ways of doing it.  Luckily  this nifty script makes it quite easy and convenient.

You can install the above script locally, or on one of your EC2 instances.  Bellow are the instructions:

First, you need to set the EC2_ACCESS_KEY and EC2_SECRET_KEY environment variables.  You can get your keys from: https://portal.aws.amazon.com/gp/aws/securityCredentials

export EC2_ACCESS_KEY="YOUR_EC2_ACCESS_KEY"
export EC2_SECRET_KEY="YOUR_EC2_SECRET_KEY"

Then install the script:

sudo perl -MCPAN -e 'install VM::EC2'

During the installation the script may ask for your keys again; you may paste them (although sometimes that does not seem to work well; in which case you can just hit enter to omit it). If you get some errors make sure to read what they say. There is a high chance that you may be missing some libraries; in my case I had to install the following:

sudo apt-get install libwww-perl libcrypt-ssleay-perl libxml-libxml-perl

Once the script is installed you can invoke the migration by:

migrate-ebs-image.pl --from us-east-1 --to ap-northeast-1 ami-NNNN

Note: ec2-migrate-image does not work with EBS AMIs

 

 

Notes

Nice post that describes differences between AMI, EBS, etc.  http://serverfault.com/questions/268719/amazon-ec2-terminology-ami-vs-ebs-vs-snapshot-vs-volume

 

 

Keywords: ubuntu linux Ubuntu 11.10 (Oneiric Ocelot) mint remote desktop ui gui graphical gnome kde amazon aws ec2 cloud gnome kde ami nx freenx neatx NoMachine vnc ssh mac os x osx lion aws ec2 zones countries ping latency

Permission denied (publickey) ec2 ssh ubuntu root

For Indexing & Reference purpose I am including my web search history bellow:

Searched for ubuntu start NX Server free edition 5:28pm
NoMachine NX – Download: NX Server for… – nomachine.com 5:28pm
Searched for ubuntu start NX Server 5:27pm
Searched for ubuntu start freenx 5:25pm
Searched for ami nx 5:21pm
amazon ec2 – Fast EC2 micro AMI which… – serverfault.com 5:21pm
Ubuntu 11.10 Users Read Here – NoMachine… – nomachine.com 4:55pm
Freenx-server is dead. Vive Neatx-server! – ubuntuupdates.org 4:55pm
Searched for nx ubuntu 4:54pm
FreeNX – Community Ubuntu Documentation – ubuntu.com 4:54pm
NomachineNX – Community Ubuntu Documentation – ubuntu.com 4:54pm
Searched for freenx : Depends: esound-clients but it is not installable orarts but it is not installable 4:48pm
[ubuntu] install freenx on ubuntu 11.10… – ubuntuforums.org 4:48pm
Searched for ubuntu 11.10 wiki 4:47pm
Searched for ubuntu 11.10 4:47pm
Searched for freenx oneiric 4:44pm
11.10 – How to I install a free NX server?… – askubuntu.com 4:44pm
Searched for nx osx lion 4:40pm
Mac OS X Lion Users Read Here – NoMachine… – nomachine.com 4:40pm
Searched for nx osx 4:37pm
NoMachine NX – Download: NX Client for Mac OS X – nomachine.com 4:37pm
Searched for FreeNX 4:37pm
Fog::Compute::AWS::SecurityGroup – RubyDoc.in… – rubydoc.info 4:21pm
Getting Started With AWS Identity Access… – cloudartisan.com 4:21pm
AWS Developer Forums: URGENT – Not able… – amazon.com

 

Searched for freenx : Depends: esound-clients but it is not installable orarts but it is not installable 4:48pm
[ubuntu] install freenx on ubuntu 11.10… – ubuntuforums.org 4:48pm
Searched for ubuntu 11.10 wiki 4:47pm
Searched for ubuntu 11.10 4:47pm
Searched for freenx oneiric 4:44pm
11.10 – How to I install a free NX server?… – askubuntu.com 4:44pm
Searched for nx osx lion 4:40pm
Mac OS X Lion Users Read Here – NoMachine… – nomachine.com 4:40pm
Searched for nx osx 4:37pm
NoMachine NX – Download: NX Client for Mac OS X – nomachine.com 4:37pm
Searched for FreeNX 4:37pm
Searched for aws security group 1234567890/default 4:20pm
AWS Developer Forums: URGENT – Not able… – amazon.com 4:21pm
Getting Started With AWS Identity Access… – cloudartisan.com 4:21pm
Fog::Compute::AWS::SecurityGroup – RubyDoc.in… – rubydoc.info 4:21pm
Searched for abill cafe東京都世田谷区北沢 3:48pm
abill – google.com 3:48pm
Searched for “learning technologies” 2:50pm
Learning Technologies | EDUCAUSE – educause.edu 2:51pm
Searched for amazon upload ami 1:56pm
Amazon EC2 AMI Tools : Developer Tools… – amazon.com 1:56pm
Amazon EC2: Is there any way to upload… – quora.com 1:57pm
Searched for using ec2 remote workstation 6:04am
ec2 « Perspectives on Cloud Computing… – learningtree.com 6:04am
Desktop Ubuntu in Amazon EC2 – The Right Way – michaelhallsmoore.com 6:05am
Viewed results for using ec2 remote desktopusing remote desktop (paused for at least 3 seconds with no click) 6:03am
GUI in Amazon EC2 – Stack Overflow – stackoverflow.com 6:01am
Timothy M. Kunau » Amazon EC2 linux desktop? – kunau.us 6:01am
4 easy steps to enable remote desktop… – aws-musings.com 6:01am
How to Use Amazon Ec2 As a Desktop Computer – wikihow.com
Searched for ec2 linux remote desktop 6:00am
Searched for linux mint ec2 5:59am
linux-image-ec2 – Linux Mint Community – linuxmint.com 5:59am
Learn Linuxmint Linux | [WATCH]: Amazon… – cyacomputerblog.com 5:59am
Searched for mysqldb ubuntu 5:47am
[ubuntu] python MySQLdb fails after 10.04… – ubuntuforums.org 5:47am
Getting python MySQLdb to run on Ubuntu… – stackoverflow.com 5:47am
Searched for mysqldb 5:43am
MySQL for Python | Free Development software… – sourceforge.net 5:43am
MySQLdb User’s Guide – sourceforge.net 5:43am
Searched for mysqldb debian 5:42am
Searched for mysqldb mint 5:42am
 
How to install/configure MySQL Database… – linuxmint.com 5:42am
 
http://community.linuxmint.com/software/view/… 5:42am
 
python-mysqldb-dbg – Linux Mint Community – linuxmint.com

 

Searched for ec2 spot instances stop greyed out 8:17am
 
 
     
AWS Developer Forums: How To “Stop” EBS-backe… – amazon.com 8:17am
 
 
     
http://support.rightscale.com/06-FAQs/FAQ_014… 8:18am
 
 
Searched for ec2 spot instances stop 8:17am
 
 
     
AWS Developer Forums: ec2-api-tools stop… – amazon.com 8:17am
 
 
Searched for change termination protection greyed out ec2 8:13am
 
 
     
AWS Developer Forums: How to set “Termination… – amazon.com 8:13am
 
 
     
AWS Developer Forums: Unable to terminate… – amazon.com 8:13am
 
 
     
New AWS Console Features: Forced Detach,… – typepad.com 8:13am
 
 

Yesterday

Searched for ami ebs persistance 10:20pm
 
 
     
How to create a persistent ebs backed… – stackoverflow.com 10:20pm
 
 
     
How to keep the Amazon EBS Backed AMI… – serverfault.com 10:21pm
 
 
Searched for ec2 ebs did not persist 10:10pm
 
 
     
Persistence Strategies for Amazon EC2… – 176.34.122 10:10pm
 
 
     
You Should Use EBS Boot Instances on… – alestic.com

 

Searched for copy ami to another region 8:55pm
 
 
     
Amazon Web Services: What’s the fastest… – quora.com 8:56pm
 
 
     
Moving EC2 Instances Across Availability… – serverwatch.com – Viewed 5 times 8:57pm
 
 
     
Moving Your Amazon EC2 AMIs To Another… – theagileadmin.com 8:57pm
 
 
     
Move Amazon AMI to another account -… – stackoverflow.com

 

Searched for “migrate-ebs-image.pl” 10:33pm
 
 
     
AWS Developer Forums: Copy AMI to S3 bucket? … – amazon.com 10:33pm
 
 
     
Move Amazon EC2 AMIs between regions… – stackoverflow.com 10:34pm
 
 
Searched for migrate-ebs-image.pl 10:33pm
 
 
Searched for ebs “ec2-migrate-image”
Searched for ec2-migrate-image ami region 9:24pm
 
 
     
HowTo: Move an EC2 Instance Store AMI… – dowdandassociates.com 9:24pm
 
 
     
How to programmatically migrate an EC2… – serverfault.com 9:24pm
 
 
Searched for ami migrate 9:20pm
 
 
     
ec2-migrate-bundle – Amazon Elastic Compute… – amazonwebservices.com 9:20pm
 
 
     
Moving EC2 Instances Across Availability… – serverwatch.com – Viewed 5 times 9:21pm
 
 
     
AWS Developer Forums: Copy AMI to S3 bucket? … – amazon.com 9:21pm
 
 
Ylastic – Manage your cloud – ylastic.com

 


AMI Inter-region Migrations / Problems…
 – ylastic.com
8:58pm
 
 
Copy AMI/Role from one region to another… – scalr.net 8:58pm
 
 
How to move your Linux EBS backed EC2… – thelasis.com 8:58pm
 
 
Replicate an Image to different EC2 regions… – rightscale.com 8:58pm
 
 
Amazon EC2: What is the easiest way to… – quora.com 8:58pm
 
 
AWS Developer Forums: How to move AMI… – amazon.com
Searched for amzon linux ami Permission denied (publickey). 11:56pm
 
 
Searched for amazon linux ami login 11:55pm
 
 
     
Amazon Linux AMI – amazon.com 11:55pm
 
 
Searched for Can’t locate object method “new” via package “VM::EC2″ at t/01.describe.t line 24, <> line 2. 11:49pm
 
 
     
http://cpansearch.perl.org/src/LDS/VM-EC2-1.1… 11:49pm
 
 
Searched for set environment variable linux 11:28pm
 
 
     
Linux: Set Environment Variable – cyberciti.biz 11:28pm
 
 
Searched for set environment variable 11:28pm
 
 
Searched for ec2 nx 11:25pm
 
 
     
Remote Graphical Linux Desktop on EC2… – activeintelligence.org – Viewed 32 times 11:25pm
 
 
Searched for aws X.509 certificate 11:22pm
 
 
     
EC2StartersGuide – Community Ubuntu Documenta… – ubuntu.com – Viewed 6 times 11:22pm
 
 
Searched for find ec2 secret key 11:20pm
 
 
     
amazon ec2 – Where do I find my EC2 private… – serverfault.com 11:20pm
 
 
     
Understanding Access Credentials for… – alestic.com 11:20pm
 
 
Searched for find EC2_SECRET_KEY 11:19pm
 
 
Searched for where to find EC2_SECRET_KEY 11:18pm
 
 
     
EC2StartersGuide – Community Ubuntu Documenta… – ubuntu.com – Viewed 6 times 11:18pm
 
 
     
how to get EC2_ACCESS_KEY and EC2_SECRET_KEY… – eucalyptus.com 11:18pm
 
 
Searched for EC2_ACCESS_KEY 11:15pm
 
 
     
Question #152769 : Questions : OpenStack… – launchpad.net 11:15pm
 
 
     
[ubuntu] error when running image in… – ubuntuforums.org 11:16pm
 
 
Searched for VM::EC2 11:14pm
 
 
     
Announcing VM Export for Amazon EC2 – amazon.com
Searched for amzon linux ami Permission denied (publickey). 11:56pm
 
 
Searched for amazon linux ami login 11:55pm
 
 
     
Amazon Linux AMI – amazon.com 11:55pm
 
 
Searched for Can’t locate object method “new” via package “VM::EC2″ at t/01.describe.t line 24, <> line 2. 11:49pm
 
 
     
http://cpansearch.perl.org/src/LDS/VM-EC2-1.1… 11:49pm
 
 
Searched for set environment variable linux 11:28pm
 
 
     
Linux: Set Environment Variable – cyberciti.biz 11:28pm
 
 
Searched for set environment variable 11:28pm
 
 
Searched for ec2 nx 11:25pm
 
 
     
Remote Graphical Linux Desktop on EC2… – activeintelligence.org – Viewed 32 times 11:25pm
 
 
Searched for aws X.509 certificate 11:22pm
 
 
     
EC2StartersGuide – Community Ubuntu Documenta… – ubuntu.com – Viewed 6 times 11:22pm
 
 
Searched for find ec2 secret key 11:20pm
 
 
     
amazon ec2 – Where do I find my EC2 private… – serverfault.com 11:20pm
 
 
     
Understanding Access Credentials for… – alestic.com 11:20pm
 
 
Searched for find EC2_SECRET_KEY 11:19pm
 
 
Searched for where to find EC2_SECRET_KEY 11:18pm
 
 
     
EC2StartersGuide – Community Ubuntu Documenta… – ubuntu.com – Viewed 6 times 11:18pm
 
 
     
how to get EC2_ACCESS_KEY and EC2_SECRET_KEY… – eucalyptus.com 11:18pm
 
 
Searched for EC2_ACCESS_KEY 11:15pm
 
 
     
Question #152769 : Questions : OpenStack… – launchpad.net 11:15pm
 
 
     
[ubuntu] error when running image in… – ubuntuforums.org 11:16pm
 
 
Searched for VM::EC2 11:14pm
 
 
     
Announcing VM Export for Amazon EC2 – amazon.com
Searched for which ami migrate-ebs-image.pl 12:23am
 
 
     
Move EBS AMI’s across regions | Ryan Tan – ryantan.net 12:23am
 
 
     
lstein/LibVM-EC2-Perl · GitHub – github.com 12:23am
 
 
     
Copying EBS Boot AMIs Between EC2 Regions… – alestic.com 12:23am
 
 
     
https://kippt.com/knokio/amazon-aws/clips/792… 12:24am
 
 
     
http://stackoverflow.com/tags/ami/new 12:24am
 
 
Searched for which ami 12:23am
 
 
Searched for make test had returned bad status, won’t install without force migrate-ebs-image.pl 12:22am
 
 
Searched for make test had returned bad status, won’t install without force 12:22am
 
 
     
perl – What steps to take when CPAN installat… – superuser.com 12:22am
 
 
Searched for ec2 nx 12:10am
 
 
     
Remote Graphical Linux Desktop on EC2… – activeintelligence.org – Viewed 32 times 12:11am
 
 
Searched for linux environment variables 12:09am
 
 
     
Tips For Linux – How to set Shell Environment… – codecoffee.com 12:09am
 
 
     
Linux Environment Variables – Linux Commands – lowfatlinux.com 12:10am
 
 
     
Environment Variables – ArchWiki – archlinux.org 12:10am
 
 
Searched for migrate-ebs-image.pl install 12:05am
 
 
     
lstein/LibVM-EC2-Perl · GitHub – github.com 12:05am
 
 
     
Hurricane Sandy and AWS: Migrating Octopart… – ycombinator.com 12:05am
 
 
Searched for yum linux 12:03am
 
 
Searched for yum 12:03am
 
 
Searched for migrate-ebs-image.pl launch 12:02am
 
 
     
Amazon EC2 terminology – AMI vs. EBS… – serverfault.com 12:02am
 
 
     
AWS Developer Forums: Copy AMI to S3 bucket? … – amazon.com

 

Searched for Can’t locate XML/Simple.pm ubuntu 12:59am
 
 
Searched for Can’t locate XML/Simple.pm 12:59am
 
 
Searched for Can’t locate object method “new” via package 12:56am
 
 
     
Can’t locate object method “new” via… – perlmonks.org 12:56am
 
 
     
templates – perl TemplateToolkit – Can’t… – stackoverflow.com 12:57am
 
 
     
AWS Developer Forums: mon-get-instance-stats… – amazon.com 12:57am
 
 
Searched for ec2 nx 12:50am
 
 
     
Remote Graphical Linux Desktop on EC2… – activeintelligence.org – Viewed 32 times 12:50am
 
 
Searched for install LibVM-EC2-Perl 12:42am
 
 
     
Debian — Details of package libvm-ec2-perl… – debian.org 12:42am
 
 
Searched for ubuntu install cpan 12:38am
 
 
     
How to install perl modules through CPAN… – wordpress.com 12:38am
 
 
     
perl – when using CPAN in linux ubuntu… – stackoverflow.com 12:38am
 
 
Searched for ubuntu cpan 12:37am
 
 
     
BASH > How to install perl modules through… – sudobash.net 12:38am
 
 
Searched for force install perl 12:31am
 
 
     
How To Install Perl Modules on Dedicated… – encodable.com 12:31am
 
 
Searched for force instal perl 12:31am
 
 
Searched for Lincoln D. Stein 12:27am
 
 
     
Lincoln Stein’s Home Page – cshl.org 12:27am
 
 
Searched for Failed test require VM::EC2 12:26am
 
 
     
http://ppm4.activestate.com/sun4-solaris/5.8/… 12:26am
 
 
     
LibVM-EC2-Perl/Changes at master · lstein/Li… – github.com 12:26am
 
 
     
Removing a single point of failure: Creating… – techrepublic.com

 

 

 

 

 

 

 

 

 

 

 

About Neil Rubens

see http://ActiveIntelligence.org
This entry was posted in Uncategorized. Bookmark the permalink.

13 Responses to Remote Graphical Linux Desktop on EC2

  1. Bruno says:

    ‘build-essential’ is not needed to install NX. You can also restart ssh by doing ‘sudo restart ssh’.

  2. Eadwin says:

    Finally a decent step by step article without the rubbish… FreeNX was driving me insane error after error!

    Great work – Thanks

  3. Simon says:

    Hi
    Really nice step by step, but I cannot get the final steps to work. When connecting with NX player 4, preview 6 to ubuntu 12.04 I get the “Authentication failed for user” no matter what I try. Also after trying the “fix” several times.
    I don’t know if there is a difference because it the newer Ubuntu 12, and your step guide is for U11.

    Any idea for getting that step to work is very welcome, because I’m going crazy :)
    I’m new in ubuntu, so nothing is intuitive to me :)

    Best regards

    • Neil Rubens says:

      I’ve recently done an install on 12.04 and it seemed to work fine.

      Have you selected “Use the NX login” on the NX Player?

      I had the same problem before; and running the following (by connecting to your machine through ssh) seemed to have fixed it:
      sudo cp /usr/NX/home/nx/.ssh/known_hosts /usr/NX/home/nx/.ssh/known_hosts.bak
      sudo rm /usr/NX/home/nx/.ssh/known_hosts
      sudo touch /usr/NX/home/nx/.ssh/known_hosts
      sudo /usr/NX/bin/nxserver –restart

      You may want to reboot machine if it still does not work. Reinstalling the NX server might help as well.

      Hope it works.

  4. Hudson says:

    Very nice! It worked flawlessly. Thanks.

  5. Wallace Kelly says:

    Thank you! Very well-written.

    The first time through I had problems on the very last step. The symptom of the problem was that the Ubuntu desktop background image would appear in the NX Client for Windows, but nothing else. No status bar across the top; no shortcut icons on the left; just a empty desktop. I had used the the Ubuntu Server 12.10 AMI.

    I started over a second time and used the Ubuntu Server 12.04.1 LTS AMI. It worked perfectly on this attempt.

    At the time of this comment, No Machine 4 was still in preview. I did not try that. I used No Machine 3.5 on both of my attempts.

    • Neil Rubens says:

      Thank you for your comments.

      > The symptom of the problem was that the Ubuntu desktop background image would appear in the NX Client for Windows, but nothing else. No status bar across the top; no shortcut icons on the left; just a empty desktop.
      I think I have ran into similar issue before. In my case it seem to have been cause by NX client (or ubuntu) having a wrong resolution; rebooting an instance and/or changing resolution settings of NX client has worked in my case.

  6. Ole Nielsen says:

    Thank you so much for the concise instructions.
    I got it all working except that when logging in with FreeNX I get a graphical screen but without any icons or toolbars. I can rightclick and create folders etc, but I cannot launch anything. Even tried CTRL-T to get a terminal window without success.

    Can anyone help please? I am so close…

    • Neil Rubens says:

      The issue might be missmatch between resolution on the remote and local machine. You may want to try changing the NX resolution preferences; by going to the upper right hand corner.

  7. Pingback: Develop for the Cloud, in the Cloud. | cloudetics

  8. foo says:

    The links for FreeNX source and binaries are no longer valid. =(

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>