I am trying to invoke the tool on Centos server from the Ubantu terminal.I am getting the following error.
Tk initialization failed: no display name and no $DISPLAY environment variable.
Please Help me with this.Thanks in advance.
I am trying to invoke the tool on Centos server from the Ubantu terminal.I am getting the following error.
Tk initialization failed: no display name and no $DISPLAY environment variable.
Please Help me with this.Thanks in advance.
 
    
    Connect to your CentOS machine with ssh -Y which (per man ssh)
Enables trusted X11 forwarding. Trusted X11 forwardings are not subjected to the X11 SECURITY extension controls.
That will allow your Tk process to connect to X11 on your Ubuntu machine.
 
    
    I work on Ubuntu. I had the same problem while using gitk on remote machines. So I tried following
ssh <username>@ip and ran gitk& got the "no display name and no $DISPLAY environment variable." error
ssh -X <username>@ip and ran gitk& it worked!
ssh -Y <username>@ip and ran gitk& it worked!
Thanks for the solution by Elliott Frisch.
 
    
     
    
    I was having same issue using gitk on a new local machine with Ubuntu 21.04 and this solved my problem
export DISPLAY=:0
