Sunday, 27 February 2011

It's the Simple Things

Advanced users won't be particularly impressed with the contents of this post, but it's always nice to see how far one's experience has developed.

I'm still undecided about a backup strategy. Using Simple Backup's default settings on my desktop resulted in a full backup file (compressed using gzip) of 25GB. Subsequent incremental backups are still over 1.2GB apiece. Whilst space is not necessarily the strategy determinant, I do have four computers to consider: potentially, that's 120GB of data per week to worry about.

This morning I was thinking about what is important data to me. I'm a home user so my important data are my documents and my configuration files. I know where to find my documents, but my configuration files tend to be dispersed more widely around my file system. Configuration files are important, among other things, they hold variables that tell programs how to behave (for instance, see the smb.conf file for the variables used by Samba).

Finding these files is no problem using a terminal: I opened a terminal and typed:

locate *.conf > /home/jogga/Documents/conf_files.txt

locate is simply a command that tells the system to search: this is a much faster method than using the search option in Nautilus.

* is a wildcard character, used with the .conf file extension, this tells the system to return a list of all files with that extension.

The next command (the > character) is an input/output redirection: it tells the system to send the output of the command somewhere other than the terminal screen. In this case, I've specified a text file (called conf_files.txt) in the /home/usr/Documents directory. Obviously, your user name is unlikely to be jogga!

If the output files specified doesn't exist, it will be created by the system. If it does, this command will overwrite the contents! To append data to an existing file, use >> (see William Shotts' book, The Linux Command Line for more information).

When the search and redirection are complete, the command line returns to a standard CLI prompt, something like:

jogga@jogga-laptop:~$

If you want to make sure that the file has been created, use the list command (ls).

jogga@jogga-laptop:~$ cd ~/Documents
jogga@jogga-laptop:~$
ls


You can also open the file from the command line using your favourite text editor. Gedit is loaded by default in Ubunutu.

gedit /home/jogga/Documents/conf_files.txt

However, I like Scite, which can be installed from the Ubuntu Software Centre.

scite /home/jogga/Documents/conf_files.txt

Redirecting the output of the locate command to a text file means that you can review it at your leisure rather than scrolling through the terminal window. This is particularly useful if the output of a command is likely to be substantial. Overall, using the terminal for this sort of work is far more efficient than using Nautilus.

As for my backup strategy, I now have a list of files that will help me to determine what information must be saved and what can be left to the vagaries of an OS re-install if disaster strikes!

Saturday, 26 February 2011

Blogger Update

Google has added some functionality to its Blogger software.

There's some nice new features if you edit your posts in HTML. For instance, Blogger now has improved image handling, including image positioning:
"When you add an image from the dialog into your post it will be placed at the insertion point instead of at the top of the post."
That saves a lot of cutting and pasting!

Blogger has (at last) also added a decent preview function:


which allows you to view your post as it will appear in your blog and not as a simple text rendering - very nice!

Another nice feature with the preview facility is that you can leave the preview open and just hit F5 or Ctr + F5 to force a page refresh (although it may take a few seconds for the updates to be available to the preview - be patient or save the draft first!).


Other touches include warnings if you haven't closed your tags properly and Blogger also claims to handle lists and tables more effectively than previously (click Post Options at the foot of the post window to select how Blogger manages line breaks).


To take advantage of the new features, you have to enable the advanced option in your Blogger settings. Click on Settings from the tab menu at the top of your Blogger home page and then Basic (if it is not already selected). Scroll down to the Global Settings section and select Updated Editor (Recommended).

Sources & References:
Blogger Help: An Overview of the new post editor

That Damned Windows Key

Getting the DELL Inspiron's keyboard to behave as I wanted turned out to be far easier than anticipated but as usual, I made it far more laborious than was necessary!


To get Ubuntu to scroll through your open Windows, all you need to do is enable Extra in the Visual Effects dialog box! Once enabled, holding the Windows key and toggling the Tab key will scroll through your open applications.

Friday, 25 February 2011

Keyboard Conundrum

My little DELL Inspiron 1501 is proving to be an excellent test machine, but it has also presented a few interesting challenges in its own right.

