<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3451044629175879102</id><updated>2012-02-16T04:55:42.894-05:00</updated><category term='Java-Script'/><category term='Ubuntu'/><category term='EC2'/><title type='text'>.Net Rehab</title><subtitle type='html'>Open-Source Technologies from a .Net Developer's Perspective</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dotnetrehab.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3451044629175879102/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dotnetrehab.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Christian Toivola</name><uri>http://www.blogger.com/profile/10816566205390979130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3451044629175879102.post-6021786577565981504</id><published>2009-01-04T13:07:00.002-05:00</published><updated>2009-01-04T13:09:58.227-05:00</updated><title type='text'>I moved my blog!</title><content type='html'>I have moved my blog over to my company website - http://dev360.com/.. The new blog covers more Python- and Django-specific topics.

Best regards,

Christian&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3451044629175879102-6021786577565981504?l=dotnetrehab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetrehab.blogspot.com/feeds/6021786577565981504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3451044629175879102&amp;postID=6021786577565981504' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3451044629175879102/posts/default/6021786577565981504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3451044629175879102/posts/default/6021786577565981504'/><link rel='alternate' type='text/html' href='http://dotnetrehab.blogspot.com/2009/01/i-moved-my-blog.html' title='I moved my blog!'/><author><name>Christian Toivola</name><uri>http://www.blogger.com/profile/10816566205390979130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3451044629175879102.post-7056029135525490442</id><published>2008-03-12T21:49:00.003-05:00</published><updated>2008-03-12T21:57:39.398-05:00</updated><title type='text'>IronPython masterpages in VS.NET</title><content type='html'>&lt;p&gt;If you have installed the ASP.NET Futures and IronPython, you may notice that you get the following error when right-clicking over your MasterPage and selecting "Add Content Page" from the Solution Explorer in VS.NET 2005:&lt;/p&gt;

&lt;p class="code"&gt;Could not find a part of the path 'C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ItemTemplatesCache\Web\IronPython\1033\WebForm.Zip\WebForm.vstemplate'.&lt;/p&gt;

&lt;p&gt;I did not try to find where this file was, but I noticed that MasterPages worked just fine if you declare them manually by setting the MasterPageFile attribute in the @Page directive of your aspx page.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3451044629175879102-7056029135525490442?l=dotnetrehab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetrehab.blogspot.com/feeds/7056029135525490442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3451044629175879102&amp;postID=7056029135525490442' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3451044629175879102/posts/default/7056029135525490442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3451044629175879102/posts/default/7056029135525490442'/><link rel='alternate' type='text/html' href='http://dotnetrehab.blogspot.com/2008/03/ironpython-masterpages-in-vsnet.html' title='IronPython masterpages in VS.NET'/><author><name>Christian Toivola</name><uri>http://www.blogger.com/profile/10816566205390979130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3451044629175879102.post-7347166512886101539</id><published>2008-01-28T22:21:00.001-05:00</published><updated>2008-03-12T21:48:34.582-05:00</updated><title type='text'>PyCrypto install/build problems</title><content type='html'>&lt;p&gt;Today I was in need of some basic encryption for my django app, and scoured the internet for answers. To my great surprise, this wasn't even listed as a recipe in the Python Cookbook from O'Reilly, but it was easy to find a good tool online, which I did in &lt;a href="http://www.amk.ca/python/code/crypto.html"&gt;pycrypto&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;However, I had problems building the project on Feisty Fawn using 'python setup.py install', but apt-get came through graciously&lt;/p&gt;

&lt;p class="code"&gt;# apt-get install python-crypto&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3451044629175879102-7347166512886101539?l=dotnetrehab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetrehab.blogspot.com/feeds/7347166512886101539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3451044629175879102&amp;postID=7347166512886101539' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3451044629175879102/posts/default/7347166512886101539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3451044629175879102/posts/default/7347166512886101539'/><link rel='alternate' type='text/html' href='http://dotnetrehab.blogspot.com/2008/01/pycrypto-installbuild-problems.html' title='PyCrypto install/build problems'/><author><name>Christian Toivola</name><uri>http://www.blogger.com/profile/10816566205390979130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3451044629175879102.post-2123005566628251749</id><published>2008-01-22T21:02:00.001-05:00</published><updated>2008-03-12T21:48:57.847-05:00</updated><title type='text'>Installing Erlang on Fiesty Fawn</title><content type='html'>&lt;p&gt;I have been playing around with a facebook app prototype in Erlang for some time on my dev box and today I decided to try to take it one step further and put it up on my production server.. My dev machine installed erlang and yaws just fine, but the same could not be said about my production server which also was running Ubuntu Feisty Fawn.&lt;/p&gt;

