How to install a GUI to your Ubuntu 10.0.4 Amazon EC 2 instance using FreeNX

Amazon EC 2 is awesome but the command line makes it a little boring. The Non-geeks in us still love to use Windows instead of staring at a black screen and typing in codes to do everything.

I understand command line is all super powerful in the hands of the right person but for me its GUI any day.

FreeNX is a software that will let you view your computer from far away. I will be installing this on an Amazon EC 2 instance (Refer to my older post on how to create an EC 2 instance).

This article follows heavily from the official Ubuntu documentation form FreeNX at https://help.ubuntu.com/community/FreeNX

It makes sense to just use that but I kind of don't like the fact that it almost always never works well after a while. This install of FreeNX is for installation on Ubuntu 10.0.4 . More particularly it is for installation on an Amazon EC 2 instance running the Ubuntu 10.0.4 LTS OS.

Add the FreeNX PPA

sudo add-apt-repository ppa:freenx-team

Update Apt & Install FreeNX

sudo apt-get update

sudo apt-get install freenx

imageWell Yes of course! Watch the Matrix and come back in a little while.

 

Get the nxsetup script, unpack it, copy the script and run it using the following commands.

 wget https://bugs.launchpad.net/freenx-server/+bug/576359/+attachment/1378450/+files/nxsetup.tar.gz

tar -xvf nxsetup.tar.gz

sudo cp nxsetup /usr/lib/nx/nxsetup

sudo /usr/lib/nx/nxsetup –install

I choose NOT to create my own Key pairs. This leads to a simpler but less secure setup.

 

Next Step: Setup password based authentication

Now, to login to EC2 you just used a Private Key. You didn’t have to use a password. But unfortunately FreeNX doesn’t work this way. It must have a username and password associated with an account in order for it work.

So let’s create a password for the user named ubuntu

First lets’s change the /etc/ssh/ssh-config file to allow for Password based authentication

Hit

sudo nano /etc/ssh/ssh-config

image

Press Ctrl + O to save and Ctrl + C to go back to command line.

We’ll create a password for the user called ubuntu.

sudo passwd ubuntu

Enter an appropriate password and save it safely.

Now Reboot the system

sudo reboot

While this happens download the NX client for Windows or Ubuntu and install it on your PC.

Next Step: NX Client

 

Install the NX client for Windows.

image

Click on Configure to bring up the following windows

image

Enter the Public DNS of your EC 2 instance for the Host address and hit OK.

Enter the Password that you just created for the user Ubuntu and hit Login. If you see this, Congrats Smile

image

 

 

It is recommended that you create Key pairs for optimal security.

 

The following forums helped in this installation:

http://ubuntuforums.org/showthread.php?t=1436218

Other ways of installing NX and EC 2

http://www.the-tech-tutorial.com/?p=101

Category: 0 comments

How to setup a micro instance running Ubuntu 10.0.4 on Amazon EC 2

Amazon, the giant has a beautiful service called EC 2 that lets you use their vast computing resources and super high speed internet network to setup your own server. The server is just like your computer except that you don’t control or own any hardware.

You get a command line through which you can access EC 2. In these tutorials I’ll be teaching you how to setup EC 2 starting with the basics. We will setup a remote access using an NX client, run OpenERP, Dropbox and an OpenVPN service.

Step 1:

Go to http://aws.amazon.com and signup for an account.

Once you are done with it click on the EC2 tab. Click on Instances—> Create new instance. You’ll see a window like the own below.

image

Click on Community AMI’s and search for ami-3e02f257

This is a Ubuntu Linux 10.0.4 micro instance and this is what we will be using for all my tutorials. Select it to head to the next step.

Step 2

Micro Instances are free for a year but have very low system resources. If you want a better server subscribe to one of the many plans that suit you.

image 

Step 3

image

It’s a Kougon instance Smile with tongue out ! Next Step

Step 4

image

image

Create a key pair, you’ll need this to login to your EC 2 instance via putty or other SSH clients. Save this key in a very very secure place. It will have an extension of *.pem

image

That’s it. Your instance is now ready to rock.

Step 5-1 : Connecting to the Instance

Get Putty from the official site here http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

