varietywalls / variety

Wallpaper downloader and manager for Linux systems
http://peterlevi.com/variety
GNU General Public License v3.0
1.16k stars 140 forks source link

View at Reddit uses Firefox instead of default Browser #371

Open fischer-felix opened 3 years ago

fischer-felix commented 3 years ago

Version of Variety you are using

0.8.4

Is your feature request related to a problem? Please describe.

If I go to see some additional Information about a wallpaper on Reddit, it always takes me to it in Firefox, although Firefox is not my default Browser. It's nothing game-changing, but it would be nice, if that could be fixed.

Describe the solution you'd like

I think it would be the best if "View at Reddit" just used the system's default web browser, but it would also be okay, if you could choose in the variety settings, what browser you'd like to use.

Additional context

In my particular case, I'm using Manjaro KDE and Brave as my default web browser.

peterlevi commented 3 years ago

Hm. We are using this function, which should in theory be opening your default browser: https://docs.python.org/3.6/library/webbrowser.html#webbrowser.open_new_tab. We definitely don't have anything related to Firefox hardcoded anywhere. Can you test this line in a terminal to see which browser it will open:

python3 -c "import webbrowser; webbrowser.open_new_tab('http://cnn.com')"

Where did you set your Brave to be your default browser, are you sure your system really sees it as a default?

fischer-felix commented 3 years ago

I ran the command and Firefox popped up. I set Brave as default in the KDE settings for Default applications. [image: Screenshot_11.10.2020_14:23:34_Default Applications .png] I can try setting the default another way, and will come back to you with the results.

Am Sa., 10. Okt. 2020 um 23:13 Uhr schrieb Peter Levi < notifications@github.com>:

Hm. We are using this function, which should in theory be opening your default browser: https://docs.python.org/3.6/library/webbrowser.html#webbrowser.open_new_tab. We definitely don't have anything related to Firefox hardcoded anywhere. Can you test this line in a terminal to see which browser it will open:

python3 -c "import webbrowser; webbrowser.open_new_tab('http://cnn.com')"

Where did you set your Brave to be your default browser, are you sure your system really sees it as a default?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/varietywalls/variety/issues/371#issuecomment-706612193, or unsubscribe https://github.com/notifications/unsubscribe-auth/APTKTWFF3JN5M7FKIBV7AKDSKDE6HANCNFSM4SLAE3SQ .

fischer-felix commented 3 years ago

Now I set my default Browser using export BROWSER=/usr/bin/brave and if I run the python3 -c "import webbrowser; webbrowser.open_new_tab('http://cnn.com')" command it uses Brave, but view at Reddit still uses Firefox.

peterlevi commented 3 years ago

Yes, because this export only affects the terminal where you ran it and its subprocesses, so this does not affect the Variety process in any way. You'll need to put it in you /.bashrc (or ~/.bash_profile). I have no idea though why Python does not pick the default browser set in KDE.

fischer-felix commented 3 years ago

Unfortunately, I can't figure out where to set BROWSER=/usr/bin/brave. I tried to do in the variety.conf, but that didn't work and I did in .bashrc and .bash_profile. If I run variety from my terminal session, it works perfectly fine, so I think just defining that variable somewhere would help.

doodahjones commented 2 years ago

Have a similar issue with the drop-down context menu entry "View at ..." Also insists on Firefox and doesn't work at all with Firefox uninstalled. Using Mint Cinnamon 20.3 and Variety 0.8.3