&lt;p&gt;Aptitude burped up a nasty message saying:&lt;/p&gt;

&lt;p class="code"&gt;The following packages have unmet dependencies:
    erlang-base-hipe: Depends: libc6 ( &gt;= 2.5-0ubuntu1) but 2.4-1ubuntu12.3 is to be installed
    Depends: libssl0.9.8 (&gt;= 0.9.8c-1) but 0.9.8-c1) but 0.9.8b-2ubuntu2.2 is to be installed
&lt;/p&gt;

&lt;p&gt;Fastforward to the solution: install it from the edgy universe instead.&lt;/p&gt;

&lt;p class="code"&gt;# aptitude install erlang-base-hipe -t edgy&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3451044629175879102-2123005566628251749?l=dotnetrehab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetrehab.blogspot.com/feeds/2123005566628251749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3451044629175879102&amp;postID=2123005566628251749' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3451044629175879102/posts/default/2123005566628251749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3451044629175879102/posts/default/2123005566628251749'/><link rel='alternate' type='text/html' href='http://dotnetrehab.blogspot.com/2008/01/installing-erlang-on-fiesty-fawn.html' title='Installing Erlang on Fiesty Fawn'/><author><name>Christian Toivola</name><uri>http://www.blogger.com/profile/10816566205390979130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3451044629175879102.post-2233619866988201722</id><published>2007-05-12T12:04:00.000-05:00</published><updated>2007-05-12T12:56:10.576-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='EC2'/><title type='text'>Installing Subversion with HTTP Access</title><content type='html'>&lt;p&gt;Installing Subversion to your Ubuntu server is very easy. Just follow the steps below and you will be up and running in minutes...&lt;/p&gt;

&lt;h3&gt;Installation Guide&lt;/h3&gt;
&lt;h4&gt;1. Download and Install Software&lt;/h4&gt;
&lt;p&gt;If you dont have Apache2 installed, then run this:&lt;/p&gt;
&lt;p class="code"&gt;
  sudo apt-get install apache2
&lt;/p&gt;
&lt;p&gt;Next, we install Subversion and libapache2-svn&lt;/p&gt;
&lt;p class="code"&gt;
  sudo apt-get install subversion libapache2-svn
&lt;/p&gt;

&lt;h4&gt;2. Setting Up Users and Groups&lt;/h4&gt;
&lt;p&gt;The only quirk here for me was that Ubuntu Fiesty didn't allow me see system users from System&amp;gt;Administration&amp;gt;Users &amp;amp; Groups, so instead I created it from the terminal. Here, we will create the subversion group and then add www-data (Apache) to that group. &lt;/p&gt;
&lt;p class="code"&gt;
 sudo groupadd subversion &lt;br /&gt;
 usermod -G subversion www-data
&lt;/p&gt;


&lt;h4&gt;3. Creating Repository and Folders&lt;/h4&gt;
&lt;p&gt;
 Next we need to create the svn directories. From here on, substitute &lt;i&gt;&amp;lt;projectname&amp;gt;&lt;/i&gt; with the name you want to use for your repository. I typically create a new repository for each new project.
&lt;/p&gt;
&lt;p class="code"&gt;
 sudo mkdir /home/svn &lt;br /&gt;
 cd /home/svn &lt;br /&gt;
 sudo mkdir &lt;i&gt;&amp;lt;projectname&amp;gt;&lt;/i&gt; &lt;br /&gt;
 sudo chown -R root:subversion &lt;i&gt;&amp;lt;projectname&amp;gt;&lt;/i&gt; &lt;br /&gt;
 sudo chmod -R g+rws &lt;i&gt;&amp;lt;projectname&amp;gt;&lt;/i&gt; &lt;br /&gt;
 sudo svnadmin create /home/svn/&lt;i&gt;&amp;lt;projectname&amp;gt;&lt;/i&gt; &lt;br /&gt;
&lt;/p&gt;
&lt;h4&gt;4. Configuring Apache&lt;/h4&gt;
&lt;p&gt;
  Next, we have to add a snippet in your /etc/apache2/apache2.conf file:
