0

I got a program which must run in GTK gui environment. I can only use ssh. This program will run on a server(centos 6) and installed gnome X display.

It's no need to see GUI, but after it run finished, i can get the answer.

VNC and Remote screen is disable.

When i start the program in ssh:

Gtk-WARNING **: cannot open display:

Is there any ways to salve this problem??? I known it's bad to run a gui program in this situation, but here we only discuss technology...

Thank you...

1
  • This is not really a programming question. Commented Sep 23, 2014 at 11:16

1 Answer 1

4

The ssh utility has an option -X which enables X11 forwarding.

Have you tried to connect to your destination like that ?

Or the other option is to perform the export DISPLAY=:0.0 after you log-in to your host, then run your app.

This way you'll save some network traffic, will run your app remotely, but the GUI will be displayed on the screen of the remote host.

P.S. Generally speaking your application logic might be invalid if it fails to run GUI. Are you sure that your application will do the expected stuff when it fails to run the GUI ?

Sign up to request clarification or add additional context in comments.

2 Comments

when I run export DISPLAY=:0.0 I keep on getting an error. It changes from "(.:18048): Gtk-WARNING **: cannot open display:" to "(.:19674): Gtk-WARNING **: cannot open display: :0.0". Does anyone have a solution for that?
Thank you @deimus. The display=:0.0 has solved my problem with ssh'ing into jetson nano with my laptop.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.