August 2008 Archive

htaccess Subdomain Redirection

August 8th, 2008

My blog is set up as a subdomain to my main site so http://bobpeers.com/blog/ should really serve the content from http://blog.bobpeers.com.

Just recently I noticed that link pointing to my blog directories but accessed through the main site were not returning 404 pages for missing pages. For example a link pointing to http://bobpeers.com/blog/page-not-here would just serve the content from http://bobpeers.com. To force requests to the blog to be server by the subdomain i just added this line to my .htaccess file.

Redirect permanent /blog http://blog.bobpeers.com

Now any request for a page under the blog subdirectory will be permanently (http code 301) redirected to http://blob.bobpeers.com, so for example:

request http://bobpeers.com/blog/2008/08/page
serves http://blog.bobpeers.com/2008/08/page

Encryption Using Gnome Seahorse

August 6th, 2008

After my previous post about GNU Privacy Assistant and not having an easy encryption option built into Nautilus it seems that i didn’t look very far.

Today I researched a bit deeper and installed Gnome Seahorse. Essentially this does exactly what I was looking for.

  • It allows creation of new keys.
  • It recognised already created keys, my pgp key created using GPA yesterday was immediately available.
  • Encrytion, decryption and signing are all built into nautilus either through the file menu or the context sensitive menu when you right click on a file or folder.
  • It actually prompts me for my pgp key passphrase, unlike GPA!

Next I might look into encrypting whole partitions. I know this can be done during the install process using the Anaconda installer with Fedora but from the pages I’ve read it seems that to encrypt a partition after install is considerably harder, plus all the data on the partition is lost during the process so it’s not a simple procedure.

GNU Privacy Assistant

August 5th, 2008

I decided to give GPA a try just to see how easy it is to encrypt files on Linux. The program installed no problem using yum.

# yum install gpa

Upon starting I created a key (when the warning says this takes a while it’s no lie, it took about 5 minutes on my computer but I’ve since read that it’s a good idea to press some keys and move the mouse to generate random data faster) and then encrypted a test file, no problem there.

Next I tried to decrypt the same file but I just got a warning saying ‘Wrong Passphrase’, I understand the warning but the problem is that I never get prompted to enter the passphrase! Looks like I’ll have to learn the command line instead.

It’s also a shame that encryption is not better integrated into the file manager. In Windows it’s certainly very easy to encrypt files from Windows Explorer, even through the context menu, I’d really like to see the same in Gnome.

Arbitrary Ordering Files

August 5th, 2008

This isn’t something I would normally think about since I know you can only sort folders by name, date or any other property available. However a friend had a problem with her computer and asked me to take a look. The problem was that she wanted to reorganise a folder of holiday photos in an arbitrary order chosen by her, basically drag and drop to reorder the items.

I slowly explained that it basically wasn’t possible except for some horrible hack of renaming the files to force them into alphabetical order to match her wishes or altering the dates on the images.

It was then that I realised that I couldn’t think of a good reason why this can’t be done. I’m happy with the way my folders are sorted but only because I’ve grown accustomed to the way computers work. In real life we often reorder items in seemingly arbitrary fashion to suit our needs, for example placing papers on top of a pile so we don’t forget them, or laying a document on my keyboard so there’s no way I can miss it when I return from lunch.

Maybe we need more flexible sorting so I can have my most frequently viewed files in a folder appear at the top or just drag them around in any order I feel like.

Fedora 9 No Sound on Flash Videos

August 2nd, 2008

After living with no sound on flash videos since I installed Fedora 9 ( I don’t watch many videos as you may have guessed :-) ) I decided to look for a fix tonight. It turned out to be much simpler than I imagined, I should have done it ages ago!

For reference I had all other system sounds but the controls on the playback page of the Pulse Audio Volume Control just flickered.

Just install libflashsupport as root and you’re good to go.

# yum install libflashsupport

Found on this page, http://clunixchit.blogspot.com/2007/11/firefox-no-sound-on-flash-videos.html.