You are here: CrunchBang → Archives → October '07
Wednesday, October 31st, 2007
A quote from the article, "A new way of social engineering" by PandaLabs:
Now, look at yourself, you are a human automated captcha reader. If you type the correct interpretation of the image, you are sending the information necessary to break the protection of the targeted site. This attack could be used to create massive mail accounts, for comment posting…
My blog has recently begun attracting its first comment spam and I found this really interesting. Personally, I've never liked captchas. Apart from being really hard to read they also present accessibility issues. I think I'm going to stick to moderating my comments — at least until I've created a better solution!
Having said that, I'd really like to put some comment spam protection in place for Whird before its first release. It seems only the proper [responsible] thing to do. I can guarantee it will not involve the use of a captcha.
Thanks to Adrian von Bidder for pointing out the PandaLabs article.
Wednesday, October 31st, 2007
Last night I read a post by Christer Edwards about installing the free Liberation fonts from Red Hat. I remember reading about and installing these fonts when they were first released. I also remember thinking that they do make good free alternatives to some of the more popular commercial fonts [Arial, Times New Roman, Courier New etc.]
Liberation Examples



Packaged for Ubuntu
I was surprised when reading Christer's instructions that there wasn't a package available to easily install these fonts. With that in mind I made one and uploaded it to my PPA on Launchpad.
You can get the .deb file here: http://launchpadlibrarian.net/10220496/ttf-liberation_0.0.1-0ubuntu1%7Eppa2_all.deb
Or, to install via apt simply follow the instructions below. The instructions should work for both Feisty and Gutsy.
1. Open your apt sources.list file for editing with the following terminal command:
gksudo gedit /etc/apt/sources.list
2. Add the following two lines to the bottom of the file:
deb http://ppa.launchpad.net/corenominal/ubuntu gutsy main
deb-src http://ppa.launchpad.net/corenominal/ubuntu gutsy main
3. Close gedit and issue the following terminal command to update apt:
sudo apt-get update
4. Still in the terminal, enter the following command to install the package:
sudo apt-get install ttf-liberation
5. Enjoy your new fonts!
Tuesday, October 30th, 2007
I've been using the Gutsy Gibbon on my desktop for just over a week now. I pretty much settled into using it straight after the upgrade fresh install from Feisty. So far I've experienced no real problems with it whatsoever.
During the past week I've managed to have a play with most of Ubuntu's new features. The one that has really stood out and impressed me the most has been the integrated desktop search provided by Deskbar Applet and Tracker.
Desktop search has evaded me for a while now. I've tried Beagle before but I wasn't overly keen on it, I much prefer Tracker. It's faster, more elegant and less intrusive. Also, it doesn't seem to grind on my hard drive — Beagle made my drives sound like they were shredding themselves when it was indexing my data.
Anyhow, I've been using the Deskbar Applet and Tracker Search tools more and more over the last few days. I have to say, they work really well together and I'm beginning to wonder how I managed without them. The only feature that I can think of that would make them better would be an integrated "Find & Replace" tool.
A screenshot of Deskbar Applet in action:

A screenshot of Tracker Search in action:

