Suppressing web-browser command output to stderr
(1) By Florian Balmer (florian.balmer) on 2025-01-11 13:00:50 [source]
I was about to check-in a fix for [2cf91c0c88] because
2>/dev/null
should be 2>NUL
on Windows , but then realized:
2>NUL
is redundant with the defaultweb-browser
setting on Windows, which uses thestart "" <URL>
pattern, as thestart
command causes GUI processes to be launched without any connection to the parent terminal.Some people may want so see the error output of the
web-browser
command for debugging purposes.Or their
web-browser
command may already include a redirect of stderr to a log file, which is then invalidated / superseded by appending the hard-coded2>/dev/null
at the end.
Since redirects may be specified at any position on the command line (i.e. they would also work if more command-line arguments are appended), I think the best way to handle this is:
Don't append the hard-coded
2>/dev/null
to theweb-browser
command.Change the built-in default for
web-browser
to include2>/dev/null
on Unix/Linux.Leave the built-in default for
web-browser
unchanged on Windows and Mac.
Would it be okay if I make these changes?
(2) By Richard Hipp (drh) on 2025-01-11 13:11:03 in reply to 1 [link] [source]
Thanks for the suggested improvements. I've already implemented them. Double check behind me, please, and make sure I got everything right.
(3) By Florian Balmer (florian.balmer) on 2025-01-11 13:22:58 in reply to 2 [link] [source]
Running this on a Linux VM will take me some time, but from reading the code,
things look fine, and users can run fossil set web-browser firefox
to get back
the error output.
Thanks for the change! (I'll report back eventual oddities of my Linux test when done.)
(4) By Florian Balmer (florian.balmer) on 2025-01-11 13:53:35 in reply to 2 [link] [source]
Wow, Firefox has a lot to say on the terminal ...
But now I can also do fossil set web-browser "firefox 2>>/tmp/firefox.log"
,
and things seem to work fine. Thanks!
(5) By Richard Hipp (drh) on 2025-01-11 14:13:29 in reply to 4 [link] [source]
I upgrade my desktop from Ubuntu 16.04.7 to Ubuntu 24.04.1 yesterday (and continuing into today - it's a process). I didn't used to get any chit-chat on stderr with 16. But now, as you observer, here is lots of verbiage. I don't know what that is about. But whatever the cause, that was the motivation for me making this change → working around bugs in Ubuntu 24.
FWIW: Ubuntu 24 uses Wayland instead of X11. This seems to be a serious regression. Wayland appears to be slower, with inferior graphics, at least to my eye. Lots of aliasing in text, making it hard on the eyes. And parts of Wayland just don't seem to work. For example, resizing a window (on some applications) requires that you select the "Resize" option from the title bar menu, and even then it is very clunky. No more just grabbing an edge or corner and dragging. Oh well. Welcome our new Wayland overlords....