michael-lazar / rtv

Browse Reddit from your terminal
MIT License
4.64k stars 274 forks source link

[Question/bug report] RTV opens links in Chromium twice #633

Open ghost opened 5 years ago

ghost commented 5 years ago

I run Chromium within Firejail's sandbox using the default profile and RTV opens links in two new tabs unless I start the browser without the addtional sandbox. As far as I know, there are issues with utilizing xdg-open when both programs run within seperate sandboxes and try to communicate with each other, but it is not the case here; however, due to my limited knowledge, I'm marking this issue as a question/bug report.

michael-lazar commented 5 years ago

Hey, thanks for the report. Try running the following from the command line to help narrow down if this an RTV issue or something with python / your environment / etc.

$ python -c "import webbrowser; webbrowser.open_new_tab('https://www.reddit.com')"

If there does turn out to be something funky with xdg-open, you could also try using the $BROWSER or $RTV_BROWSER environment variables instead. Those will take precedence over your system's default browser settings.

ghost commented 5 years ago

I've run the command and it yields same results, maybe xdg-open does not play nicely with Chromium's built-in sandboxing when Firejail's in use and cause the problem? I have also tried opening a link with Termite and it has the problem too. Neverthless, if this was an issue with my mime configuration, it would also happen without Firejail's sandboxing.

Edit: Setting $BROWSER variable doesn't have any effect, the issue persists.