Cause a window to pop-up on a machine remotely


 
Thread Tools Search this Thread
Operating Systems Solaris Cause a window to pop-up on a machine remotely
# 1  
Old 04-05-2011
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.
# 2  
Old 04-05-2011
Just start up a vncserver, and set your DISPLAY envval to refer to the vncserver display.
# 3  
Old 04-05-2011
This should display the xclock program on the machine's console display.
Code:
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:
Code:
Xvfb :1 -dev vfb screen 300x300x8
Xvfb -help

# 4  
Old 04-07-2011
Fixed!! Sorta

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.Smilie

Thanks for your replies.
# 5  
Old 04-07-2011
Hmm, odd timing. This popped up just as I came on.

csh uses a different syntax for setting environment variables.
Code:
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).
# 6  
Old 04-07-2011
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

how to execute shell script present in unix machine remotely from windows

how to execute shell script present in unix machine remotely from windows? I having a shell script in my unix machine, need to execute the script remotely from my windows machine using Visual Basic or VBA macros. Thanks In Advance. --Suresh (1 Reply)
Discussion started by: sureshmani
1 Replies

2. Shell Programming and Scripting

Remotely setting putty window title

I have successfully used a script to modify putty's window title for many years. It has worked great in a Solaris 10 environment, using, sh, bash and tcsh. But I've never been able to get it to work in linux :( The script relies on sending escape sequences via gnu echo. The version of echo on... (4 Replies)
Discussion started by: tsreyb
4 Replies

3. Web Development

Attaching " Thank You " pop-up window in php form mail code

Dear Sir, I have got a php mail form code. Using this code, I want to use the JavaScript for " Thank You " pop-up window in the php form mail code. Where do I add the pop-up JavaScript for "thank you" ? My code is as follows: <?php //--------------------------Set these... (1 Reply)
Discussion started by: swapan
1 Replies

4. UNIX Desktop Questions & Answers

Make window pop up in original desktop

Hello, Is there a way to force each window to popup in the original desktop when using multiple desktops? The problem is I work on one desktop, then move to another one, and some windows that are loaded in the original desktop pops at the new desktop. Any idea? Thanks! Guy (1 Reply)
Discussion started by: guyov1
1 Replies

5. Solaris

Pop-up window using X11

Anyone know of a way to create a pop-up window using X11? I'm not to sure where to start. I just think it would be neat to do. So I was hoping someone out there had documentation on how to go about this, or if I was going to have to write/compile a program to do so. Thank you! Adelsin (8 Replies)
Discussion started by: adelsin
8 Replies

6. UNIX for Dummies Questions & Answers

How to connect remotely to a unix machine

Hello, I am connecting on a machine equiped with Unix, via SSH Secure Shell. On this machine I am running a script and I would like this script to be able to connect to another (Unix) machine to run a different process. In other words: when I am connected on a machine, how can I execute a... (1 Reply)
Discussion started by: jolecanard
1 Replies

7. Solaris

Pop up Window Properties

Hi, I have been tasked to migrate a test package my company developed from a Solaris 4 O/S to a new machine running Solaris 8. After many tweaks to paths etc we finally got it running but we have one problem which I am unable to solve. While the application is running a user selected menu... (0 Replies)
Discussion started by: JustinPyfrom
0 Replies

8. UNIX for Dummies Questions & Answers

Compare 2 files and output result in pop up window

Need help ! how do i compare 2 files and if there is a difference, output a massage in a pop up window? the script meant to run using crontab. (2 Replies)
Discussion started by: hongsh
2 Replies

9. UNIX for Dummies Questions & Answers

runnig script from window machine

i want to run a script from window machine the script is ksh for i in $(cat some.txt) do rm $i done exit i have it saved as a file say progremove & made it chmod 7777 how do i run this script from a window machine vie a batch file telnet -l username servername then what... (2 Replies)
Discussion started by: sjumma
2 Replies

10. Shell Programming and Scripting

how to remotely administer/validate UNIX server via Windows machine?

Hi there--I think this is more of a Windows question, but I think many of you might be able to help me out: I have a UNIX web server and a Windows machine. I'm trying to script the following tasks so that they can be run from the Windows machine (via a batch file): 1. Shutdown web services... (5 Replies)
Discussion started by: sohungry73
5 Replies
Login or Register to Ask a Question