&lt;/p&gt;
&lt;p class="code"&gt;
  &amp;lt;Location /svn/&lt;i&gt;&amp;lt;projectname&amp;gt;&lt;/i&gt;&amp;gt; &lt;br /&gt;
     DAV svn &lt;br /&gt;
     SVNPath /home/svn/&lt;i&gt;&amp;lt;projectname&amp;gt;&lt;/i&gt; &lt;br /&gt;
     AuthType Basic &lt;br /&gt;
     AuthName &amp;quot;My Subversion Repository&amp;quot; &lt;br /&gt;
     AuthUserFile /etc/subversion/passwd &lt;br /&gt;
     &amp;lt;LimitExcept GET PROPFIND OPTIONS REPORT&amp;gt; &lt;br /&gt;
        Require valid-user &lt;br /&gt;
     &amp;lt;/LimitExcept&amp;gt; &lt;br /&gt;
  &amp;lt;/Location&amp;gt; &lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;
Then, we will have to restart Apache:
&lt;/p&gt;
&lt;p class="code"&gt;
  sudo /etc/init.d/apache2 restart
&lt;/p&gt;
&lt;p&gt;
  Then, we can add users to your repository.
  &lt;strong&gt;NOTE: the following command is run with the -c switch because it creates the password file since it doesnt exist yet. If you need to add subsequent users, then drop the -c flag from the command otherwise you will wipe out the users that you have added previously&lt;/strong&gt;
&lt;/p&gt;
&lt;p class="code"&gt;
 sudo htpasswd2 -c /etc/subversion/passwd &amp;lt;username&amp;gt;
&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;You should now be able to browse your repository from your browser by typing:&lt;/p&gt;
&lt;p class="code"&gt;
  http://&amp;lt;your-server-name&amp;gt;/svn/&lt;i&gt;&amp;lt;projectname&amp;gt;&lt;/i&gt;
&lt;/p&gt;
&lt;p&gt;
  If you are using EC2, make sure you have port 80 open for your server. If not, you can run the command &lt;span class="code"&gt;ec2-authorize default -p 80 &lt;/span&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3451044629175879102-2233619866988201722?l=dotnetrehab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetrehab.blogspot.com/feeds/2233619866988201722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3451044629175879102&amp;postID=2233619866988201722' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3451044629175879102/posts/default/2233619866988201722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3451044629175879102/posts/default/2233619866988201722'/><link rel='alternate' type='text/html' href='http://dotnetrehab.blogspot.com/2007/05/installing-subversion-with-http-access.html' title='Installing Subversion with HTTP Access'/><author><name>Christian Toivola</name><uri>http://www.blogger.com/profile/10816566205390979130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3451044629175879102.post-5731902021756263223</id><published>2007-05-01T21:22:00.000-05:00</published><updated>2007-05-02T12:10:39.911-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java-Script'/><title type='text'>Validation with Object-Oriented Java-Script</title><content type='html'>&lt;p&gt;When venturing outside of the comfortable world of ASP.NET, it is normal to miss some neat features, like validation for example. Most civilized web frameworks worth their name provide some type of facility for this, but NOT the one I was working with the other day. Let's not mention any names.&lt;/p&gt;

&lt;p&gt;I'm not a big fan of redundant coding, so I decided I would use an ** uhm **  object-oriented approach to validation in java-script. The following snippet illustrates how validation works with the aforementioned object, which can be downloaded &lt;a href="http://dev360.com/dev360/js/validation.js" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;The code&lt;/h4&gt;
&lt;h5&gt;Within your &amp;lt;head&amp;gt; tags&lt;/h5&gt;
&lt;p class="code"&gt;
&amp;lt;script&amp;nbsp;type=&amp;quot;text/javascript&amp;quot;&amp;nbsp;src=&amp;quot;js/Validator.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
&lt;br/&gt;&amp;lt;style&amp;nbsp;type=&amp;quot;text/css&amp;quot;&amp;gt;
&lt;br/&gt;&amp;nbsp;.Validation{&amp;nbsp;display:&amp;nbsp;none;&amp;nbsp;color:&amp;nbsp;maroon;&amp;nbsp;}
&lt;br/&gt;&amp;lt;/style&amp;gt;
&lt;/p&gt;

