Saturday, June 19, 2010

VNC to a headless ubuntu server

So I have a Ubuntu server that I have set up as a multipurpose server. For instance it is set up as a RAID 5 file server and a platform for a Windows server 2008 Virtual Machine which is running as a WAMP server to host my personal website. I have been using Virtual Box and to my dismay, the configuration file for my web server got corrupted. As a result my virtual machine would not respond when I tried to start it via the command line.

So rather than try to troubleshoot via the command line I wanted to fire up the GUI and troubleshoot that way. The problem was my server is running headless, meaning without a mouse, monitor or keyboard. Normally to administrate it I would simply log in with SSH but this problem required the GUI (but that is another article all together).

VNC to the Rescue!

Now according to the Steve Harman's blog Ubuntu supports VNC by default but you have to have an active-x windows session already started. So short of setting up a monitor and keyboard on my server, I had no way to start this... except with the power of TightVNC Server. Note that this guide assumes that you have already installed the gnome desktop.

1. So I started off by initiating an SSH session into my server and downloading tight VNC server.

sudo apt-get install tightvncserver

2. Next I set up gnome to start when vnc server starts up.

sudo nano ~/.vnc/xstartup


#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
/etc/X11/Xsession
export XKL_XMODMAP_DISABLE=1
gnome-session &


**Note that the line "export XKL_XMODMAP...." must be added or the VNC client's keyboard map will be messed up**

3. Start the Tight VNC server.


vncserver –geometry widthxheight –depth 24

Now I have read that it may ask for a password here but I didn't have to enter one when I set mine up.

4. Download and install the TightVNC Client
Tight VNC can be downloaded from here for all platforms. It is pretty simple to install so I wont go into too much detail here.

5. Launch the VNC client and log into your server.
One thing to note that I ran into was that when I put the servers ip address in I also had to specify a port (port 1). If I did not specify this port then I could not connect. So for example in the "server" field I had to put in:
192.168.1.3:1

Then it will ask you for your password. The one that I entered here was the password for the account I used to install the VNC server.

You should now be able to see your servers desktop :p

Thursday, June 17, 2010

It's been awhile....

It has been far too long since I posted anything on here. So here is an update with my life.

Sadly, my internship at Intel just ended. I learned quite a bit about the intricacies of hardware. I now understand how much testing that a single component goes through before it is released to the public. In addition to the hardware testing that I did, I also learned a little bit about electrical engineering and I was able to get some soldering experience as well. Now I am by no means competent in EE but I am at least able to follow along with what some of the engineers are saying :) I was able to apply my networking and systems analysis expertise there as well. Some of the hardware testing we did had to do with machines on a domain. Before I left, I got the opportunity to set up a virtual domain on a server cluster that was managed by another group. I'm not at liberty to discuss the intricacies of this system but what I can say is that it made setting up a domain extremely quick and easy. The last thing I did before I left was set up an exchange 2007 server, which was quite....fun. I have 6 months to wait before I can get another internship there. Fingers crossed! I suppose without breaking my NDA, this is all I can say about Intel.

As far as school goes, I just graduated Portland Community College with two Associates of Applied Science degrees, one in Computer Information Systems and the other in Networking. While I am excited that I am done with my degrees there, I am a bit discouraged with the fact that I still have 36 more classes to take before I get my Bachelors. However, I am looking forward to the challenge. I know that if I am persistent I can do it with little trouble. Speaking of which, I just got accepted to OIT where I plan on taking classes to get a Bachelors in Systems Analysis.

As I said, my internship just ended which means I don't have a job currently. To tell you the truth I am going crazy with all this free time I have. I made a list of all the things that I want to do while I am unemployed but I'm not sure how well I am going to stick to it. Anyway my plan is to claim unemployment for six months until I can get hired back at Intel. I know that I can probably get my old position back no problem but I am having difficulty deciding whether or not to hold out for a networking internship. I suppose we will see in a few months. Anyway while I am unemployed I suppose I will get some certifications. I am currently studying for the network+ certification and I plan on trying for the CCNA afterwords. Ill post updates on how well those are going. Other than that I am just going to get some classes out of the way for OIT and start there in the fall.

Anyway I am off to watch some Star Trek with Tia. I plan on writing here more but with cool tech stuff that I do over the summer. Anyway, see you later!