Category Archives: Ubuntu

Hey, Nautilus! Stop Being Naughty to Gnome-Do!

So I’ve seen this annoying little bug since around Ubuntu 8.04.  It’s still going strong even in Ubuntu 11.10.  I get this picture that Gnome-Do and Nautilus are pointing at each other each with an incredulous look upon the face.  Let me explain this annoying if minor bug.

Normally with Gnome-Do you can strike <super>—<space> and then type something like “Documents” and Gnome-Do will rush out and open your Documents folder (capitalization not required but provided here for clarity).  However, if you run Gnome-Do at login (and why would you not) you may have noticed that if you type “Home” Nautilus will make the claim that it is opening your Home folder, but it will silently fail in the background.

You can remedy this by exiting Gnome-Do and restarting it manually.  If you start Gnome-Do manually this problem does not exist.

Like I said it’s minor yet annoying.

Well I came across some bug reports which concern this exact bug, and among those bug reports I found this little gem which gave me an actual solution instead of the restart Gnome-Do work-around.  Don’t get me wrong: work-arounds have their places; I’d just rather have a solution.

It’s pretty basic.  You have to edit one of the Nautilus configuration files.

gksudo gedit /usr/share/applications/nautilus-home.desktop

(Never use sudo to run a graphical application like GEdit; always use GKSudo. You will be prompted for your password in a dialog window.)

The change you need to make is to add two characters ( .—yes, space dot) to the end of one line in this file.

##
# Change this line:

Exec=nautilus --no-desktop

# To this:

Exec=nautilus --no-desktop .

##

Now if you logout and back in you will find that Gnome-Do will have no trouble opening your Home folder.

Why Nautilus and Gnome-Do haven’t been able to sort this out in at least three years is beyond me.

Share

Burning in Banshee

I wanted to burn one of my playlists to a CD this morning, but I had some trouble figuring out how or where Banshee managed the burning.

I thought perhaps I could just locate a playlist and right-click on that playlist and choose Burn to CD or something equally obvious. Nope.

Right-clicking on a playlist in Banshee gives three options:

Rename
Export Playlist…
Delete Playlist…

I then thought maybe there would be an export option that was something like … as CD or maybe even … as ISO. No luck. Just three different playlist file options (m3u, pls, and xspf). I really didn’t want to have to export the playlist and use another application to burn from that file manually.

After some thrashing about and some mild cursing I found that if you right-click on any track (in a playlist or otherwise) you will find a related option:

Write CD…

Of course that will open Brasero with the one track ready to burn. Ok. That was enough for understanding but let’s agree that’s a little silly.

Here is the short version for those who are still scratching their heads. First you enter one of your playlists (by clicking on it). Then you select all of the tracks in that playlist. Finally you right-click on those selected tracks and send those to Brasero using the Write CD… option.

Have fun with that.

Share

Tame the Latest VirtualBox under Ubuntu

Sometimes one has need of virtualization. I am one; I had need. I like VirtualBox well enough. It’s no VMWare, but then again it doesn’t cost anything for me to use VirtualBox at home. Also, I would like to set up a PPA repository on my Ubuntu machine so that updates for VB come through Synaptic (or apt-get if you prefer). Sounds complicated, I know, but really it’s pretty easy. Here’s how.

I am using Ubuntu 10.04 (also called Lucid or Lucid Lynx); you may use these directions for other versions of Ubuntu (or perhaps other Debian variants), but you will have to make the appropriate adjustments.

First of all you will need to add the repository to your Software Sources (System —> Administration —> Software Sources —> Other Software tab —> Add button).  Here is the APT Line you’ll need:

http://download.virtualbox.org/virtualbox/debian lucid contrib

Once you have that repository in place, you’ll want to get the key for that repository so you can attach to it securely.  I prefer to do this via the terminal (Applications —> Accessories —> Terminal).  As it happens you can also add the repository via the terminal and so I’ll include both commands for you here:

##
#
# You may add the repository using this command:

sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian lucid contrib"

# You may add the key using this command:

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -

# You will be asked for your password to run these administrative level commands to make changes to your system.

##

Ok. Now that you have added these you will find there are various versions of VirtualBox in Synaptic. Pick the one you’d like to install and mark it for installation. I’m currently running 4 (actually 4.1.2 I believe). I was using 2 up until today when I upgraded to 4 so I know at least those two work.

