>>>>> "José" == José Matos <[EMAIL PROTECTED]> writes:

José> and the package (small)
José> http://portland.freedesktop.org/download/xdg-utils-1.0beta3.tgz

So basically, the script detects desktop environment like this:

detectDE()
{
    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;
    fi
}

and then uses the following:
kde:     kfmclient exec "$1"
gnome:   gnome-open "$1"
xfce:    exo-open "$1"
other: open in a browser among $BROWSER:firefox:mozilla:netscape

Of course, what is missing here is the possibility of knowing whether
a format is handled. This is done by xdg-mime (except that we do not
have mime types for formats (but we should).

JMarc

Reply via email to