v1cont / yad

Yet Another Dialog
GNU General Public License v3.0
685 stars 57 forks source link

version parameter requires a graphical session #277

Open Atemu opened 2 months ago

Atemu commented 2 months ago

Hi, I was automating something and noticed that yad --version does not work without a graphical session:

(yad:3382795): Gtk-WARNING **: 02:51:51.781: cannot open display: 

It should not require a graphical session to print its version to stdout.

This is trivial to repro using env -i $(type -p yad) --version as no graphical session stuff functions without env vars.

Running the program headless in this way is also required in packaging as a smoke tests to verify that the resulting binary can be executed and is the expected version for instance.