GNU bug report logs -
#9779
No usable browser found on Lubuntu
Previous Next
Reported by: Juri Linkov <juri <at> jurta.org>
Date: Mon, 17 Oct 2011 23:19:02 UTC
Severity: normal
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
Full log
Message #23 received at 9779 <at> debbugs.gnu.org (full text, mbox):
> Some relevant environment variables when logged in as "Lubuntu":
>
> DESKTOP_SESSION=Lubuntu
> XDG_CURRENT_DESKTOP=LXDE
>
> Some relevant environment variables when logged in as "LXDE":
>
> DESKTOP_SESSION=LXDE
> XDG_CURRENT_DESKTOP=LXDE
>
> The value of "DESKTOP_SESSION" looks like an arbitrary name of the
> current session (the same string as displayed on the Login menu).
>
> It seems that "XDG_CURRENT_DESKTOP" is the most reliable variable
> to determine whether the current desktop is LXDE.
I discovered that /usr/bin/xdg-open contains the following function:
# Checks for known desktop environments
# set variable DE to the desktop environments name, lowercase
detectDE()
{
if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
elif [ x"$DESKTOP_SESSION" = x"LXDE" ]; then DE=lxde;
else DE=""
fi
}
But actually checking for "DESKTOP_SESSION" fails when logged in as "Lubuntu".
So we have two options: implement the same checks (using "DESKTOP_SESSION")
or check for "XDG_CURRENT_DESKTOP" that is more reliable than "DESKTOP_SESSION".
Another problem is that when all checks fail in /usr/bin/xdg-open,
it falls back to `open_generic'. But `browse-url-can-use-xdg-open'
doesn't take into account the case of using `open_generic' in /usr/bin/xdg-open.
This bug report was last modified 13 years and 219 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.