Monday, October 29th, 2007
It's been a long time coming but my website [CrunchBang.org] is now finally running on PHP 5. My hosting provider performed the upgrade earlier this month and made the switch optional on a domain basis. Any domain on their servers can run either PHP version 4 [default] or upgrade to version 5 by adding a script handler in .htaccess:
Action php5-script /interpreters/php5-script
AddHandler php5-script .php
My development systems all run PHP 5 so the switch was a breeze. Hopefully from now on I'll be able to avoid stuff like this.
Also, I've been working on my Whird project over the weekend. I've now added feeds for individual tags and updated various features to improve usability. I've had to place some URL rewrites for the new feeds and I'm hoping that the various planets [Planet Ubuntu Users, Planet Ubuntu UK] don't get flooded — I apologise if they do :)
Monday, October 29th, 2007
I've been waiting to test Gmail's IMAP support ever since I first read about it. I've been checking my account everyday to see if the new feature has been added, only to be disappointed. Then this morning I read this:
After hearing the news that Google had added IMAP to it’s Gmail service, I was somewhat surprised to find that my account didn’t seem to be set up for it.
After fiddling a little I discovered that Google’s IMAP service is language specific, and isn’t enabled on UK English based accounts.
Log on to your Gmail account. Click on Settings. In the General tab, change the ‘Google Mail display language’ option to ‘US English’.
After a refresh you should now see the ‘Forwarding and POP/IMAP’ option.
Have fun!
I've just tested it and it works! Nice one Chris.
Saturday, October 27th, 2007
As well as liking monkeys I also like dict.org. I've been using it more-and-more since my rant last month about pop-up advertising and Dictionary.com.
For anyone unfamiliar with dict.org, it's basically a free service without any adverts that provides a fast dictionary and thesaurus lookup [it does more too!]
The bookmarklets
This morning I decided to play about with creating a Bookmarklet to help perform dict.org queries. I ended up creating three. One to perform a standard query, another to perform dictionary only queries, and the final one to perform thesaurus only queries. The bookmarklets are below:
dict.org lookup — for performing default queries [dictionary + thesaurus + more]
dictionary lookup — for erm… …dictionary only queries
thesaurus lookup — for… …work it out :)
All three bookmarklets work the same way. You can either highlight a word on the web page you are viewing before clicking the bookmarklet to perform the query; or click the bookmarklet and type a word at the prompt.
Howto install the bookmarkets
Simply left-click and drag any of the bookmarklets to your Bookmarks Toolbar within Firefox.
Before installing the bookmarklets it should be noted that I've only tested them with Firefox — as an Ubuntu user it's pretty much the only browser I use. Please let me know [post a comment or something] if you test them with any other browsers.
Credits
These bookmarklets are a direct hack of the free browser buttons available for Dictionary.com. These were inspired by the work of Steve Kangas at Bookmarklets.com.
Saturday, October 27th, 2007
Excerpt from I Like Monkeys:
I didn't know what to do. There were 200 dead monkeys lying all over my
room, on the bed, in the dresser, hanging from my bookcase. It looked
like I had 200 throw rugs.
I tried to flush one down the toilet. It didn't work. It got stuck.
Then I had one dead, wet monkey and 199 dead, dry monkeys.
Via Christoper Blizzard :)
Friday, October 26th, 2007
Yesterday I mainly worked on some PHP backup scripts [not very exciting, but necessary.] The scripts are run at regular intervals and perform various data backups across numerous domains. To accomplish this I set-up some cron jobs that will automatically execute the scripts at set intervals.
This is not the first time that I've had to set-up cron jobs [I've got several that date back a few years.] I think that having the ability to set-up scheduled tasks is really quite important. Therefore I thought I'd blog about it for future reference.
What is cron?
Cron is a daemon/service that executes shell commands periodically on a given schedule. Cron is driven by a crontab, a configuration file that holds details of what commands are to be run along with a timetable of when to run them.
Creating a crontab file
You can create a crontab file by entering the following terminal command:
crontab -e
Entering the above command will open a terminal editor [Ubuntu uses Nano by default] with a new blank crontab file [or it will open an existing crontab if you already have one.] You can now enter the commands to be executed [see syntax below] before saving the file and exiting the editor. As long as your entries were entered correctly your commands should now be executed at the times/dates you specified. You can see a list of active crontab entries by entering the following terminal command:
crontab -l
Crontab syntax
A crontab file has six fields for specifying minute, hour, day of month, month, day of week and the command to be run at that interval. See below:
* * * * * command to be executed
- - - - -
| | | | |
| | | | +----- day of week (0 - 6) (Sunday=0)
| | | +------- month (1 - 12)
| | +--------- day of month (1 - 31)
| +----------- hour (0 - 23)
+------------- min (0 - 59)
Crontab examples
Writing a crontab file can be a somewhat confusing for first time users [and the above table probably doesn't help much!] Therefore I've listed below some crontab examples:
* * * * * <command> #Runs every minute
30 * * * * <command> #Runs at 30 minutes past the hour
45 6 * * * <command> #Runs at 6:45 am every day
45 18 * * * <command> #Runs at 6:45 pm every day
00 1 * * 0 <command> #Runs at 1:00 am every Sunday
00 1 * * 7 <command> #Runs at 1:00 am every Sunday
00 1 * * Sun <command> #Runs at 1:00 am every Sunday
30 8 1 * * <command> #Runs at 8:30 am on the first day of every month
00 0-23/2 02 07 * <command> #Runs every other hour on the 2nd of July
As well as the above there are also special strings that can be used:
@reboot <command> #Runs at boot
@yearly <command> #Runs once a year [0 0 1 1 *]
@annually <command> #Runs once a year [0 0 1 1 *]
@monthly <command> #Runs once a month [0 0 1 * *]
@weekly <command> #Runs once a week [0 0 * * 0]
@daily <command> #Runs once a day [0 0 * * *]
@midnight <command> #Runs once a day [0 0 * * *]
@hourly <command> #Runs once an hour [0 * * * *]
Multiple commands
A double-ampersand "&&" can be used to run multiple commands consecutively. The following example would run command_01 and then command_02 once a day:
@daily <command_01> && <command_02>
Disabling email notifications
By default a cron job will send an email to the user account executing the cronjob. If this is not needed put the following command at the end of the cron job line:
>/dev/null 2>&1
Specifying a crontab file to use
As mentioned at the top of this post, you can create a new crontab file with the "crontab -e" command. However, you may already have a crontab file, if you do you can set it to be used with the following command:
crontab -u <username> <crontab file>
Therefore the following command…
crontab -u tux ~/crontab
…would set Tux's crontab file to that of the file named "crontab" residing in Tux's home directory.
Removing a crontab file
To remove your crontab file simply enter the following terminal command:
crontab -r
Further information
Refer to the man page for further information about crontab. Enter the terminal command:
man crontab
External links
Some external links for your browsing pleasure:
I think that pretty much covers the subject of cron jobs and crontab. Please feel free to comment if I've missed anything/made any boobs.
Friday, October 26th, 2007
We here at Common Craft are worried about you and your brain this Halloween. You see, it's zombie season and we want you to be prepared. To help, we made this 3 minute video that will make sure you survive, brain intact.
I've watched the video and I'm now well prepared, are you? Watch the video: Zombies in Plain English to ready yourself now!
Thursday, October 25th, 2007
I've just listened to the latest Linux Link Tech Show episode [no. 216]. At about 73 minutes into the show the guys discussed their experiences of upgrading from Feisty to Gutsy.
The two presenters who actually performed the upgrade reported mixed results. Dann talked about a few minor issues but gave the overall impression that the upgrade was a success. Pat on the other hand didn't sound too happy, and asked the question:
Do you think this Ubuntu upgrade has been a total cluster fuck?
Another of the presenters, Linc, also seems to be a little pissed@ubuntu.
I experienced my own issues when I tried the upgrade, although I think the problems I encountered were due to my eccentric desktop system. Later today I'm going to perform the upgrade on my laptop, I'll report back on my experiences when done.
More posts for October 2007