According to this article there are some extras you can install, plugins for VirtualBox, by downloading them and pointing VirtualBox at them. They can be found on the VirtualBox site (which uses Edgesuite for content delivery).  I haven’t tried the extras so I can’t say anything about them, but they sound like they are worth having.  You can read about them and download them here.

I hope that helps you get virtualized.

Share

Keep Stable Thunderbird Current on 64bit Ubuntu

I recently built myself my first 64bit Ubuntu (10.04) machine.  I was pleased to discover that everything I was doing on my 32 machines was doable on this new 64bit machine.  Then I ran into a single particularly annoying snag.

Ubuntu was including Thunderbird v3.1.11 with their release.  Lightning was not released as 64bit for v3.1.11 only for v5, and the Ubuntuzilla  repository wasn’t including 64bit builds of Thunderbird.  I felt cornered.

(Note: I am told UbuntuZilla is now including the 64bit builds.)

After some investigation and inquiries made into the Ubuntu and Mozilla communities I was able to cobble together an elegant (read: simple) solution.  Fear not, friends; you can do it too.

First you will want to add the Mozilla stable repository.  You can do this with a single command from your Terminal:

[CODE=BASH]
##

# The following command adds the PPA (repository) to your system:

sudo add-apt-repository ppa:mozillateam/thunderbird-stable

# If you have Thunderbird v3.1.11 installed run these commands to move to v5:
sudo apt-get update
sudo apt-get upgrade

# If you have not yet installed Thunderbird you can install it by running this command:

sudo apt-get install thunderbird

##[/CODE]

The first command installs the required PPA repository on your system so that Synaptic, Software Center, and apt-get can locate the most recent versions of Thunderbird. The second and third lines will update your system if you already have Thunderbird v3.1.11 installed. If you don’t have v3.1.11 installed, just run the first command to get the PPA and then run that last command to install Thunderbird.

If you feel awkward on the command line you can just run the first command and then use Synaptic to install the software or Update Manager to run the updates, but as you can see it’s not all that intimidating.

Hope you find this as useful as I have.

Happy hunting.

Share

64bit UbuntuZilla Blues

As you probably have guessed I am trying to advocate for Ubuntu by the common computer illiterate. It’s ready, of course, but one of my favorite and most preferred pieces of cross-platform software is causing me some trouble.

Let’s be clear on this: the population for whom this will be a problem is presumably very tiny. You must be running 64bit Ubuntu, you must want to keep a current-stable-build PPA (repository) available for Thunderbird (that’s my darling), and you must want to run the Lightning extension for calendaring.

Ubuntu itself gets a little behind on Mozilla software because of their update v upgrade philosophy.  Normally I wouldn’t care, but since Thunderbird development is moving along I’d rather keep to the current-stable builds.  Ubuntuzilla offers that possibility by maintaining their own repository.

On my 32bit Ubuntu machine (10.04 currently) I am running Thunderbird v5 and the current beta build for Lightning, and I am doing this all through the Ubuntuzilla PPA so that I get updates whenever a new stable version shows up.

On my 64bit Ubuntu machine (also 10.04) the only trouble I have encountered is with this exact software combination.  Literally every other piece of software I might care to use (Transmission, Opera, Banshee, &c) are all fully operational in the manner of my usual choosing: rockin’ the 64bit world.

In part this is possible on the 32bit machien because Ubuntuzilla maintains a current-stable-build PPA for certain Mozilla software (at least Firefox and Thunderbird). The problem with this repository is, according to them:

Until such a time as Mozilla decides to release 64bit builds, this repository will only host 32bit packages.

My 32bit machine is running v5 because of the PPA, but my 64bit machine is still running v3.1.11 because Ubuntu seems to think that’s current enough.  The latest version of Lightning is 64bit compatible (I think); however, the current version of Lightning is no longer compatible with Tb v3.  And the previous version of Lightning—wait for it—is not 64bit compatible.

It has been brought to my attention here that Mozilla is currently offering a 64bit build.

That’s all very exciting except that UbuntuZilla doesn’t seem to have received the memo.  Or I’m misinterpreting this other information.  Or something else I can’t quite envision.

You get the basic picture.

I want my Thunderbird 64bit with Lightning, and I want to be able to also advocate this same solution for folks for whom compiling their own every time a new release shows up is like asking a Labrador to perform calculus: it involves a ball, a lot of saliva, and probably some swimming.

I am communicating with the Ubuntuzilla community and will bring updates here as I have them.

Solution:

You will find my write-up here.

Share

Installing dd-wrt without Windows

I won’t pretend to understand why the makers of dd-wrt would make all the installation tools Windows executables, but they have.  I mean, it’s a Linux based firmware.  Silliness.

Fortunately I didn’t need Windows to use their tools.  I was able to download their files and run them all under Wine in Ubuntu 10.04 for my Linksys WRT54g without any troubles—until I arrived at Step 20.  Their tftp.exe wouldn’t run under Wine.  Turns out, though, I didn’t need to use their tftp.exe at all.

In case you are not already using Wine, you can find it in Synaptic easily enough.  You should not need to perform any special configurations.

You will want to replace Step 20 with a manual ftp installation of some kind.  I used TFTP.  You can install TFTP through Synaptic or by entering sudo apt-get install tftp at the command line followed by your password when prompted for it.

Either way you’ll want to have a terminal open for the next bit.

Once TFTP was installed I went to my terminal and changed into the directory where my dd-wrt file (mine was called dd-wrt.v24-12548_NEWD_micro.bin) was located on my local machine: cd /path/to/dd-wrt/location

Then I merely ran the following TFTP commands.  Once I entered the first command below I was taken to an FTP prompt (that’s the > pictured in the commands below).  You won’t need to type that; it’s just here to separate the FTP commands from the terminal commands.  You can leave FTP and return to your terminal by typing q or quit at the FTP prompt (and hitting Enter, duh).

tftp 192.168.1.1
> binary
> rexmt 1
> timeout 60
> put dd-wrt.vXX_XXX.XXX.bin

When it worked my terminal returned the message “Sent 1703936 bytes in 2.6 seconds”.

(You needn’t worry much about Step 21 or Step 22 either.)

Also, I was twice prompted by dd-wrt on the router to set a password.  Once when I installed it and once again after I hard-reset it (Step 24).  That’s normal.  Just go with it and pick a nice complex secure password.

You can find the instructions for installing dd-wrt on a WRT54g v5 here.  Just remember to refer to the above when you get to Step 20 (if you are using Linux).  Their site has a strong catalog of routers which can run dd-wrt.  Hopefully yours will be among them.

They also sell certain routers with dd-wrt already installed in case that’s a better starting point for you.  Check out their home page.

Good-bye Windows.

Share

Tweak Opera to Befriend Transmission

I use Opera as my main browser and I use Transmission as my torrent client.  The problem begins that Opera is its own torrent client.  Nothing wrong with that except that I want Opera to pass torrents over to Transmission instead.

There are really two operations that you need to consider in dealing with torrents today.  The first is to inform Opera what you want done with .torrent files; the other is to inform Opera what you want it to do when it encounters a so-called Magnet Link.

With the torrent file you are probably already familiar.  It’s a tiny file containing just enough identifying information for your torrent client to participate in the torrent for which you seek.  Is that too esoteric?  Well, that’s because it is.  It’s about as interesting as the number you pull out of that thing at the DMV and wait.  Sure it’s important because it’s necessary, but you’re just going to throw it away.

The Magnet Link obsoletes the torrent file.  A Magnet Link passes the needed number, the hash (which is all the torrent file really carries) directly to the torrent client.  (Here is good article on magnet links with links to a potentially useful script.)

Since we can’t guarantee that all sites will use one or the other we want to address both of them.

Getting Opera to pass .torrent files to your torrent client is a simple matter of changing that particular file association in Opera itself.  This way when you click on a torrent file link you are done.  I have mine set up to ask me what to do.  I like it that way.  You should be able to set it up to open them directly with the information which follows if you are so inclined.

Torrent File Modification

There are three things to note in making this alteration.  You want to make this in the Downloads section  of the Preferences dialog.  You want to ensure that the “Hide file types opened with Opera” check box is unchecked.  And finally if you sort by extension (by clicking File extension(s)) you can just roll down to T to select torrent.  Click the Edit button (duh!).  Pick the option you prefer for this file extension.

