LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 01-27-2006, 01:37 PM   #1
ZiGiE
Member
 
Registered: Oct 2003
Location: ex USSR, Canada
Posts: 58

Rep: Reputation: 15
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
and have it started and open its window on the screen of the remote machine.

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.
 
Old 01-27-2006, 01:47 PM   #2
Jelle
Member
 
Registered: Feb 2004
Location: Utrecht, The Netherlands
Distribution: Debian
Posts: 79

Rep: Reputation: 15
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.
 
Old 01-27-2006, 01:50 PM   #3
ZiGiE
Member
 
Registered: Oct 2003
Location: ex USSR, Canada
Posts: 58

Original Poster
Rep: Reputation: 15
Quote:
make sure you have acces to the remote display.
How do I do that?

Thanks for the prompt response...
 
Old 01-27-2006, 01:52 PM   #4
dbogdan
Member
 
Registered: Feb 2005
Location: Metro Detroit, US
Distribution: Suse/Slackware/Mepis
Posts: 174

Rep: Reputation: 31
export DISPLAY=:0
 
Old 01-27-2006, 01:53 PM   #5
ZiGiE
Member
 
Registered: Oct 2003
Location: ex USSR, Canada
Posts: 58

Original Poster
Rep: Reputation: 15
No, how do I make sure I have access to remote display. Not "how I set environment variable".
 
Old 01-27-2006, 01:55 PM   #6
Jelle
Member
 
Registered: Feb 2004
Location: Utrecht, The Netherlands
Distribution: Debian
Posts: 79

Rep: Reputation: 15
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.
 
Old 01-27-2006, 02:05 PM   #7
ZiGiE
Member
 
Registered: Oct 2003
Location: ex USSR, Canada
Posts: 58

Original Poster
Rep: Reputation: 15
Sweet! It works! After I set the DISPLAY value to :0.
Quote:
export DISPLAY=:0.
I ran xhost and it gave me a ddifferent result this time:
Quote:
access control enabled, only authorized clients can connect
instead of original:
Quote:
xhost: unable to open display ""
or:
Quote:
xhost: unable to open display "localhost:0.0"
(before I tried to set my DISPLAY to "localhost:0.0", obviously that didn't work). So now I can execute remote GUI application and it opens up on remote screen. Thanks for help!
 
Old 01-27-2006, 04:31 PM   #8
ZiGiE
Member
 
Registered: Oct 2003
Location: ex USSR, Canada
Posts: 58

Original Poster
Rep: Reputation: 15
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:
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
Looks like I need advice from X experts.
 
Old 01-27-2006, 05:50 PM   #9
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
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
 
Old 01-27-2006, 10:53 PM   #10
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
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.
 
Old 01-28-2006, 01:02 PM   #11
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
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

Last edited by Brian1; 01-28-2006 at 01:11 PM.
 
Old 01-28-2006, 01:37 PM   #12
Jelle
Member
 
Registered: Feb 2004
Location: Utrecht, The Netherlands
Distribution: Debian
Posts: 79

Rep: Reputation: 15
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.
 
Old 01-30-2006, 02:31 PM   #13
ZiGiE
Member
 
Registered: Oct 2003
Location: ex USSR, Canada
Posts: 58

Original Poster
Rep: Reputation: 15
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
This might be an option. Not a prefered one, but if nothing else works, I guess I will have to try doing that.

Quote:
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.
Please read from the beginning of the post carefuly before replying.

Quote:
It is confusing not knowing exactly what ./runapp.sh is doing.
Just a script that starts a server Java app. Application uses GUI so, unfortunately, I'm forced to run X or have to rewrite the app.

Quote:
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.
That what I'm thinking too. Unfortunately my knowledge of X is close to 0. The Linux server doesn't run KDE or Gnome, we're trying to keep it as light as possible. I was already forced to install X just for this app. What we're running right now is XDM and FVWM. Can anyone help me configure this machine so it can autologin with some user account at boot, have the GUI running and then autostart the app.

Man, what an cumbersome way of doing things... but what else am I going to do?
 
Old 01-30-2006, 06:35 PM   #14
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
An app for remote system admin via email? celejar Linux - Software 2 01-04-2006 03:05 PM
GUI database app? johnMG Linux - Software 3 04-13-2005 04:29 PM
Remote App and Desktop Access Chazz_CA Linux - Software 3 03-12-2004 01:40 PM
remote app launcher Kocil Linux - Software 0 09-08-2003 03:45 AM
gui database app macewan Linux - Software 13 02-24-2003 03:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 11:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration