[qutebrowser] How to run a userscript in Windows

Florian Bruhin me at the-compiler.org
Sun Sep 11 16:48:58 CEST 2016


Hey,

* David Nebauer <davidnebauer3 at bigpond.com> [2016-09-11 12:50:00 +0930]:
> > 
> > >      command called: spawn ['--userscript', 'hello.bat']
> > > [...]
> > >      Userscript to run:
> > > C:\Users\ME\AppData\Local\qutebrowser\data\userscripts\hello.bat
> > I'm guessing the hello.bat is in that location?
> 
> Well, no, as it turns out. The bat file was in:
> 
> 	C:\Users\ME\AppData\Local\qutebrowser\userscripts\hello.bat
> 
> 
> That is, not in the 'qutebrowser\data\userscripts' subdirectory but in
> 'qutebrowser\userscripts' (note missing 'data' subdirectory).
> 
> Once I moved the bat file into the correct directory, qutebrowser was able
> to run it. The script then produced the qutebrowser log messages:
> 
> Userscript exited with status 1
>     [...]
> Process stdout:
>     C:\Windows\system32>Echo ":message-info Test"
> 1>>"C:\Users\ME\AppData\Local\Temp\tmp_y_rdd1a"
>     Process stderr:
>     The process cannot access the file because it is being used by another
> process.
> 
> I presume this is the "readonly FIFO" problem Kingdread documents in pull
> request #1927 <https://github.com/The-Compiler/qutebrowser/pull/1927>.

This was now merged, and will be in the next release which will
hopefully happen somewhen over the next few weeks. Unfortunately there
are still some kinks we need to figure out before that...

> Sorry for wasting your time and Daniel's time. Still, it did point the way
> to the FIFO bug...

No worries! :)

> One thing would have helped me and you might consider implementing it: I'd
> have quickly known the cause of the problem if qutebrowser checked for the
> existence of a userscript before attempting to execute it and, in the event
> it is not found, gave a specific "userscript not found in <userscript
> directory path goes here>" message. I'll add a feature request for this.

That sounds like a great idea, and should be quite easy to do.

Florian

-- 
http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://listi.jpberlin.de/pipermail/qutebrowser/attachments/20160911/40b24bab/attachment.asc>


More information about the qutebrowser mailing list