How to fix default browser (other apps) settings

Support on MATE usage

Moderator: flexiondotorg

How to fix default browser (other apps) settings

Postby TogKlim » Fri Oct 19, 2012 10:16 pm

The default browser settings are not functional on opensuse.

At least one cause for this (the one I found and addressed) is because xdg-open doesn't know about mate.

Adding support for it isn't hard.

Edit your xdg-open file, mine is in /usr/bin/xdg-open, "which xdg-open" should work to help you find yours if it isn't there.

Find the detectDE() function and update it:

Code: Select all
    if [ x"$MATE_DESKTOP_SESSION_ID" != x"" ]; then DE=mate;
    elif [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;


(I added it before KDE and made KDE an elif)

Then find the open_kde() function, and before it add mate support:

Code: Select all
open_mate()
{
    if gvfs-open --help 2>/dev/null 1>&2; then
        gvfs-open "$1"
    else
        mate-open "$1"
    fi

    if [ $? -eq 0 ]; then
        exit_success
    else
        exit_failure_operation_failed
    fi
}


And finally find the big
Code: Select all
case $DE in
statement that determines what to run and add mate support like this:

Code: Select all
case "$DE" in
    mate)
    open_mate "$url"
    ;;

    kde)
    open_kde "$url"
    ;;


Again, I inserted the mate support before KDE.


Now my URLs do my browser bidding. (By default you will get firefox -> mozilla -> netscape if it can't figure out what DE you are using)
TogKlim
 
Posts: 38
Joined: Mon May 14, 2012 5:20 pm

Re: How to fix default browser (other apps) settings

Postby stefano-k » Sat Oct 20, 2012 10:37 am

http://cgit.freedesktop.org/xdg/xdg-uti ... cecafe3d47
This is already done in latest xdg-utils version
User avatar
stefano-k
Site Admin
 
Posts: 329
Joined: Sun Dec 25, 2011 10:42 am
Location: Italy

Re: How to fix default browser (other apps) settings

Postby TogKlim » Mon Oct 22, 2012 7:47 pm

stefano-k wrote:http://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=b961235b197647d6649ef3d48d7cc2cecafe3d47
This is already done in latest xdg-utils version


So it is! That RPM didn't get pulled in when I updated from opensuse 12.1 -> 12.2. Could have been caused by the change in version names on opensuse.

At least I see that I did it the same way!
TogKlim
 
Posts: 38
Joined: Mon May 14, 2012 5:20 pm


Return to Desktop Help

Who is online

Users browsing this forum: No registered users and 2 guests