I've started using OpenBox and I really like it.

But my chromium opens everything with firefox.

Is there any fix for that? I'm looking for most lightweight solution, but also with easy and fast configuration.

  • It is a chromium problem, I think, not an openbox one.
    – enzotib
    Apr 11, 2012 at 19:40
  • I think it's not chromium problem, because when i was running CrunchBang chromium worked fine. But now i'm using Arch.
    – kravemir
    Apr 11, 2012 at 19:43
  • It's an XDG thing. I'm pretty sure chromium uses xdg-open for things it doesn't handle internally. Never figured out how to configure that thing correctly...
    – Mat
    Apr 12, 2012 at 5:57
  • @Mat Yep. It's true. So u can put it into an answer. I'll ask another question.
    – kravemir
    Apr 13, 2012 at 8:35
  • @MiroK: that's not an answer at all, just a beginning of a clue - and I just don't understand how you're supposed to configure xdg-* thingies, never get it to work properly myself... so I'd like to see a proper answer too :)
    – Mat
    Apr 13, 2012 at 15:41

1 Answer 1


Chrome uses xdg-open to open unknown files. The problem with the xdg-open script is that tries to figure out which desktop environment you have. It does this by checking

    if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
    elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
    elif xprop -root _DT_SAVE_MODE | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;

Since Openbox doesn't set any of these variables $DE is empty and a generic approach is used.

In version 1.0 of the xdg-utils the default behavior looks like this

    for browser in $BROWSER; do
        if [ x"$browser" != x"" ]; then

            browser_with_arg=`echo "$browser" | sed s#%s#"$1"#`

            if [ x"$browser_with_arg" = x"$browser" ]; then "$browser" "$1";
            else $browser_with_arg;

            if [ $? -eq 0 ]; then exit_success;

    exit_failure_operation_impossible "no method available for opening '$1'"

You can see that it tries to open everything with $BROWSER. When $BROWSER isn't set it will be set to firefox:mozilla:netscape.

So the problem is that ether you need to set a DE, which then leads to new problems (like programs which try to connect to the DE session) or you set your $BROWSER to something like exo-open, gnome-open or kfmclient exec.

A new release of xdg-open seems to fix this, but it seems to take forever.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .