Wednesday, 31 August 2011

ttf-mscorefonts-installer Package - Don't be Fooled!

So, you think that by installing the ttf-mscorefonts-installer package via KPackageKit that you now have access to the Microsoft fonts? Well, if you have installed the package via the software manager, it's worth checking that it's been properly installed!

To check, open a terminal and type:

locate Arial

If you return to your command prompt without listing any files or directories, the package hasn't been installed even though KPackageKit lists it as an installed package. This may be the result of a bug in KPackageKit that prevents the user from accessing (or, even seeing) the End User Licence (EUL) Agreement.

There are a couple of ways of fixing this, but I found the easiest was to purge the existing package (using the terminal):

sudo apt-get purge ttf-mscorefonts-installer

And then reinstall the package (again, using the terminal rather than KPackageKit):

sudo apt-get install ttf-mscorefonts-installer

Now the Microsoft EUL Agreement screen should appear:

  • Hit TAB to highlight the < OK > option in the EUL Agreement screen and press Enter.
  • Select < Yes > in the next (Configuring ttf-mscorefonts-installer) screen.

  • When the package has finished installing (you return to your command prompt), force the cache to reload:

    sudo fc-cache -f -v

  • Now check that your fonts are installed:

    locate Arial

Now you should be able to select the fonts for use in the System Settings and application properties dialogs.

Sources & references:

  • None

Monday, 29 August 2011

Kubuntu 11.04 on Inspiron 6400

I've been so impressed with Kubuntu that I'm installing Kubuntu 11.04 on my DELL Inspiron 6400 - the installation process worked flawlessly, but, once I'd restarted my machine, I couldn't log in!

Taking a couple of deep breaths and bringing my mounting panic under control, I realized that I had to select a desktop to log into! Below the user name & password dialog boxes, there are two buttons (one to shutdown the machine, and another to select a desktop session): the three options are default, plasma, and failsafe. Selecting the Plasma option logged me into Kubuntu.

First panic over - now all I have to do is:

  1. Apply the updates
  2. Get my wireless card working.
  3. Mount my shared drive and apply the shutdown fix.
  4. Install & configure Opera
  5. Install & configure Thunderbird
  6. Install & configure KeePassX...

Well, you get the idea...

Sources & References:

  • None

Kubuntu - Fixing WiFi

When I loaded Kubuntu on my Inspiron 1501 this week, I experienced the perennial WiFi problems that seem to plague every Ubuntu installation. Loading the correct driver was a piece of cake - I've done it so many times - but even though I could see all the available networks, I just couldn't connect!

Eventually, I abandoned the default application (the plasma-widget-networkmanagement) and installed the Gnome front-end for Network Manager - problem solved.

Well, sort of...

Despite being able to connect to my network, I kept receiving error messages about the system being unable to unlock the Gnome keyring. I'd also have to supply the wireless manager my network password every time I rebooted. This can get kind of tedious very quickly! Strangely, most of the solutions posted online recommend setting an empty value for the default keyring password - right, like that's going to happen!

Actually, there's a much simpler (and far more secure) way to allow the wireless applet access to the keyring.

  • Open the Autostart System Settings dialog (Menu > Computer > System Settings > Autostart > Advanced Tab).
  • Click the Add Program... button.
  • In the Choose Application search dialog, type Gnome Keyring.
  • Click the Application tab and in the Command: dialog, type - gnome-keyring-daemon
  • Click Ok.
  • Close the Autostart Settings dialog.

Next time you reboot, you'll be asked for your network password but, thereafter, your wireless should connect automatically. Moreover, with this solution there is no need to have blank passwords either, so it's a much more secure method of automating connection.

Sources & References:

Saturday, 27 August 2011

Kubuntu - CIFS Mounts Hang at Shutdown

One of the problems I've experienced with my recent installation of Kubuntu is something I've come across before: the process that unmounts CIFS shares hangs at shutdown, delaying the power-down sequence by several minutes (some users report even longer delays!).

After some effort, I finally understand what causes the problem and discovered a fix that works on my test machine (signs of Linux maturity perhaps?). However, I had to dig very deep to resolve the issue: I came across the following solution on page 7 of my Google search (after following pretty much every link on the first six pages) and the answer wasn't even on a direct link, but a link from a link! The actual instructions are in post #160 of the bug report, demonstrating the benefits of persistence!

