Tuesday, March 30, 2010

Ubuntu VNC keyboard Sync Issue AMAZON EC2

Applications -> System Tools -> Configuration Editor
Desktop -> Gnome -> Peripherals -> Keyboard -> KBD

Edit the layout key to delete what is there and add your "abfh" by typing asdf.

Then go to the Keyboard preferences and put back in US-105 if that's what you like.
System -> Preferences -> Keyboard
Layouts
Add
Choose your favorite. Hit OK, mark as default.

Restart VNC/EC2 Instance, and hope it works.

VNC ON UBUNTU AMAZON EC2

VNC on Ubuntu Feisty
I recently had the exciting opportunity to give Amazon EC2 a spin and as a first-time Linux-experiment, I opted to use Clint Pells' Ubuntu Feisty image with an aim to set up Ruby on Rails and some other goodies.

The goal

Coming from a Windows background, and having been spoiled with fancy GUI tools, the SSH terminal access felt somewhat intimidating, so I wanted remote-desktop-like connectivity to my EC2 instance. The following instructions outline the exact steps to connect to your EC2 Ubuntu image via VNC from your Windows Machine. At the time of writing, my knowledge of Linux systems is limited to the 5 hours I spent mucking around with my installation, so I am writing this tutorial for fellow developers that need a no-nonsense step-by-step guide.

Requirements

First, this is what you will need:
A running instance of the Ubuntu Feisty AMI (ami-898560e0)
Putty SSH client on your Windows machine that is connected to your instance
TightVNC Viewer on your Windows machine
Getting Your Hands Dirty

1. Make sure Ubuntu is updated

This is simple; type this in from your terminal:

sudo apt-get update

2. Install the Desktop Environment

The Ubuntu image that we are using does not have a Window manager, so we need to install this first on the server. This may take a while since it needs to be downloaded. In your terminal, type in:

sudo apt-get install x-window-system-core xserver-xorg gnome-desktop-environment

3. Install TightVNC Server

Next, we install the VNC server that we will be using.

sudo apt-get install tightvncserver

At one point, this will show a screen asking you to select screen dimensions, but I was content with the default options and just hit continue.

4. Launch the server

First we run VNCServer to set the password (I know you are probably lazy, but make it a $tR0nG password). In your terminal, type in:

vncserver

Next, set up a session ... By default, port :0 corresponds to port 5900, :1 to 5901 etc. Remember that no 'firewall configuration' is necessary since we will be using a SSH tunnel for security.

vncserver :1

This returns a message similar to New 'X' desktop is domU-XX-XX-XX-XX-XX-XX:1

5. Configure SSH Tunnel in Putty

Close down your SSH session and open Putty again. Under Category, go to Connection>SSH>Tunnels. In Source port, put 5901; in Destination, put your instance DNS name followed by :5901 i.e. ec2-XXX-XXX-XXX-XXX.z-2.compute-1.amazonaws.com:5901

6. Connect with VNCViewer

Open TightVNCViewer, and type in localhost:1, then hit OK. Then type in the VNC server password that you created in step 4. Once it launches, it may look crummy and ugly. If this is the case, it is because you didn't use the VNCViewer for fast compression. Next, you will notice a command screen but nothing else. DON'T PANIC! - I didn't set you up. Just type:

gnome-session

This will bring up the desktop environment and display a list of errors that you can ignore.

7. IMPORTANT: Shutting down your session

Lastly, you will need to know how to shutdown the VNCServer Session that you created. Simply type in the following from your SSH command prompt:

vncserver -kill :1

You are now Golden

You are now ready to access your EC2 instance securely and easily. Until next time ...

AMAZON EC2 LINUX STUFF

vnc on ubuntu ec2

http://dotnetrehab.blogspot.com/2007/04/vnc-on-ubuntu-feisty.html

java on ubuntu ec2:

http://www.ubuntugeek.com/how-to-install-java-runtime-environment-jre-in-ubuntu.html


keyboard issue on ubuntu

https://bugs.launchpad.net/ubuntu/+source/vino/+bug/112955/comments/31


java on ubuntu
http://www.java.com/en/download/manual.jsp
http://www.java.com/en/download/help/5000011400.xml

tomcat on ubuntu
http://ubuntuforums.org/showthread.php?p=226828

postgresql on ubuntu ec2

http://deadprogrammersociety.blogspot.com/2009/08/postgresql-on-ubuntu-on-ec2.html


Build AMI and upload to S3

http://docs.amazonwebservices.com/AWSEC2/latest/GettingStartedGuide/index.html?creating-an-image.html


mounting ebs to ec2 linux

http://clouddevelopertips.blogspot.com/2009/08/mount-ebs-volume-created-from-snapshot.html
http://www.randomtools.net/how-to-mount-amazon-ec2-ebs-volume-on-an-instances-file-system-76.html