[neomutt-users] urlscan does not return command prompt to mutt

Peter P. peterparker at fastmail.com
Mon Mar 30 23:41:38 CEST 2020


* Adrian Petrescu <adrian at apetre.sc> [2020-03-25 16:19]:
> This is basically expected behaviour. The Python webbrowser module
> (which is part of Python's standard library, by the way - that's why you
> couldn't find it on PyPI) will wait for the process it calls to return.
Thank you Adrian, this is a good explanation!

> Whether it does or not is browser-specific.
> 
> It's pretty common for a browser binary (like `qutebrowser`, the one I
> use) to send a command to a running instance to open a new tab if one
> exists, and then return immediately. But if there isn't one, that
> process becomes the browser process and won't return until it ends.
Which was the case with me.
> 
> Looking at the [source](https://github.com/firecat53/urlscan/blob/master/urlscan/urlchoose.py#L153-L170)
> for urlscan, it appers there *is* a way to configure this; you would
> need to provide the following ~/.config/urlscan/config.json file:
> ```json
> {
>   "link_open_modes": ["Xdg-Open"]
> }
> ```
I had to hack /usr/lib/python3/dist-packages/urlscan/urlchoose.py
to get the desired link opening mode by default. But this might me due to
hickups in firefox.desktop files.
Funny, on another one of my Debian laptops urlscan always returns the
prompt to me, event without the config.json file presen.
Might be due to different firefox*.desktop files perhaps...

> Hope that helps :)
You helped me a lot Adrian, thank you!
P


More information about the neomutt-users mailing list