DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Fix GUI App Start Failure With No Display Found


When running gitg in Ubuntu terminal, I got errors below:

(gitg:29283): WARNING : Could not open X display

(gitg:29283): Gtk-WARNING **: cannot open display: localhost:10.0

Solution: check you $DISPLAY value, if it's not ":0.0", run export DISPLAY=:0.0.

Ref: http://askubuntu.com/questions/438451/could-not-open-display-null-error-how-can-i-fix-this

To test keycode of the same key in different OS, I ssh to my Linux laptop with Kitty on Windows. When I run xev, I got an error: xev: unable to open display ''.

Open GUI of Remote Server on Client's Screen

I ssh to a my Ubuntu laptop with ssh -X -v user@192.168.1.4 or ssh -Y -v user@192.168.1.4 and run DISPLAY=:0.0 gedit, the gedit window opens on the screen of the laptop.

The reason is in the output of who:

$ who
leo      :0           2018-01-15 07:19 (:0)
leo      pts/8        2018-01-15 07:20 (:0)
leo      pts/1        2018-01-15 07:53 (192.168.1.14)

You can see the display (:0) attached to pts/8. While there's no display attached to the remotely connected client pts/1.

There's an environment variable XAUTHORITY to be set as well.



Published

Oct 25, 2015

Last Updated

Jan 15, 2018

Category

Tech

Tags

  • display 1
  • gui 9
  • linux 158

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor