Closed nifr closed 9 years ago
The help message is generated implicitly by GOption where as version
requires that the parsing of options completes successfully. It seems that there is some kind of dependency to X although I am not sure why. As a work around I suggest to start tilda with X or at least use X forwarding in ssh.
Thanks for the quick reply and your awesome work with tilda.
There shouldn't be a dependency to X when invoking the --version
command.
I worked around this for now but it would be nice to get this fixed somehow. It would be helpful to test the version of the build remotely without requiring X-Forwarding on the build-server.
You could add g_option_context_set_description ()
to output the version on --help
? It's not very nice, but I'm not sure what can be done about GOption behaving like that.
I think I found a solution that fixes this issue, the reason is the call to gtk_get_option_group
, when TRUE
is passed to this function it will try to open the default screen and that fails if no screen is available (or if $DISPLAY is unset). By separating that from the parsing of the tilda options and handling it after the version option has been evaluation, we can prevent this dependency. I think for the other options it makes sense to check that the display is available since they all affect tilda and tilda wont run without a valid display.
@nifr Please test my commit, and if it works for you and has no unexpected side effects, then I will merge it into master.
@nifr Updated the branch to add additional error checking and a small comment to explain the reason for the change.
Please reopen if you can still reproduce it.
I'm trying to set up a simple build-system for tilda with Vagrant. However when I try to get the installed version with ...
... it throws the following error message.
This is strange because ...
... prints to
stdout
as expected.