&lt;h5&gt;Within your &amp;lt;body&amp;gt; tags&lt;/h5&gt;
&lt;p class="code"&gt;
&amp;lt;label&amp;nbsp;for=&amp;quot;Email&amp;quot;&amp;gt;Email&amp;nbsp;address&amp;nbsp;*&amp;lt;/label&amp;gt;
&lt;br/&gt;&amp;lt;input&amp;nbsp;id=&amp;quot;Email&amp;quot;&amp;nbsp;name=&amp;quot;Email&amp;quot;&amp;nbsp;/&amp;gt;
&lt;br/&gt;&amp;lt;label&amp;nbsp;for=&amp;quot;EmailVerify&amp;quot;&amp;gt;Verify&amp;nbsp;Email&amp;nbsp;address&amp;nbsp;*&amp;lt;/label&amp;gt;

&lt;br/&gt;&amp;lt;input&amp;nbsp;id=&amp;quot;EmailVerify&amp;quot;&amp;nbsp;name=&amp;quot;EmailVerify&amp;quot;&amp;nbsp;/&amp;gt;
&lt;br/&gt;
&lt;br/&gt;&amp;lt;span&amp;nbsp;id=&amp;quot;IsEmailMsg&amp;quot;&amp;nbsp;class=&amp;quot;Validation&amp;quot;&amp;gt;The&amp;nbsp;email&amp;nbsp;address&amp;nbsp;you&amp;nbsp;entered&amp;nbsp;is&amp;nbsp;not&amp;nbsp;valid.&amp;lt;/span&amp;gt;

&lt;br/&gt;&amp;lt;span&amp;nbsp;id=&amp;quot;AreEqualMsg&amp;quot;&amp;nbsp;class=&amp;quot;Validation&amp;quot;&amp;gt;The&amp;nbsp;email&amp;nbsp;addresses&amp;nbsp;are&amp;nbsp;not&amp;nbsp;valid.&amp;lt;/span&amp;gt;
&lt;br/&gt;
&lt;br/&gt;&amp;lt;script&amp;nbsp;type=&amp;quot;text/javascript&amp;quot;&amp;gt;

&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var&amp;nbsp;v&amp;nbsp;=&amp;nbsp;new&amp;nbsp;Validator();
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;v.add(&amp;nbsp;new&amp;nbsp;validateIsEmail(&amp;nbsp;$('Email')&amp;nbsp;),&amp;nbsp;$('IsEmailMsg')&amp;nbsp;);
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;v.add(&amp;nbsp;new&amp;nbsp;validateAreEqual(&amp;nbsp;$('Email'),&amp;nbsp;$('EmailVerify')&amp;nbsp;),&amp;nbsp;$('AreEqualMsg')&amp;nbsp;);

&lt;br/&gt;&amp;lt;/script&amp;gt;
&lt;br/&gt;
&lt;br/&gt;&amp;lt;input&amp;nbsp;type=&amp;quot;submit&amp;quot;&amp;nbsp;value=&amp;quot;Save&amp;quot;&amp;nbsp;onclick=&amp;quot;return&amp;nbsp;v.validate();&amp;quot;&amp;nbsp;/&amp;gt;
&lt;/p&gt;

&lt;h4&gt;Summary&lt;/h4&gt;
&lt;p&gt;
This basic validation component can easily be extended to accommodate a number of different scenarios and validation mechanisms. Right now, it supports basic comparisons as well as regular expressions. Because I had to put this together in a hurry, it currently only validates input boxes and selects. The only known limitation so far is that the initialization script block has to be placed AFTER form-elements and BEFORE the submit button which calls the validator. There are, however, ways to rewrite the code to overcome this limitation if needed.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3451044629175879102-5731902021756263223?l=dotnetrehab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetrehab.blogspot.com/feeds/5731902021756263223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3451044629175879102&amp;postID=5731902021756263223' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3451044629175879102/posts/default/5731902021756263223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3451044629175879102/posts/default/5731902021756263223'/><link rel='alternate' type='text/html' href='http://dotnetrehab.blogspot.com/2007/05/validation-with-object-oriented-java.html' title='Validation with Object-Oriented Java-Script'/><author><name>Christian Toivola</name><uri>http://www.blogger.com/profile/10816566205390979130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3451044629175879102.post-6938117060241667377</id><published>2007-04-29T17:29:00.000-05:00</published><updated>2007-04-30T20:43:01.470-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='EC2'/><title type='text'>VNC on Ubuntu Feisty</title><content type='html'>&lt;p&gt;I recently had the exciting opportunity to give Amazon EC2 a spin and as a first-time Linux-experiment, I opted to use &lt;a href="http://developer.amazonwebservices.com/connect/entry!default.jspa?categoryID=101&amp;externalID=661&amp;fromSearchPage=true"&gt;Clint Pells' Ubuntu Feisty image&lt;/a&gt; with an aim to set up Ruby on Rails and some other goodies.&lt;/p&gt;