(If there is no torrent entry, and there ought to be, you can add one using the MIME type and File extension you see in the image above.)

Magnet Links are working (see Update below).  The other bit, the Magnet Link, I haven’t sorted out as yet.  Transmission supports Magnet Links as of version 1.9 or so (and I’m using a supported version).  Here is how I have my Opera preferences arranged:

Magnet Link Modification
Magnet Link Modification

For this I went into Programs (also in the Preferences dialog) and clicked the “Add…” button.  The Protocol is magnet, of this I am certain.  I also believe that my shortcut to Transmission is called out correctly.  (If you are using a different client, modify accordingly.)  And yet I get this error when I attempt to use a Magnet Link: You should no longer get this error if you follow the Update directions below.

Magnet Link Error
Magnet Link Error

Bummer. No bummer here.

I tried using %s, %u, and no modifier.  Without a modifier the link does nothing.  With either %s or %u I get the above error message.  I’ll update this post as I am able to figure this out.  In the meantime prefer torrent links.

Clearly these instructions are for Ubuntu (well, that may not be clear to everyone), but there ought to be enough information here for you to sort it out for Mac or Windows.

Happy torrenting.

(Firefox users will find this link useful.)

Update:

As of the release of Opera 11.10 magnet links are working.  You will want add /usr/bin/transmission into the Open with other application box and put %s into the Parameter box.

Share

Split a FLAC and Tag the Children using Cue Information

(Though this article will still be useful to some, most users will prefer my updated article here.)

It may come to pass that you download a concert or album only to discover that the encoder has helped you out by encoding the entire thing as a single FLAC file accompanied by a .cue file for determining the track changes.  Rhythmbox, for instance, will play these large FLAC’s just fine and it will even display the correct track information as you progress through the file.  However, I find it much more palatable to have single tracks be single files.

It’s actually pretty easy to break that large FLAC file into its component tracks and to add the appropriate tag information into those individual FLAC files.  It only requires a couple of lines of code, in fact.  The code may look complicated, but once you understand how to parse the different pieces you should have no difficulty in manipulating the code to process your files.

Before you begin with that you will want to add two utility packages which contain the tools you will need to make these splits and do the tagging of the individual files.  Open a terminal (Applications —> Accessories —> Terminal) and run these two commands:


sudo apt-get install shntool
sudo apt-get install cuetools

It doesn’t matter in which order you run them but you will need both packages.

First I offer a couple of examples of how the code might look.  Suppose you have a folder which contains a Van Morrison album as a single flac (and the cue file is in there as well).  In your terminal (Applications —> Accessories —> Terminal) navigate into that folder (using the cd command).  Your commands might look like such:

## Two commands as an example
#

shnsplit -o flac -f "Van Morrison - Astral Weeks.cue" -t "%n – %t" "Van Morrison - Astral Weeks.flac"

cuetag "Van Morrison - Astral Weeks.cue" 0*.flac

#

As I said, the code looks a little complex but let’s look at another example.  Suppose you have volume one from the Hôtel Costes series by Stéphane Pompougnac.  Your code might look like this:

## Two commands in a different example
#

shnsplit -o flac -f VA-Hotel_Costes_1.cue -t "%n – %t" VA-Hotel_Costes_1.flac

cuetag VA-Hotel_Costes_1.cue *.flac

#

As you can see, certain elements do not change.  What changes is your particular file names.  In the Van Morrison example the files contain spaces and said spaces must be preceded by a slash in order to be taken as a space within the file name (or you must quote the entire file name).  In the end what you are really seeing is this (the square brackets are only there to remind you what needs replacing):

## More examples for better understanding
#

shnsplit -o flac -f [cuefile].cue -t "%n – %t" [albumflac].flac
# OR
shnsplit -o flac -f "cue file.cue" -t "%n – %t" "album flac.flac"
# OR
shnsplit -o flac -f cue\ file.cue -t "%n – %t" album\ flac.flac

cuetag [cuefile].cue *.flac

# &c

#

I like to change both my FLAC  and cue files to the name a.  Also, you may or may not want to add the name of the performer in your file names. (I only include the performer names on various artist albums. So you know, %a is for Album and %p is for performer.) Then I can simply run (no slashes; no quotes around the file names):

