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
Posted in Computing, Linux, Web | Tagged .htaccess, redirect, subdomain |
No responses »
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.
Posted in Computing, Linux | Tagged encryption, gnome, seahorse |
No responses »
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.
Posted in Computing, Linux | Tagged assistant, encrypt, gnu, privacy |
No responses »
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.
Posted in Computing | Tagged arbitrary, files, sort |
No responses »
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.
Posted in Computing, Linux, Web | Tagged fedora, flash, libflashsupport, sound |
No responses »
July 31st, 2008
Sometimes it’s useful to be able to create a file of a specific size for testing purposes, for example to test network bandwidth by copying a large file of known size. It easy to do on both Linux and Windows.
First on Linux:
dd if=/dev/zero of=file.img bs=1k count=10000
This creates a 10MB file called file.img, bs is the block size so this command would have the same effect.
dd if=/dev/zero of=file.img bs=1M count=10
You can try different block sizes and counts to get the desired result.
Now on Windows:
fsutil file createnew file.img 10485760
This creates a file called file.img of 10485760 bytes (1024*1024*10).
Posted in Computing | Tagged create, dd, file, fsutil |
No responses »
July 31st, 2008
I came across this very strange error message in Microsoft Excel today. The user has a workbook with 114 charts and he seemed to be hitting some hard limit in Excel.
It turns out that if you create a chart with it’s font set to ‘Auto scale’ then instead of using one font it uses 2 ore more and there is a limit of 512 fonts per workbook. The fix is easy, there’s even a script to loop through all the chart objects and change the setting for you.
For the solution see the page on the Microsoft Help and Support.
Posted in Computing, Windows | Tagged error, excel, fonts |
No responses »
July 25th, 2008
The title says it all. This page describes how to do it and to stop the wp_posts table filling up with multiple copies of the same post.
Posted in Computing, Web | Tagged post revision, wordpress |
No responses »
July 25th, 2008
I was looking for some small file icons to use in a web page on a company Intranet site. I found some icons at splitbrain.com that are in the public domain and so are free to use/modify/do whatever you feel like for personal or commercial use.
Posted in Computing, Web | Tagged icons, public domain |
No responses »
July 25th, 2008
I decided to download and install Ubuntu 8.04 into a Virtualbox virtual machine last night and something funny occurred to me for the first time.
In the past with slow internet connections it would take many hours to download a 694 MB iso file (even at 2Mbps it would take 46 minutes) but with my 25Mbps connection it took about 4 1/2 minutes! Then I stared the installation, my laptop hard drive chugged away at 4200 rpm while the processor struggled to uncompress the iso. In all it took about 30 minutes to install, so actually downloading the iso file was about 7 times faster than the installation procedure! How times have changed.
Systems always have a bottleneck and any system can only process data at the rate of the weakest (slowest) link. Upgrading computers and networks always involves replacing one slow link with another. In my own network I’m in a constant process of up replacing each new bottleneck as it appears.
Right now I have 2 devices with gigabit network cards but both my laptop and router are limited to 100Mbps so everything runs at 100mbps. The next step is to replace the router with a gigabit wireless N version (maybe the D-Link DIR-655) and then replace the laptop.
Posted in Computing | Tagged bottleneck, gigabit, ubuntu, virtualbox |
No responses »