&lt;h4&gt;The goal&lt;/h4&gt;
&lt;p&gt;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.&lt;/p&gt;

&lt;h4&gt;Requirements&lt;/h4&gt;
First, this is what you will need:
&lt;ul&gt;
&lt;li&gt;A running instance of the Ubuntu Feisty AMI (ami-898560e0)&lt;/li&gt;
&lt;li&gt;Putty SSH client on your Windows machine that is connected to your instance&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.tightvnc.com/download.html"&gt;TightVNC Viewer&lt;/a&gt; on your Windows machine&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;Getting Your Hands Dirty&lt;/h4&gt;

&lt;h5&gt;1. Make sure Ubuntu is updated&lt;/h5&gt;
&lt;p&gt;This is simple; type this in from your terminal:
&lt;/p&gt;
&lt;p class="code"&gt;
sudo apt-get update
&lt;/p&gt;

&lt;h5&gt;2. Install the Desktop Environment&lt;/h5&gt;
&lt;p&gt;
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:
&lt;/p&gt;
&lt;p class="code"&gt;
sudo apt-get install x-window-system-core xserver-xorg gnome-desktop-environment
&lt;/p&gt;

&lt;h5&gt;3. Install TightVNC Server&lt;/h5&gt;
&lt;p&gt;
Next, we install the VNC server that we will be using.
&lt;/p&gt;
&lt;p class="code"&gt;
sudo apt-get install tightvncserver
&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;

&lt;h5&gt;4. Launch the server&lt;/h5&gt;
&lt;p&gt;
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:
&lt;/p&gt;
&lt;p class="code"&gt;
vncserver
&lt;/p&gt;
&lt;p&gt;
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.&lt;/p&gt;
&lt;p class="code"&gt;
vncserver :1
&lt;/p&gt;
&lt;p&gt;
This returns a message similar to &lt;strong&gt;New 'X' desktop is domU-XX-XX-XX-XX-XX-XX:1&lt;/strong&gt;
&lt;/p&gt;
&lt;h5&gt;5. Configure SSH Tunnel in Putty&lt;/h5&gt;
&lt;p&gt;
Close down your SSH session and open Putty again. Under Category, go to Connection&gt;SSH&gt;Tunnels. In &lt;i&gt;Source port&lt;/i&gt;, put &lt;strong&gt;5901&lt;/strong&gt;; in &lt;i&gt;Destination&lt;/i&gt;, put your instance DNS name followed by :5901 i.e. &lt;strong&gt;ec2-XXX-XXX-XXX-XXX.z-2.compute-1.amazonaws.com:5901&lt;/strong&gt;
&lt;/p&gt;
&lt;h5&gt;6. Connect with VNCViewer&lt;/h5&gt;
&lt;p&gt;
Open TightVNCViewer, and type in &lt;strong&gt;localhost:1&lt;/strong&gt;, 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: 
&lt;/p&gt;
&lt;p class="code"&gt;
gnome-session
&lt;/p&gt;
&lt;p&gt;This will bring up the desktop environment and display a list of errors that you can ignore.&lt;/p&gt;
&lt;h5&gt;7. IMPORTANT: Shutting down your session&lt;/h5&gt;
&lt;p&gt;
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:
&lt;/p&gt;
&lt;p class="code"&gt;
vncserver -kill :1
&lt;/p&gt;
&lt;h4&gt;You are now Golden&lt;/h4&gt;
&lt;p&gt;
You are now ready to access your EC2 instance securely and easily. Until next time ...
&lt;/p&gt;
&lt;p&gt;
Yours truly,&lt;br /&gt;&lt;br /&gt;
Christian Toivola
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3451044629175879102-6938117060241667377?l=dotnetrehab.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetrehab.blogspot.com/feeds/6938117060241667377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3451044629175879102&amp;postID=6938117060241667377' title='24 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3451044629175879102/posts/default/6938117060241667377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3451044629175879102/posts/default/6938117060241667377'/><link rel='alternate' type='text/html' href='http://dotnetrehab.blogspot.com/2007/04/vnc-on-ubuntu-feisty.html' title='VNC on Ubuntu Feisty'/><author><name>Christian Toivola</name><uri>http://www.blogger.com/profile/10816566205390979130</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>24</thr:total></entry></feed>
