When it try to start a graphical application from a terminal and it fails returning only an error of type cannot open display is very likely to be an environment variable error. In Unix-like systems for each Xorg server must be a logical display identifier of the form :0, :1, ..., :0.0, :0.1, ..., :1.0, :1.1 and so forth.
** (PROGRAM_NAME:PORT): CRITICAL **: Failed to parse arguments: Cannot open display:
the most frequent:
(PROGRAM_NAME:PORT): Gtk-WARNING **: cannot open display: VALUE
Error: cannot open display: VALUE
indicate that the VALUE logical display cannot be accessed ...
This is due to the fact that VALUE is the wrong name. In some cases VALUE is empty.
To solve this problem just discover the VALUE in the Xorg process parameters by analyzing the output of this command:
$ ps x | grep -i Xorg
The value of display is the one that begins with colon character (usually :0 equivalent to :0.0). Once identified the display which we assume to be :0.0 proceed with the setting of the DISPLAY environment variable so:
$ export DISPLAY=":0.0"
If it want to make it permanent, I suggest to include this export statement in /home/USER/.bashrc or /etc/profile system files.
Can't open display and
cannot connect to X server errors can be solved in the same manner as the article's subject
 It could also be caused by the unavailability of specific programs invoked by other applications
 It assumes the process name is Xorg, but it could also be X or something else. If so then suitably grep