Closed havardjohn closed 2 years ago
I'm sorry, but I can't reproduce your issue with any of your examples. I also haven't received any other reports of a similar issue. I've been using (obviously :D) urlscan for years on Arch and Fedora primarily without any similar issues.
If I had to guess, I'd suspect something is messed up with xdg and/or mimetype handling on your system. Try installing urlscan in a virtualenv and then possibly spin up a fresh VM of $(distro) to try with a clean install.
I tested with the last commit just now, and it works as intended again! It only opens 1 tab now. I bisected, and found that the commit 224ded3
caused it to work again, but I cannot understand why from looking at the diff. Thank you for testing. :) Closing as resolved.
I was hit by the same issue and the current development version of urlscan also solves it for me.
@firecat53 can I urge you to make a release so that we can package and install this fix via our distros?
0.9.10 released. Thanks for the prompt!
I have urlscan installed on version 0.9.9 for Linux with python 3.10.4, urwid 2.1.2, glibc 2.35. Installed urlscan with
python setup.py build && python setup.py install --root=pkg --optimize=1
. No configuration file is present in ~/.config/urlscan/config.json. I can reproduce this in urlscan 0.9.6 as well. I have detailed the issue in the following 2 examples.Example 1
I run the command
urlscan /tmp/test1.txt
where the contents of/tmp/test1.txt
ishttps://duckduckgo.com
(or any other web page link). I pressl
to select the Xdg-Open link handler, and then press Enter. Then 3 tabs inqutebrowser
is opened, each openinghttps://duckduckgo.com
. Expected behavior is that only 1 tab is opened.When I run
xdg-open https://duckduckgo.com
, only 1 tab inqutebrowser
is opened. The same happens if I use the browser handler inurlscan
instead of the Xdg-Open. I have set environment variableBROWSER
toqutebrowser
. Without this variable set, only 2 instances are opened in the Xdg-Open handler, but one tab is inchromium
and the other inqutebrowser
.chromium
is not present in~/.config/mimeapps.list
.Example 2
Another example is when I run the command
urlscan /tmp/test2.txt
where the contents of/tmp/test2.txt
ismailto:bob@bob.com
. I have setupxdg-open
to openneomutt
for these links. I pressl
inside urlscan to select the Xdg-Open link handler, and then press Enter.neomutt
is started to write an email. I finish writing the email, and send or abort it. After that,neomutt
closes and 2 new tabs inqutebrowser
is opened, each openingmailto:bob@bob.com
(an empty page). Expected behavior is that no tabs are opened inqutebrowser
.In the previous paragraph,
BROWSER
env was set toqutebrowser
. If this variable is unset, instead of 2 new tabs opening inqutebrowser
, 1 tab inchromium
is opened. The expected behavior here is thatchromium
is not opened.I am willing to try to help solve this, but would like to know if there is any insight into this first. Thank you. :)