The problem is well documented and caused by an error in the shutdown sequence. It seems that the Network Manager is closed before the share(s) are dis(un)mounted - the effect of this sequence is that, once the Network Manager has been closed, there is no longer a network over which to make or receive a call to unmount. There are several solutions posted on the Internet, most revolve around scripts for unmounting the CIFS shares that are then symlinked to earlier processes in the shutdown sequence - I tied them all, but none worked (for me). Kudos then to c0l2e, the author of the following:

"found a better fix via /etc/init/dbus.conf

add the pre-stop script:

pre-stop script
trap "TERM signal" TERM
/bin/umount -a -t cifs -f -l
trap - TERM
end script

It works for me and few tested notebooks and desktop PC."

(c0l2e post #160 - Ubuntu Bug Reports: Bug #211631)

I can confirm that this solution works for a DELL Inspiron 1501 and that my Kubuntu installation now closes in under fifteen seconds.

Sources & References:

Quick Tip - Finding Your Linux Version Information

If you ever need information on your Linux release, open a terminal and type:

lsb_release -a

My output (on my Kubuntu machine) looks like this:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.3 LTS
Release: 10.04
Codename: lucid

Sources & References:

Kubuntu - I Think It's Love

A couple of days ago I resumed my search for a suitable alternative to Unity. Whilst I haven't given up entirely on the possibility that, post-Lucid, Canonical's latest user interface will be my choice of desktop environment, I thought that it wouldn't hurt to be prepared for the worst.

If I'm honest, I've led a pretty sheltered Linux existence and I've only ever used two Linux desktop environments: Gnome & Unity. This inexperience coupled with my continued ambivalence towards the latest incarnation of Ubuntu, seemed like the perfect opportunity to take Mark Shuttleworth's advice and give one of the other DEs a peek. So, for no better reason than not knowing any better, I decided to start with Kubuntu.

I think that it might be love.

Sure, I've had some early issues to deal with, but Kubuntu 10.04 is running contentedly on my DELL Inspiron 1501 and the environment can only be described as, beautiful - I'm already considering migrating my two stable machines to the interface!

If you haven't experienced KDE, it's well worth downloading an image and creating a startup disk.

Sources & References:

Friday, 26 August 2011

Happy Birthday

I'm a day late, but Happy Birthday to Linux - 20 years old on 25/08/2011

Sources & References:

Wednesday, 24 August 2011

Another Reminder

An update to the Windows Vista saga - the owner consented to a fresh install and it has done the trick! It's taken several hours, but the final set of updates are being installed.

I've never been anti-Windows, but I am disappointed by having to reinstall an operating system just to bring it up to date - how could Microsoft change its own update system so that even its own products couldn't use it? Utterly bizarre!

Anyway, if you're suffering from the "Window module installer has stopped working" error message, it seems that the most effective way of recovering from the problem is a fresh install.

Sources & References:

  • None

USB Startup Disks

The Create Start Disk application that comes with a standard install of Ubuntu is great for creating start images of the host OS, but what if you want to try another distro?

If, like me, you find that the embedded application is unwilling to create a start disk for other distros or even other flavours of Ubuntu, install the KDE Startup Disk Creator: it's much more forgiving!

You'll find the app in the Ubuntu Software Centre or, in a terminal, type:

sudo apt-get install usb-creator-kde

The application window has a familiar appearance and the application installs to the System Tools menu by default. Operation is simple: download your .iso file (and check the integrity of the download), match it to your USB stick and click the Make a Startup Disk button.

I created my first USB startup disk this week with a spare 1.0GB thumb drive that I had lying around: the addition of an Ubuntu logo sticker gives it some extra appeal.

Sources & References:

  • None


Recently I offered to take a look at a faulty laptop and working on the problems over the last few days has reminded me of why I began my odyssey into open-source.

The machine in question is running Windows Vista (SP1); it wouldn't boot into restricted (non-administrator) user accounts and was prone to crashing during the boot sequence. Getting the machine to boot into safe mode gave me some useful pointers:

  • This is a multi-user machine with two registered users & the Guest Account activated.
  • There were two AV programs installed (McAfee & AVG), both were active and both were out-of-date.
  • The firewall was turned off.
  • The last successful Windows update was 2009.
  • Internet Explorer crashed every time it was invoked.

These are signs that computer security is relaxed and immediately raised suspicion that some kind of virus or other malware might be responsible for the problems. So, the course of action was clear:

  • Uninstall McAffee (for no better reason than it's a subscription-based service and AVG is free).
  • Turn on the Windows firewall.
  • Update AVG and run a full system scan.
  • Install Spybot S&D and run a full scan in Administrator mode.
  • Reset Internet Explorer.

There were no viruses but Spybot did detect and remove over 142 bits of malware and tracking cookies! Once IE had been reset, booting into any account worked as expected: however, it was then that my problems really began.

For the sake of good order, I decided to update the machine and install SP2 (as Microsoft no longer supports SP1) but Windows update refused to work. Each time I tried the update, the update installer crashed, offering nothing but vague error messages and nebulous reference numbers.

Being a resourceful chap (and not wanting to be beaten by Windows!), I decided to install SP2 manually. So, I downloaded and saved it to the hdd and then ran it as an administrator - still no joy! Each time I tried to load the update manually, a new error message appeared:

"Window module installer has stopped working and was closed."

This is not a novel problem with Vista, just Google the error message to see how many other users have experienced the same thing. Indeed, so common is the issue that there are several solutions posted online (notably, Microsoft offers no solution) but I couldn't find one that resolved the problems on this particular machine. After several days (yes, days) of trying, I've given up! The fact is that the remaining options for resolving this issue are pretty brutal and it's not my machine!

  1. Leave WAU switched off and eschew all future updates from Microsoft (this is a bad option - it leaves the machine vulnerable to attack).
  2. Restore the PC to its factory condition and install SP1 & SP2 manually (although, there is no guarantee that this solution will fix the problem)
  3. Install Ubuntu - my favourite option!

If this had been an open-source problem, perhaps more attention might have been paid by the distro provider. In any event, the community would almost certainly have found a solution. This is why I turned to Linux in the first place and it seems, in retrospect, that my decision to abandon Windows was justified.

Source & References:

Thursday, 18 August 2011

Implementing Plan C

With the arrival of my brand new 32GB usb drive this morning, I thought that it was time to take my own advice and implement Plan C of my backup strategy. However, as usual things didn't turn out quite as I expected!

My initial plan was simply to create an encrypted directory on my flash drive and copy my backups across the network. However, copying large compressed files from network storage to usb (via pc) wasn't successful and I found Ubuntu reporting errors - so, I modified my plans (let's call it Plan C.i) to replicate the backup using SBackup. Unfortunately, that didn't work either - SBackup couldn't access the encrypted directory so I had to think of a Plan C.ii!

When I first started thinking about a backup strategy, one of the options that I considered was, rsync: however, I abandoned this option because it was just too complicated (for me) at the time. rsync is a command line tool - it's manual stretches to 61 pages when printed to file and it's not a particularly forgiving read! Fortunately, there is a graphical interface (Grsync) in the Ubuntu Software Centre that makes configuring a backup a little less intimidating and, when coupled with some excellent pointers from The University of Auckland, getting a working backup onto a USB drive is reasonably painless.

So, I now have copies of my essential files encrypted and saved to a portable disk: Plan C has been implemented. Given that I probably won't be automating this process (I'll still have to mount the USB drive and decrypt the directory whenever I want to refresh my backup), I kept the backup to absolute essentials only - documents & configuration files - but it is a working solution for disaster recovery.

