pop-os / cosmic-epoch

Next generation Cosmic desktop environment
2.83k stars 78 forks source link

How do I set/change default browser app? #556

Open qs5779 opened 1 month ago

qs5779 commented 1 month ago

I have edge and firefox installed. Thunderbird always uses firefox.

mmstick commented 1 month ago

If you know what the desktop entry is named, you can run xdg-settings set default-web-browser firefox.desktop, but replace firefox with the name of Edge's desktop file.

qs5779 commented 1 month ago

Thanks, I guess I was spoiled by GNOME settings. I did run into an issue however.

On my 22.04 pop-os I have:

xdg-settings get default-web-browser 
com.microsoft.Edge.desktop

On my 24.04 pop-os:

xdg-settings get default-web-browser
firefox.desktop
xdg-settings set default-web-browser com.microsoft.Edge.desktop
xdg-settings get default-web-browser
firefox.desktop

It apparently didn't like that, so I verified that on the 22.04 and 24.04 system the edge file was located at: $HOME/.local/share/flatpak/exports/share/applications/com.microsoft.Edge.desktop

after copying that file on the 24.04 system to /usr/share/applications/com.microsoft.Edge.desktop I was able to successfully set the default browser to edge.

qs5779 commented 1 month ago

I see on my 22.04 system this XDG environment variable is set XDG_DATA_DIRS=$HOME/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop

but not on 24.04, might be the root cause the set wasn't finding the deskfop file

qs5779 commented 1 month ago

Please ignore my previous two comments. i was using xdg-settings via an ssh connection. When repeating in a terminal on the actual system, the XDG environment variables were there and the set command worked fine for the deskop file in my local flatpak directory

Gh0stGames commented 1 month ago

It would be great to get a GUI menu for setting/changing system defaults, similar to what Gnome or KDE has.