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";
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 isn't set it will be set to
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
A new release of
xdg-open seems to fix this, but it seems to take forever.
I hope this helps after such a long time.