How to start remote GUI app?
I'm trying to start a GUI application on remote server. My goal is to be able to open SSH client, run the startup script, like so
Code:
./runapp.sh I would really like not to use VNC or transfer X session to my local machine. I don't need to see the window on my local machine - just need to start the app. I do, however, want the application window to be visible on the screen of the remote machine. Is the any way to do what I'm trying to achieve? I'm running SLES 9 on the remote server with XDM and FVWM. Sorry, if this question has been answered before. I've been looking for info on this for some time with no success. |
make sure you have acces to the remote display. Make sure that ssh is not doing X-forwarding (read manpage) and set your display manually to :0. that should put the app on the first display on the remote host.
|
Quote:
Thanks for the prompt response... |
export DISPLAY=:0
|
No, how do I make sure I have access to remote display. Not "how I set environment variable".
|
First try it out. If you don't get permission i believe you can fix that with xhost, but read the manpage for that too.
|
Sweet! It works! After I set the DISPLAY value to :0.
Quote:
Quote:
Quote:
Quote:
|
Argh...
Now I know why I was having trouble getting results before. This works only if I have already logged in through X. So if I have an X session open on the remote computer, i.e. I have manually logged in using graphical interface. If I restart remote server and don't login using graphical prompt, I cannot start the application remotely, get the following error: Quote:
|
To me it seems you need to run vncserver and set it to display 1 or 2. That way that gui as that user is already up. Then do the same as above except point to display 2
Just a thought. Brian1 |
You shouldn't do any DISPLAY or xhost stuff or anything, just do "ssh -Y ..." when you connect using ssh and it will forward X for you.
|
Yes using the ssh -Y is great but I think he need to start a gui type app on the remote machine and it needs to remain on the remote machine. It is confusing not knowing exactly what ./runapp.sh is doing. The more I think about it unless the gui is running then the app will never start. Even if a vncserver on display 2 is created then the app starts on display 2. It can be sent to display 0 but once again the gui on display 0 needs to be running. Only way out I see is to setup the login manager to autologin with a default user account. Then if rstarted it will auto login and start the gui session. My thoughts are related to KDE and Gnome. More simplier guis like icevm or twm might be able be started but again that will be on display 0 and if you really what KDE or Gnome it will need to be started to display1 and so on.
Better stop there I keep running into a block wall. Brian1 |
true he wanted to program to show up on the remote host, so DISPLAY and xhost is appropriate if he is not the user running the desktop.
But even when [xkg]dm is waiting for a login, the X-server is already running. I suppose with the right xhost stuff, you could make it display a program other than xdm. |
Quote:
Quote:
Quote:
Quote:
Man, what an cumbersome way of doing things... but what else am I going to do? |
Check out this link to setup auto login and setting to startx to start the gui. Haven't used FVWM much. http://www.linuxgazette.com/issue72/chung.html
Brian1 |
All times are GMT -5. The time now is 02:08 PM. |