One minor irritation that has plagued my Christmas acquisition is the behaviour of the Alt Gr key. I've always found it useful to insert special characters from the keyboard while I'm typing rather than searching for the insert special character option (or using copy & paste in applications that don't have a special character set). For instance, to insert the acute accent in a word like exposé or café, I just type: Alt Gr + ; followed by e. However, the Alt Gr key on my 1501 has remained obstinately dumb since the installation of Ubuntu.

The fix is quite simple: open a terminal and type

sudo setkeycodes 91 100

Type your administrator password at the prompt.

That's it! This fix has survived the reboot test and I'm assuming that it is a permanent solution. Now to fix that damned Windows key.

Sources & References:
Launchpad Bug #285908 zanonmark - post 66
Ubuntu Manpage getkeycodes
Ubuntu Manpage setkeycodes

Auntie on Rhythm

Having fixed Rhythmbox yesterday, I've been exploring the program's abilities in a little more detail.

One of life's little pleasures is listening to a Quins game on a Saturday afternoon. Usually, I just log on to the BBC and use the iPlayer and load BBC Radio London. However, I thought that it would be nice to be able to use Rhythmbox; all that's needed is the URL of the radio station's feed. Fortunately, the BBC lists its national stations on the iPlayer FAQs page and local stations on a separate FAQs page.

To add the link to a new radio station in Rhythmbox, navigate to the Radio browser in the program.



Click the New internet radio station button on the toolbar (or right-click the radio icon in the sidebar.



Copy and paste the URL into the dialog box and click the Add button.

When the radio station has been added to the browser, right-click the new station and select Properties.



Here you can add a human readable title and a genre description. Click Close and you are ready to stream internet radio to your PC via Rhythmbox!

If you're having trouble finding the URL of a station, try opening up the station's web-based Listen Now or Listen Live facility. If you're using Firefox, right-click the player and select the View Page Info option. Then click the Media option on the toolbar.



In the example above, the correct URL is the address titled, "Embed" in the dialog window. Simply copy and paste this address into Rhythmbox's new internet radio station dialog box as before.

Happy listening!

Thursday, 24 February 2011

What a Difference an 'E' Makes

I bumped into my first problem with Lucid yesterday: Rhythmbox crashed (more accurately, closed) when I tried to rip a CD to my collection. Anyone who has followed my various battles with Samba and Rhythmbox will know that this program has given me more headaches than just about all the others put together and I confess that I had that sinking feeling when this happened last night.

It turns out that it's one of the plugins that's causing the difficulty. I'm not sure which one, I disabled them all and so far I've only re-enabled Cover Art and RhythmArty Browser (both seem to be working with no ill-effects). Ironically, I don't seem to miss the other plugins!

Anyway, while I was fixing Rhythmbox (again), I thought that I'd take the opportunity restore all the album art. Unlike Windows Media Player, Rhythmbox doesn't rip album art to the destination directory: you have to add it after ripping (extracting) the album. This is pretty painless as a rule and, in previous incarnations, a plugin such as Cover Art would do the hard yards for you. However, this plugin doesn't seem to work anymore so I've been adding the artwork manually. Unfortunately, I couldn't get the album cover to load despite renaming the artwork either Folder or AlbumArtSmall, both of which should have worked.

I confess that after a while I got a little frustrated and tried deleting (and rebuilding) the database - all to no effect. It turns out that I had been naming the album art incorrectly in the destination folder: the correct name is Folder.jpg and not Folder.jpeg!

One little 'e' - so much trouble!

Anyway, all fixed and now I can browse my albums by album covers!

The One?

I've been investigating Ubuntu One. The beta version of Ubuntu One was released in 2009 (May 13th 2009, to be precise) and the client software has been part of the Ubuntu OS since Karmic, but I've only just got around to seeing what it can do!

Canonical says of its service that:
"Ubuntu One is your personal cloud. But it's not just about syncing files — whether you need to access your contacts, notes or bookmarks from any computer or the web, enjoy your favorite music from a cloud integrated store or stream your entire collection to iPhone and Android mobile phones — we've raised the bar on personal clouds."
Essentially, it's a web-based storage facility that comes with 2.0GB of free storage (for the basic package) and allows users to buy additional cloud space: each additional 20-pack (20GB) costs $29.99/year.

It all sounds great, doesn't it?

Unfortunately, the hyperbole doesn't quite match the reality. For instance, one of the features of Ubuntu One is that users can synchronise contacts across their registered computers - who wouldn't want to do that? However, in order to synchronise contacts users must be using the Evolution message client (not much help if you're a Thunderbird user) and
Evolution contacts will currently only sync in Ubuntu 10.10 (Maverick) or higher users. Ubuntu 10.04 LTS (Lucid) users should see our status page for updates on getting contacts syncing again in that version of Ubuntu. Source: Ubuntu One Wiki FAQ
Which is no good to someone who runs 10.04 on his desktop and 9.10 on his laptop! Never mind, perhaps I'll have more luck with Bookmarks - at least that caters for Firefox.
"Currently, you need to be running Ubuntu 10.04 or higher and Firefox 3.5+." Source: Ubuntu One Tutorials/Bookmarks
Oh dear, not much luck there, either: it seems that I can sync my desktop bookmarks to my desktop!

I'm similarly disappointed that Windows Mobile (phone) isn't supported. OK, I can understand the iPhone/Android link to Unix, but the argument against including WinMob devices fails now that a Windows version of Ubuntu One has been released to beta testing. After all:
"It is a reality that many Ubuntu One users operate in a mixed environment of operating systems. They may prefer to use Ubuntu at home but are required to use Windows at their office or school. Perhaps they occasionally use Windows for an application that is not available in Ubuntu. Whatever the reason, we want to make it easy for anyone to enjoy our services on any platform." Source as linked above: emphasis mine!
Is it really so difficult to believe that not every Linux user has an Android phone?

One might argue that, once Canonical get the bugs sorted and makes Ubuntu One backwards compatible with its own operating systems, this is going to be a great service. Moreover, the first 2GB are free: what more can anyone ask for? But, not so fast. Today I did a full mirror of my desktop: backup size (compressed) was around 30GB which would require two 20-packs. That's $60/year (give-or-take) and a quick Google suggests that I can get 50GB of storage for nothing!