ActivityWatch / aw-qt

Tray icon that manages ActivityWatch processes, built with Qt.
Mozilla Public License 2.0
27 stars 32 forks source link

tray-icon "Open Dashboard" uses the wrong browser on ubuntu 20.04 #63

Closed artdgn closed 4 years ago

artdgn commented 4 years ago

Using "Open Dashboard" defaults to Chrome even though the system default is Firefox.

I've tried having a look at the code that's launching it (here?) and what's strange that both xdg-open and webbrowser module in python on my system use the correct browser (Firefox), but AW tray-icon still launches in Chrome.

Both python3 -c "import webbrowser; webbrowser.open('bla')" and xdg-open "http://bla" open Firefox correctly.

ErikBjare commented 4 years ago

This has to do with PyInstaller which we use to package everything. There's an issue in the main repo that seeks to resolve the issue, iirc it might even be fixed and is only waiting to be included when we make a new release.

On Fri, 25 Sep 2020, 10:54 Arthur Deygin, notifications@github.com wrote:

Using "Open Dashboard" defaults to Chrome even though the system default is Firefox.

I've tried having a look at the code that's launching it (here? https://github.com/ActivityWatch/aw-qt/blob/839c9fd423e1c2d64ee7dc03d87fe79d0bfc4c1b/aw_qt/trayicon.py#L47) and what's strange that both xdg-open and webbrowser module in python on my system use the correct browser (Firefox), but AW tray-icon still launches in Chrome.

Both python3 -c "import webbrowser; webbrowser.open('bla')" and xdg-open " http://bla" open Firefox correctly.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ActivityWatch/aw-qt/issues/63, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKXDOWJYI6HU47ECNMRDUTSHRLDBANCNFSM4RZJB6NQ .

artdgn commented 4 years ago

Thanks @ErikBjare, until it's fixed, is there an easy workaround or anything that can be edited locally to fix it?

ErikBjare commented 4 years ago

Here's the issue, indeed a fix has been applied and will be in the next release: https://github.com/ActivityWatch/activitywatch/issues/208

There isn't really any easy workaround, except for the obvious one of opening http://localhost:5600 manually in your preferred browser.