## Choose one of these first two
## Then run the last

shnsplit -o flac -f a.cue -t "%n – %t" a.flac
# OR
shnsplit -o flac -f a.cue -t "%n – %p – %t" a.flac

cuetag a.cue *.flac

#

(Be sure to either send the album FLAC to the trash or change its file extension after running the first command but before running the second, or you will get an error about having the wrong number of FLAC files.)

Let me explain that zero (0) in the Van Morrison example.  That album happens to have fewer than 10 tracks.  So all of the tracks begin with a zero (01, 02, &c).  That is not the case on the Hôtel Costes album; it has tracks 11, 12, 13, &c.  You must add something like .remove to the album FLAC (so VA-Hotel_Costes_1.flac.remove) or move to different location (like the trash) after you have run the first command and before you run the second command (since the album FLAC file also ends in .flac and would be within the scope of *.flac).  If you leave the original FLAC within range, cuetag will inform you that the number of tracks does not match the number of cue breaks and it will not tag the files.  Not a big deal, but it could be a point of confusion if you were not prepared properly for it.

There are other arguments besides those which I used in my commands above.  You can read quite a lot about similar methods here.

Happy hunting, music lovers.

Share

Add Opera to Ubuntu’s Update Manager (Synaptic)

One of the nice bits about running a version of Linux which supports a robust package management system is that the operating system itself can manage your updates.  This means that not only does your operating system seek out and alert you to updates for itself, but it can also alert you to newly available versions of your favorite software—and then, at your command, run that update.

It works smoothly concerning the software that comes installed on your system when you first create it.  That pretty much goes without saying.  It’s expected.  But I run Opera and I had to install Opera on Ubuntu 8.04 in order to do so. (I’ve used this same method up to and including 12.04.)

You’ll want to have a terminal open for a couple of lines of code.  You can open a terminal by navigating to Applications —> Accessories —> Terminal.  There are only two (one if you already have Opera installed) and you can just copy and paste them into the terminal window.

Ok, let’s ask Synaptic to manage any new updates that come down for Opera.  Open Synaptic (System —> Administration —> Synaptic Package Manager).  You will be asked for your password.

Navigate to Settings —> Repositories —> Third-Party Software and click the “Add” button.  Enter this line in the “APT Line:” text box:

deb http://deb.opera.com/opera/ stable non-free

Then click the “Add Source” button and the “Close” button twice.  (The second dialog is just letting you know that you have made a repository change.)

This tells Synaptic where to seek out updates for Opera.  (These are Opera updates, mind you.  They give those over to the cats at Debian.  Debian uses etch squeeze as the present stable version, and Ubuntu can use the Debian packages for Opera just fine.  For more about Debian and squeeze see Debian.)

You’ll need to add the public key.

(There is a line of code for adding the key on the below-linked-page.  This works in some versions of Ubuntu but not in others.  See my comments below if you would like to use the line of code.  Otherwise just follow the instructions in the next paragraphs for adding the key manually.)

Go here and copy the entire block of code near the bottom of the page (including both lines with several dashes which represent the BEGIN and END statements for the key).  Save this text into an empty file some place easy to find, like your desktop.  To create an empty file on your desktop, merely right-click on the desktop and choose Create Document —> Empty File.  Name it whatever makes it easy for you to find it and just paste those lines of text directly into the document.  Save the file.  (After you import the key you may delete this file.)

Let’s import that key.  (See the note at bottom of post.)

Go back to Synaptic and navigate to Settings —> Repositories —> Authentication and click the “Import Key File…” button.  Find the file you just saved with the key in it and click “OK” to import the key and then the “Close” button which follows.

Now, when you click the “Reload” button in the Synaptic Package Manger you will not get a key verification error.

Installing Opera is a one line command operation:

sudo apt-get install opera

(You will be asked for your password.)

From now on, when you run your updates by navigating to System —> Administration —> Update Manager it should seek out any new updates for Opera in addition to any updates otherwise ready for your system.

Thanks to my friends over at MyOpera who helped to make this happen.  Of course, thanks to all those Debian contributors for doing all the heavy lifting.

Note:

The key changes annually and so you will need to revisit the above page to get the new key each year.

Share