Sunday 4 March 2012

HOWTO: Fix: Baobab opens directories in Totem/VLC (and some Xfce4 related things)

If you ever used filelight or baobab you probably know how useful they are. If you didn't, then you missed a lot on how you can spot (and fix) where your disk space is wasted.

With my recent attempt to upgrade to GNOME 3 which, because of its innate property to be useless and counter-productive, actually made me to use Xfce4 with a mix of GNOME aplications (since Xfce lacks a few functionalities here and there), I ran into all sorts of problems.

As a side note, Xfce4 is quite decent, but if you like some icons on your panels to be left aligned and some right aligned, you should know that you can add a Separator item to the panel, right click on it -> Properties and tick the Expand* check box. And if you also set the Transparent style, it will look nice, too.

Back to the topic. With my mix of Xfce and Gnome apps, I configured my top panel to contain a Free Space Checker for my /home file system and today it alerted me that I was low on disk space, so I started baobab to check what I can clean up.

When I found a possible suspect, I wanted to open the directory with a file browser, but, instead, Totem was started and started trying to queue all the files in the offending directory. The problem is that one way or another, Totem (or VLC) was configured to be the default handler for directories instead of the file manager.

The solution is simple, open with an editor the file ~/.local/share/applications/mimeapps.list and search for the line starting with inode/directory= and you'll see something like:

inode/directory=nautilus-folder-handler.desktop;baobab-usercreated.desktop;vlc-usercustom.desktop;


Remove the offending part, vlc-usercustom.desktop;, save the file and try again to open that directory from baobab. If you are double-lucky :P and now it opens with Totem, you will have to remove a reference to a "totem-usercustom.desktop;" or something of that sort. Now, on my system, that line looks like this:

inode/directory=nautilus-folder-handler.desktop;baobab-usercreated.desktop;


And now it works as expected**

* I suppose it's called like that in English, I have my desktop in Romanian
** Except that I would like it to start my desktop preferred file manager, not Nautilus, but that's another issue.

3 comments:

Corsac said...

You might want to check what's selected in Settings / Preferred applications / Utilities / File manager.

Not sure if it'd fix the issue, but it's worth trying.

Anonymous said...

I dont think I missed something by not using baobab.

Give xdiskusage a try as it comes without all the gnome dependencies and gives you a nice graphical overview of the disk usage as well.

eddyp said...

@Corsac: In Xfce I have Thunar set as the prefered file browser, but I think that because baobab is a GNOME application doesn't get that setting.

@Anonymous: I am installing it as I write. If it uses a pie-like display, it's probably OK.

(After install) OMG! xdiskusage is HIDEOUS!

You definitely missed out. And, as I can see, baobab doesn't pull much of GNOME at all, which is fine, since I already have some gnome apps installed.

Another minus for xdiskusage - ignores the LANG setting and ruins the display of file names with diacritics (of which I have).

Verdict: spartan and it looks like it was made in the 70s. Sorry, I use a DE for a reason.