Resize a Xen Image

So, you’ve got a few Xen images around, and they are starting to fill up. How do you add a few more gigs to ’em?

 root@tpe:/# xm shutdown vm01  
 root@tpe:/# cd /xenimages  
 root@tpe:/xenimages# dd if=/dev/zero bs=1024 count=1000000 >> vm01.img  
 root@tpe:/path/to/images# resize2fs -f vm01.img  
 

That’s it, you just added a gig to your image called ‘vm01.img’.

Katapult Screencast

Ian keeps bugging me at how great Quicksilver is. Knowning that there must be an alternative built for linux, I accidently stumbled across Katapult.

While it still has a little room to grow, Katapult makes a great tool in any KDE toolchest. Press ALT+SPACE, and your widget fires up, ready to take your orders. Since words don’t really do this justice, I created a screencast.

Katapult Screencast from Kelvin Nicholson on Vimeo.

Xen + nVidia

Status: ✅

I’ve played with quite a bit of virtualization, especially VMWare for ages. About eight months ago I started to play around with Xen, and got it to work great, except for the fact that the nvidia driver wouldn’t work with the Xen kernel. That said, I’m gonna give another go.

Throughout senior high, and especially my last year, I managed to score a bunch of old motherboards and random parts and pieces. Six or so years later, my parents are still finding old motherboards. Considering these computers were mainly P120s with 64-128 megs of RAM, they weren’t so hot. What is one to do?

As you could guess, when I started university I had quite a few computers in my room. I had about three or so P120s (one in a hampster cage, don’t ask), one AMD600, an AMD1ghz and one iBook (500 whooping mhz). Computers would die, get replaced, but overall they worked quite well. Considering almost all the computers ran Linux (the AMD1ghz also ran Windows – to play games – and the iBook sort of ran OSX – and YDL), every system was quite happy. I had an OpenBSD box as my gateway. Life was good.

But now I don’t like having five+ systems. Electricity alone is a strong factor, plus, I don’t really want to manage all those systems. Plus noise.

Because of this, I have two systems: my workstation/test lab, and my laptop. I hopefully will never need anything more. But, because of thise, I needed Xen to play nice with my Nvidia closed source driver – which when I tested it eight months or so ago, it wasn’t. Since then I have been using Linux-Vserver, and while it works great, my requirements have started to change.

Luckily Nvidia has released a few new updates, and a few hackers have patched the driver to include support for a xen-based kernel. Maybe I’ll write up a tutorial at some point.

Since I’ve already done the creation of the doms before, and it is somewhat similar to Vserver, everything went smoothly. You can expect some fun screencasts and experiments in the near future.

Open Source Video Editing

In the next year I plan to make a little video, nothing fancy likely, but something that will require an editor. However, I don’t own a mac (which rules our Final Cut Pro + After Effect and iMovie, which Ian and I both have had too much fun with. Inside joke.) I’m also a die-hard Linux fan, trying to hold out buying a mac for as long as possible.

SF to the rescure. There are four editors listed, and in the next year I’ll try them all. Overalll, they look quite promising.

Jahshaka – Beta. Good reviews from what I’ve seen.
Kdenlive – Alpha/Beta. Looks a lot less mature than Jahshaka, especially since I’m going to have to check it out via svn. But, the screenshots look quite impressive.
LiVES – Beta.

Three Little Commands and a Pen-Test

Yea, you read that right. Three commands and you can run a pen-test on your website/webserver. So, how?

kelvin@home:~$ sudo apt-get install nikto  
kelvin@home:~$ sudo nikto -update  
kelvin@home:~$ nikto -h www.thoughtdeposit.net

As you can see, Nikto is a web server scanner, apparently for over 3200 dangerous files/vulnerabilities. Additional features can be seen at the Nikto website, yet you will certainly want to add this old gem to your webserver toolbelt as soon as possible.

Lighttpd+Rewrite+OpenSEF+Joomla

For those of you not needing Apache and the whole kitchen sink, [insert reason here], Lighttpd is a very attractive contender. For me, it has a small memory footprint, which is highly appealing. However, getting SEO urls to work (i.e. utilizing rewrite), isn’t too straightforward.
Tada! A little research yields two helpful links: one at lighttpd.net regarding how to use ModRewrite and another showing how to slightly modify the .htaccess file used by OpenSEF and Apache.
So…

  1. Flush/clear any caches available
  2. Make sure site is listed in OpenSEFs manager inside Joomla
  3. Make sure SEO is Enabled insided the Joomla ‘Site Configuration’
  4. Change your host conditional statement so it matches this:
$HTTP[\"host\"] =~ \"(^|\\.)yourdomainname\\.com$\" {
     server.document-root = \"/var/www/your/domainlocation/\"
     url.rewrite-once = (
          \"^images*\\.(jpg|jpeg|gif|png)\" => \"$0\",
          \"^/administrator.*$\" => \"$0\",
          \"^/mambots.*$\" => \"$0\",
          \"(/|\\.htm|\\.php|\\.html|/[^.]*)$\" => \"/index.php\"
     )
}

Clear your browser cache, and check it out. If it doesn’t work, you can try to “Delete All” URLs inside OpenSEF, and then your site will rebuild as necessary. Another note, as you can maybe tell by the above ruleset: you can have rewrite ignore directories. Just include:

\"^/directory.*$\" => \"$0\",

Unified Linux Desktop Experience

I’ll admit, I think one of the thickest barriers to entry regarding Linux is variety. I love variety, but general end users don’t adjust well to change (IMHO). Thus enter the stage: Portland. So, what does this mean to the end user? This means that, eventually, the UI throughout linux will all look similar – regardless if it is designed to utilize GTK, QT or anything else (that is, if it is built off the Portland standard).

Sweeeet.

And as a runner-up, worth mentioning, the user driven Tango Desktop Project

HTML Validification Browser-Side

I like most standards, I can’t deny it. One thing that I find too humorous is the amount of sites that are not valid, even sites that claim they are. One tool in my box is HTML Validator, an extensioin for Firefox. A nice little icon appears in the lower right, indicating whether a page is valid, not-so-valid, or really-not-so-valid. Makes it easy to check your own sites, and others.

Convert VMWare Movie to FLV

This little process, a total of two lines, took way to long to figure out.

First, we convert the VMware avi (VMnc format) to the Microsoft avi format.

 mencoder -of avi -ovc lavc movie.avi -o movie2.avi 

Next, we convert the Microsoft avi format to FLV format.

 ffmpeg -i movie2.avi -r 12  -b 100 movie.flv 

You can play around with the -r switch (rate per second) and the -b switch (bitrate). But, if those get larger, so does your FLV file.

Another VPN Node

Status: ✅

After consulting several vendors in Kuala Lumpur, I was able to get the right Cisco with the right IOS. One of their technicians came and installed it, and that night I hooked it up to our VPN. Besides the fact that the internet distribution is still a little shady in Kuala Lumpur, the connection remains somewhat stable, and yet another node is brought on the company intranet.