On 2023-10-23 10:41:27 +0100, Barak A. Pearlmutter wrote: > It's great that people are using Xournal++, and care enough about it > to be bothered by this!
FYI, I've been using Xournal (xournal package) until now, which doesn't have this issue. But I suppose that xournal will be removed from Debian as it uses GTK 2 and seems unmaintained upstream (probably replaced by Xournal++). > These are coming from libsndfile1. Many Linux GUI programs do output > a constant stream of harmless warnings, and Xournal++ is hardly the > worst offender. This occurred often in the past, but I don't see that often now (at least for the non-GNOME applications). > The "right" fix is presumably to tell libsndfile1 (the > calls are sf_xxx()) to try other sound systems first, like pipewire or > pulse, before going to devices. Or maybe there's a way to tell it to > be less verbose. Perhaps libsndfile1 has build options that would > avoid this by trying things in a different order, or tell it to be > less verbose. On the libsndfile1 side, I think that libraries shouldn't output any warning/error message in general, except for fatal error messages. The API should handle errors. Debugging messages may be useful, but should never be output by default. FYI, other applications like audacity also use the libsndfile library, but have no such issues with it. Or does Xournal++ do something that is really wrong? > Anyway, patches welcome, at least to Xournal++. I've seen that Xournal++ outputs other useless messages such as (com.github.xournalpp.xournalpp:49547): xopp-WARNING **: 12:19:13.627: lastOpenPath is not set! This is completely useless for the end user. Since Xournal++ seems to show errors in dialog boxes instead of the terminal (not every GUI app does that), a solution could be to redirect stderr to /dev/null on its side by default (some option could be added to leave stderr as is, e.g. for debugging). The only useful error message for the terminal could be the "cannot open display" one. Fortunately, it occurs before any spurious warning message: zira:~> env -u DISPLAY /usr/bin/xournalpp (com.github.xournalpp.xournalpp:49538): Gtk-WARNING **: 12:19:05.448: cannot open display: So it might be possible to redirect stderr after that. > If it really bugs you, as a workaround I'd suggest redirecting > standard error to a log file, maybe via a pipe that removes the > annoying ALSA stuff. In the mean time, in case other users are potentially interested, I've done the following: #!/bin/sh set -e xrandr > /dev/null /usr/bin/xournalpp "$@" 2> /dev/null (the xrandr is useful to get the "cannot open display" error, assuming that --display=DISPLAY xournalpp option is not used, but I'm wondering whether any user uses this option). -- Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