I’d prefer using the Install Everything Installer. We will require Putty & Puttygen for the next few operations.

Putty cannot use the *.pem key that Amazon gave you when you generated the key and this has to be converted into a putty friendly *.ppk format. To do this…

Open Puttygen – > Click on Conversions in Menu Bar –> Click on Import Key.

Now you will see some weird data. That’s the key. Now click on Save private key

image

It will ask you if you really want to do it. Just do it. Save this ppk file just as safely as the pem file.

Step 5-2: Connect with Putty

Putty Should look like this.

The host name can be found in the AWS console. Click on your EC2 instance and note down the public DNS address listed under Description.

image

The other option that needs to change is Connection –> SSH—>Auth. It should look like this

image

The location of private key file is obviously that super secret place where you saved the ppk file.

hit Open :)

Step 6: Putty’d

In the Putty console that opens up, it’ll say some stuff about trusting the connection. You don’t have much choice so hit “Yes”

It’ll then ask for an username: Type in  ubuntu

image

Congratulations on Successfully creating & logging into your first EC-2 instance.

Category: 0 comments

How the Lokpal can actually change the very fabric of democracy in India?

Lokpal is a Legislative bill that is being pushed for implementation by a group calling itself the civil society, the aim of this new law is to make politicians accountable by having an independent investigating and prosecuting agency. The Lokpal with enough powers would be a legal vigilante. The life expectancy of a Lokpal is of course predictably uncertain.

Keeping the “Who will bell the cat” question on pause for a while, have a look at the larger power body that the lokpal wants to control, “The Prime Minister of India”. This is where all the juice is.

We Indians have a weird Constitution. As is the norm even now, our writers flipped the best parts of every constitution in the world to put together the largest and most ambiguously written constitution of their time. In the Copy-Paste job; they chose a President to be the head of the state and gave him all the powers before tying up his hands with a Prime Minister from the Ruling Part. Every activity of the government happens under the authorization and name of the President. He/She cannot be touched by anyone. He/She is the Supreme Commander of the armed forces. No Bill can be passed without his/her consent. And yet the President ends up being a puny pan at the hands of the ruling party.

And the most ridiculous part is that the Indian President is elected in the exact same manner as the US President!!! You read it right. I think we flipped the idea of the president from the Americans. Even though we “think” that the US president is elected by the people, he is not. The president is elected by members of the Legislative assembly(I know they call it something else, but I want to stick to terms I’m familiar with) and states who are in turn elected by the people. The reason behind this is a little complicated. It has to do with every region of the nation having an equal vote and to prevent a “son/daughter of the state” vote from electing an unworthy person as president. You want the best man/woman to lead the country and he should not be in power simply because his state had the most people and votes. Between, this was the reason why Bush won the 2004 elections even though he did not receive the popular vote. He had the support of more legislators!!!

In India, we do not “feel” that we elect the president directly because there has never been a presidential candidate who went to the people asking them to send him a legislature that would work for him. Our colorful prime ministers and remote controls held the power and they were happy. We’ve always been narrow thinkers, sufficient and happy with what goes inside our walls instead of thinking big. The Prime Minister represented the party that won the Legislative Assembly elections and they got to frame the laws. It didn’t matter if they could rule the country or if people even supported them. They stayed their for 5 years and kaboom they are gone. The Ministers are not accountable to anyone and they do everything in the name of a president who just becomes a namesake not doing their real function or realizing the massive power that they wield.

Now, comes the Lokpal. Suddenly the Prime Minister or any of his ministers can no longer do as they please. They are being watched and can be kicked out of office at any time by an Ombudsman they hired. An accountable Prime Minister becomes just another person. He works at office and has to go home in the evening. And suddenly the Indian President is the most powerful person in the country. We can fix the responsibility of running the country on him instead of the current uncertainty. Making someone responsible will change things dramatically. Instead of states fighting over petty politics. We’d have a President who’d rule India without fear of satisfying coalitions. The Coalitions would still exist and they would be the ruling party. But they’d be insignificant because they all need to answer the people and it’s the president who gets to invite a party to be a ruling party anyway.

I’m not sure if the Civil society thought of all these things. If they did, wow. if not, WOW! they’re gonna do an incredible job.

Category: 2 comments

Contributors