[Konsole-devel] [Bug 297224] Command-line options ignored when stdout redirected to /dev/null
Jekyll Wu
adaptee at gmail.com
Sun Apr 1 09:58:05 UTC 2012
https://bugs.kde.org/show_bug.cgi?id=297224
Jekyll Wu <adaptee at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |adaptee at gmail.com
--- Comment #1 from Jekyll Wu <adaptee at gmail.com> ---
Thanks for reporting.
Since you didn't explicitly list the KDE version, I assume you are using
konsole 2.7.4 shipped in KDE SC 4.7.4 according to packages.debian.org
The reported problem does exist in that version. It is a little tricky to
explain why the problem happens.
Konsole uses KuniqueApplication internally to try to make all Konsole windows
running in the same process. One exception is when Konsole is started from an
existing terminal, a new Konsole process is created. However, the way of
checking is a bit naive. It just checks whether stdout is a tty. Clearly, that
check fails when Konsole is started like "konsole .... >/dev/null". So the
result is the new Konsole window runs in existing Konsole process. That is why
the "--display" option does not work as expected when used together with
">/dev/null".
The situation is improved a bit in KDE SC 4.8.0, where stdin is checked instead
of stdout. That is still naive. The current development branch performs that
check by trying to open /dev/tty. Maybe that change should be backported into
the 4.8.x branch.
For KDE SC 4.7.4, I don't know whether backporting is worthwhile. But the
change between 4.7.4 and 4.8.0 on this issue is trivial: just change
"isatty(1)" to "isatty(0)" in main.cpp. You might ask debian KDE team to create
and apply a simple patch.
As for the --nofork option and the dbus error, see bug 288200 for more
information.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the konsole-devel
mailing list