Closed nh2 closed 3 years ago
Xvnc is at the mercy of Xorg in this regard. The TurboVNC Server just tacks on additional TurboVNC-specific usage information to the existing Xorg usage screen, so we are bound by Xorg's choice of standard stream and usage arguments. There are several areas in which it was necessary to modify the Xorg source code and maintain a TurboVNC-specific patch, but I try to avoid that unless there is a compelling reason. Making the Xorg usage screen a bit more intuitive isn't compelling enough to justify the pain.
As far as the exit code, there might be a way around that. I'll investigate.
The exit code has been fixed, although please note that the vncserver
script normally intercepts the -help
argument, so you won't notice this fix unless you invoke /opt/TurboVNC/bin/Xvnc
directly.
Xvnc is at the mercy of Xorg in this regard.
Ah, I see. Indeed Xorg --help
has the same issue. Might be something I could look into fixing upstream there.
Thank you!
Xorg has the same issue in terms of printing to stderr, but it does exit with a 0 error code if you pass -help
to it (but it doesn't understand --help
.) TurboVNC's implementation of Xvnc now does the latter as well.
For unix programs it is common to print their
--help
text to stdout, not stderr, if--help
is given directly.It is also common that a direct invocation of
--help
sets the exit code to0
(success), not1
(failure).TurboVNC's binaries, such as
Xvnc
, don't currently do that, making for confusing behaviour such asXvnc --help | less
not working as expected.It would be awesome if this small change could be made!