views:

112

answers:

4

Hi

I have a shell script on a Unix box which when executed sets the DISPLAY variable dynamicaly to the clients ip address and if the client has some sort of x windows up and running then it launches say a program ike xcalc.

I would want the shell script to launch the x windows say like exceed session on the winodws client when the shell script is executed is this possible if so how ?

regards Edwards

A: 

This might be something worth asking on ServerFault too, since it's somewhat of a gray area between programming and system administration.

byte
A: 

Are clients logged in via a shell to the server? Rather than setting the DISPLAY variable to their IP address, I highly recommend using SSH and some sort of client (openssh on Linux, PuTTY on Windows) that will automagically set the DISPLAY variable when you login.

The procedure would look like this:

  • Start an X server the client (eXceed, Xorg, etc)
  • Use PuTTY/SSH to login to the server with X11 forwarding turned on (-X for openssh, Connection | SSH | X11 for PuTTY)
  • Start the X11 program

The nice thing about this setup is that it's easy to tell if the client has an X server running - the DISPLAY variable will be set if so, but unset if not.

You say that you want to start a session on the Windows client when they login - do you want to see, for example, a login similar to what you would see if you were at the machine? In that case, you might want to use XDMCP.

MikeyB
A: 

Hi

Is there a way to automatically start the X server on the client from the server ?

regards edwards

In short, no. There isn't. (Not unless you program a server/client system for doing just this :-)
nos
Just start it automatically on login to the desktop
MikeyB
+1  A: 

Heya Edwards.

The general answer to that is "no, not unless you explicitly enable it."

Think about this in a general sense. Your questions is "Is my PC security so weak that external computers can connect in start programs on it, without a password or certificate?"

Clearly this effectively would mean that your PC had zero security. So for your sake, I sincerely hope that the answer to your question is "No".

If in your case the answer is "Yes", then perhaps it's time to abandon Windows 98?

+1 just for the win98 reference, thanks :-)
Tanktalus