Sources & References:

Opera 11.50 - Switching to New Tabs Automatically

Although I'm very impressed with the look, feel, and speed of Opera 11.50, I would be the first to acknowledge that, unlike most of the other browsers on offer, configuring it to work as you want cannot be described as an intuitive process.

In one way this is no bad thing; it encourages you to explore the features and potential of the application. On the other hand, I'm four days into my Opera experience and I'm only just getting it to do what I expect it to do!

For instance, take something as simple as changing focus to a new tab - in most browsers the option to switch to a new tab automatically is easily found in the preferences menu (in Firefox 5.0, it's the last option in the Tabs preferences!) but there is no such option in Opera. Moreover, I've had to get used to opening links by clicking the scroll wheel on my mouse rather than left-clicking an embedded link. However, you can configure Opera to switch to a new tab automatically (even from the Speed Dial page), albeit by using your mouse's middle button or scroll wheel:

  1. Open Opera's Preferences menu (ctrl + F12).
  2. Click the Advanced tab and then click the Middle-click options... button.

  3. In the Middle-click options dialog, select the Open in new tab option.

  4. Click OK to close the Middle-click options dialog and then OK to close the Preferences dialog.

Now all you have to do is to remember to click the middle button!

Sources & References:

  • None

Wednesday, 17 August 2011


Have you ever wondered how the script kiddies who often can barely read & write manage to hijack your Facebook or Hotmail account?

Well, it turns out that it's shockingly easy: in fact, I managed to learn how to gobble up someone else's cookie and hack their account by following just three links! No brute force or dictionary attacks necessary - all that's required is a laptop, a public WiFi hotspot, Firefox, and a copy of Firesheep.

The irony is that it is (or, at least should be) easy to foil such attacks. All three of the links that I followed are essentially arguing for the same thing - end-to-end encryption between server and browser that protects users from identity theft. Indeed, Eric Butler (the author of Firesheep) even claims that he only released his hacking tool to demonstrate the extent of the sidejacking problem.

"Websites have a responsibility to protect the people who depend on their services. They've been ignoring this responsibility for too long, and it's time for everyone to demand a more secure web."
Eric Butler via { codebutler }

The message should be obvious: whether you're using Facebook, Google, Hotmail, or a myriad of other services on the web, if you would rather that no-one else had access to your data, make sure that you are using a secure (https or ssl) link.

Sadly, I expect few people to heed this warning. After all, no-one bothered to turn on the security features released by Microsoft for its Hotmail service!

"For example, in July, eight months after Microsoft first offered HTTPS protection, the company revealed that only 2 million of the 500 million users of Hotmail had enabled the option."
Christopher Soghoian via Ars Technica

Sources & References:

Opera Browser - Multiple Home Pages

If you want Opera to open with multiple start (home) pages, the solution is easy:

  1. Open all the pages you want to start when Opera is opened and make sure that any others (that you don't want to open when Opera starts) are closed.
  2. Click the Opera Menu button & select the Tabs and Windows option.

  3. Select the Sessions option and then the Save this session... option.
  4. In the Save session dialog, provide a name for your session (e.g. home or home pages) and check the Show these tabs and windows every time I start Opera check box.

  5. Click the OK button.

That's it! You can even use Speed Dial as one of your home pages using sessions.

Hint: the pages open in the same tab order as they are saved, so, if you have a preference for the page order, drag your tabs into the order that you want them to open before saving your session.

Sources & References:

  • None

Tuesday, 16 August 2011

A Night at the Opera

The news that Mozilla has released a new version of Firefox hasn't tempted me away from Chrome; but, something else has persuaded me to change my browser!

Recently, page loads in Chrome have got slower and slower and it seems that this is neither a new problem, nor is it attributable to a single reason. After enduring the rather cryptic sending request error message for a few days, I thought I'd take the opportunity to see how Opera performs on Ubuntu. This move isn't entirely a leap in the dark, I'm already a regular Opera user - it's the primary browser on my iPAQ hx2790!

I've always liked the speed dial page in Opera Mini and, in my opinion, text rendering has always been superior to Firefox. So, this weekend I downloaded Opera 11.50 and gave it a whirl on my Ubuntu machines.

It's taken a day or so to get used to the way the browser works and shortcuts aren't as intuitive as I would like. Moreover, online help is not as readily available as it is with other browsers and this dearth of expertize is probably a reflection of the minuscule market share (estimated at around 2.3%) that Opera enjoys. However, Opera is probably the quickest browser that I've used (particularly with the Turbo function enabled) and text rendering is as stunning on the desktop version as it is on the WinMob application!

If you are tempted to give Opera a try, here's a couple of tips:

  1. If you enable Speed Dial, use your mouse's centre button to open links in a new tab or window rather than than the current tab.
  2. Take a look at Opera's tutorial on mouse gestures - it could save you some time trying to set preferences.

Sources & References:

FFmpeg & 10.04 LTS

I've been having a problem converting a video from one format (.avi) to another (.mp4). It wasn't a huge issue, I just wanted to convert a few seconds of raw video to a format that my wife's Android could read, but, try as I might, I couldn't get FFmpeg to handle the conversion. To be honest, I don't edit video often and I merely assumed that it was I that was doing something wrong - it turns out that it wasn't!

In the past, whenever I have converted video from one format to another, I'd just open a command line and type:

ffmpeg -i /source_directory/source_file.avi /output_directory/output_file.mp4

Now, FFmpeg is far more capable than this simple command suggests, but this simple conversion instruction is normally all I need. However, the version in the Ubuntu Software Centre doesn't seem to support even this level of simplicity, so I had to turn to one of the best resources on the Internet for Ubuntu specific problems - the Ubuntu Forums.

FakeOutdoorsman has posted some superb instructions for installing a fully operational version of FFmpeg. The installation process is lengthy but, if you're experiencing problems with video conversions, this excellent tutorial may be the answer you're looking for.

Sources & References:

Monday, 15 August 2011

Sharing Your Tellico Database Across Multiple Machines

Recently I managed to share my KeePassX database with all the Linux machines on my network - another program that I use regularly and have always wanted to synchronize with my laptops is, Tellico and now that I've mounted my network drive permanently, I've finally got around to adding this functionality.

Tellico does allow you to open a remote file using Samba, but, for some reason, I can't get the program to remember my Samba password and end up with an error message every time I try to open the database. The following instructions describe how I use my permanently mounted smbfs share to access a central database, circumventing the need for my Samba password.

  • From Tellico's main menu, click File & then Open...
  • When the Open File - Tellico dialog appears, right-click the Places bar & click Add Entry...

  • Enter a label and location for your mounted network drive in the appropriate dialog boxes. If you followed these instructions to create your mountpoint, the location is likely to be in the form of: /media/mount_name/directory/file

  • Click OK & then, after selecting the network file, Open

Using a permanently mounted smbfs share turns out to be a great way of making sure that you're always using current data regardless of the machine you happen to be using.

Sources & References:

Friday, 12 August 2011

EncFS - Changing Passwords

If you've created an encrypted directory using EncFS, it's likely that at some point you'll want to change your password - this is a painless process using the command line.

From a terminal, type:

encfsctl passwd /path/rootdir

Where /path/rootdir is the path to the directory that stores the encrypted data (This is not the mount point directory - the root directory address will likely begin with a period - for example: /home/jogga/.rootdir).

You'll be prompted for your current password and then your new password. Once you have verified the new password successfully, you'll see the following confirmation message:

Volume Key successfully updated.

Sources & References:

Thursday, 11 August 2011

Using KeePassX on Multiple Machines

One of the problems of having multiple PCs is that of keeping data synchronized. For instance, over recent weeks, keeping three password databases up-to-date has become rather irksome!

There's no ideal solution to this inconvenience, but a single database, accessible by every (authorised) machine on your network, does seem to be the best option. Fortunately, establishing a centralized data source using KeePassX as your password manager and a network attached storage device (nas) turns out to be rather simple. The only fly in the ointment is that the Linux version of KeePassX doesn't natively support samba so you have to mount your network drive, either manually (if you access your passwords only infrequently) or automatically at boot (if your make more frequent use of your password manager), in order for KeePassX to read the data source. Either way, the process is straightforward:

  1. Copy your database to your network drive. Don't export your data - copy the existing .kdb database. Exporting your data creates either a .xml or a plain text file, neither of which is encrypted and therefore readable by anyone who can access the directory.
  2. Follow these instructions to create your new mountpoint and Windows share on each machine that requires access to the data source.
  3. After testing your share (sudo mount -a), open your database using the KeePassX interface (File, Open Database...) and, after entering your password, add the path to your KeePassX bookmarks (File, Bookmarks, Add Bookmark).

Now you should delete (or, better still, archive) your local file in order to ensure that you only work on a single database. The advantage is that you will always have a current database regardless of the machine you happen to be using. Moreover, the first user to open the database locks the data preventing write conflicts. However, there are a couple of potential problems:

  • Unless you have a VPN link to your NAS, you can only access your database from inside your network (i.e. if you're on the road, you won't be able to access your data unless you have a copy on a portable drive).
  • You'll need to make provision for backing-up your database.

Notwithstanding these two minor issues, managing your database this way solves the problem of syncing data across multiple machines.

Sources & References:

Monday, 8 August 2011

Another Diamond in the Rough!

I've mentioned before that there are some excellent resources on the Internet for those that are prepared to hunt for them and my recent foray into the dark arts of programming has led me to another such jewel.

Python for Software Design: How to Think Like a Computer Scientist is available from Amazon for £23.74 and it gets all five-star ratings! So, imagine how happy you would be if you could read this book for free - well, you can!

The Open Book Project makes this book available on the Internet; its stated mission is:

" encourage and coordinate collaboration among students and teachers for the development of high quality, freely distributable textbooks and educational materials on a wide range of topics. The advent of the Internet and the World Wide Web are making collaboration among educators on a global scale possible for the first time. We want to harness this exciting technology to promote learning and sharing."

Sources & References:

Sunday, 7 August 2011

Deleting Directories Securely

The shred command is a great way of deleting individual files securely, but it can be a bit cumbersome if you have a lot of files that you want to delete at once. Fortunately, there is a secure method of deleting whole directories in Linux using the command line and a package called (appropriately enough), secure-delete.

You can install secure-delete from the Ubuntu Software Centre or the Synaptic Package Manager. The package contains tools to delete files & directories (srm), clean the swap memory (sswap), and clean the RAM (smem) - all of these tools are accessed via a terminal.

To delete a whole directory, open a terminal and type:

srm -r -v /path/to/directory

The -r option makes the process recursive (it deletes all sub-directories - so be careful!) and the -v option provides verbose output in the terminal window during the operation.

Clearly, this can save you a lot of time (and typing), but, as with all things Linux, there is an implicit assumption that you know what you are doing - once you have shredded files & directories using these tools, they cannot be retrieved.

Sources & References:

Saturday, 6 August 2011

Wallpaper of the Month (8400)

I change my desktop backgrounds frequently - this one has made it to my 8400 desktop for the month of August!

The scene is Spitfire Lake (Adirondack Park, NY) taken by Will Forbes. You can download the wallpaper from National Geographic's Photo of the Day webpage. There's something calming (almost soothing) about this picture - it's simple composition produces a stunning visual impact.

Sources & References:

Friday, 5 August 2011

More on IE IQ

It seems that the story linking Internet Explorer users with lower IQ was "an elaborate hoax" - no surprise there!

What is surprising is how easily a "number of media organisations" were duped into reporting the story. Sometimes it seems as if there just isn't enough real news to fill all the space.

Sources & References:

The Laughing GNOME?

Mark Shuttleworth isn't alone in having concerns about GNOME 3: according to The Register, "Linus Torvalds has dropped GNOME 3 in favor of the Xfce graphical desktop interface, dubbing GNOME 3 an "unholy mess""

I'm the first to acknowledge that my opinion is worthless in the presence of two such Linux heavyweights but I'm still unsure about which direction my journey will take over the next couple of years. If GNOME really is the "unholy mess" that Torvalds claims, then future versions of Ubuntu are probably not for me: I don't care too much for the current state of Unity and was holding out for a GNOME alternative.

Oh well, uncertainty often makes for a more exciting future!

Sources & References:

Thursday, 4 August 2011

IDLE Hands

Yesterday I decided to explore python, a cross-platfom, object-oriented, programming language and in so doing discovered something that SciTE can't do!

Whilst I have a working knowledge of html and a distant memory of using Visual Basic, I could never claim to have anything other than rudimentary programming skills and I've decided that it's time to correct this deficiency. Usually I would head straight over to Amazon and buy a book that guides me through the process, but recent events have taught me that there are plenty of free resources online that are just as good as the commercial offerings if you're prepared to look for them. So, I thought that I'd make my adventure even more interesting by taking a less structured approach and only using free resources.

Fortunately the Python website provides links to some excellent tutorials for the programming n00b and ironically, I chose to go with Derrick Wolters' Learning Python (for the complete n00b). Using SciTE as my text editor, I raced through the first couple of tutorials and was soon saying hello to the world and manipulating simple numbers. However, when it came to user input variables, SciTE proved less than co-operative. Here's a simple example:

print "What is your name?"
print "Hello", name.

This is simple stuff, the interpreter simply displays (prints) What is your name? on the screen and waits for a user to input a text string. Once the user has input his name, the interpreter says hello. Unfortunately, SciTE can't handle user input in the python language: it hits an end of file condition without reading any data and returns an error. This is a problem that's been around for a while!

Fortunately, you can download IDLE from the Ubuntu Software Centre. IDLE handles user input variables with ease - here's the same code (with the text string Jogga added as the user input variable:

It's unlikely that SciTE will be fixed anytime soon, but IDLE fills the hole (or blanks!) very nicely!

Sources & References:

Wednesday, 3 August 2011

Silly Season

You can always tell when it's a slow news day and they usually happen when Parliament has finished for the Summer break!

The BBC is running a story today (on its Technology page, if you can believe that!) reporting on a study that suggest Internet Explorer users have a lower than average IQ score. In fact, the authors of the study suggest that IE users IQ averages around 80.

UK citizens that have a television are obliged by law to pay for a licence (the fee goes to fund the BBC) - worth every penny (not!)

Sources & References:


Ok, time for something a little lighter than of late! This post isn't really anything to do with Linux or Ubuntu (or even computing really), but the concept intrigued me so much that I thought that I'd follow my curiosity and see where it led!

Recently I've been wondering about those strange glyphs that appear next to commenters' names on Wordpress blogs (I've also seen them used in adverts). It turns out that they're called identicons and they are graphical representations of hash values. Someone called Don Park devised the concept (in 2007) to represent IP addresses whilst maintaining user confidentiality - so far, so good: however, it seems to me that there are a couple of inherent flaws with this thinking:

  1. Efficacy relies on users having a static IP address, something that most of us won't enjoy outside of a professional environment.

  2. An IP address (static or otherwise) is no guarantee of a user's identity: the IP address identifies a box on the end of a wire, not the person on the end of the box!

No problem, just use the hash value of an email address to link an identicon to a person and you're good to go!

Well, maybe...

I can think of a couple of potential problems with this approach. But, let's not dwell on the negative; if you want to create your own identicon, you can sign up to a service like Gravatar and register your email address. Here's what mine look like:

Gravatar Default Image
Identicon Image
Mysetery Man

There are other providers or, if you're feeling brave, you can download the source code. Once you've created your account, you can link to your own identicon using:

< img src="" />

Where, HASH is the md5 hash sum of your registered email address (and the img tags are properly closed, unlike the above). The easiest way to get the hash (if you don't want to use the online tool) is to install GtkHash from the Ubuntu Software Centre.

Sources & References:

Monday, 1 August 2011

Cryptic - More on EncFS & Cryptkeeper

Recently I discovered Cryptkeeper in the Ubuntu Software Centre - it's a front-end for EncFS that sits in the system tray providing hassle-free access to your encrypted directories. Whilst this is undoubtedly a useful applet, it suffers from problems of memory leaks and segmentation faults and, despite the fact that there is a patch available, I've no idea how to fix the problem!

However, like most graphical interfaces, Cryptkeeper is really just a bridge between the user and the command line and the command line is often a "faster and more powerful" way to get things done. So, when I experienced a segfault earlier today, I thought that I'd explore EncFS's options using a terminal. In this post I'll outline the basic commands for creating, mounting, & unmounting an encrypted directory.

Creating an encrypted directory is simple - the command takes the form:

encfs /path/.dir_name /path/dir_name

Let's assume that I want to create an encrypted directory in my /home/usr_name directory called, crypt, my command is:

encfs /home/jogga/.crypt /home/jogga/crypt

I'll be notified that these directories don't exist and prompted to create them - at each prompt, I type y and press enter. I get the following output:

Creating new encrypted volume.
Please choose from one of the following options:
enter "x" for expert configuration mode,
enter "p" for pre-configured paranoia mode,
anything else, or an empty line will select standard mode.

Selecting the standard configurations results in the following output:

Standard configuration selected.
Configuration finished. The filesystem to be created has the following properties:
Filesystem cipher: "ssl/aes", version 2:2:1
Filename encoding: "nameio/block", version 3:0:1
Key Size: 192 bits
Block Size: 1024 bytes
Each file contains 8 byte header with unique IV data.
Filenames encoded using IV chaining mode.
File holes passed through to ciphertext.

Now you will need to enter a password for your filesystem.
You will need to remember this password, as there is absolutely
no recovery mechanism. However, the password can be changed
later using encfsctl.

New Encfs Password:
Verify Encfs Password:

The new directories are created and mounted - that's it! Mouting existing directories takes the same form as above:

encfs /path/.dir_name /path/dir_name

Now I'll only be prompted for the password and my directory will be open and available to browse using Nautilus. However, if I want to limit the time a directory can remain open, I can add a switch to umount the directory automatically after a period of inactivity:

encfs --idle=time_min /path/.dir_name /path/dir_name

Where time_min is an integer of 1 or more.

Unmounting an encrypted directory takes the form:

fusermount -u /path/dir_name

Having the option to use a terminal should Cryptkeeper crash is useful and saves the trouble of having to reboot the system. Moreover, it's a great way to learn how things work in Linux.

Sources & References: