Cause a window to pop-up on a machine remotely

While a search of the forums reveals a great deal of help for some one who wants to run a program on their Solaris box and have it display on their workstation I have a slightly different problem. I want to login via SSH and start a program that will display on the console of the machine I just connected to.

Reason is I need to automatically run a program that requires an X display. I want to just have it display on the local machine. Once this works the software should run and then shutdown automatically.

I suspect I will need to circumvent some security settings to make this work but that's OK since I'm on a private network with no external connections.

Any thoughts? Thanks.

Just start up a vncserver, and set your DISPLAY envval to refer to the vncserver display.

This should display the xclock program on the machine's console display.

ssh webserver
[nevyn@webserver ~] export DISPLAY=webserver:0
[nevyn@webserver ~] xclock

You may need to use the xhost command on the console to allow the access.

As achenle suggested, you may want to start your own X display for a cleaner design.

You probably have Xvfb installed. It can serve as a simple drop point for unwanted graphic output.

It's been a while since I've done it but something like this:

Xvfb :1 -dev vfb screen 300x300x8
Xvfb -help

I got it to work but the "solution" was not glamorous and I'm not sure why I had to do it. The solution was to write a BASH shell script as a wrapper to call the application. The BASH script has two lines. One to set the display and the other to call my app.

export DISPLAY=localhost:0.0
start auto

The user that I'm running all of this as normally gets a CSH when it logs in but for some reason on BASH would let me change the display variable.

They really funny thing is that "start" (see above) is actually a CSH shell script.:confused:

Thanks for your replies.

Hmm, odd timing. This popped up just as I came on.

csh uses a different syntax for setting environment variables.

setenv DISPLAY localhost:0.0

The reason it works the way you did it? Because the child process ("start") inherits the environment exported from the parent (your bash script).

Yea, I know. I tried that in csh and it didn't work. I should clarify. It didn't work when sending remote commands via ssh. It worked with an interactive ssh session.