| Suse/Novell This Forum is for the discussion of Suse Linux. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-27-2006, 01:37 PM
|
#1
|
|
Member
Registered: Oct 2003
Location: ex USSR, Canada
Posts: 58
Rep:
|
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 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.
|
|
|
|
01-27-2006, 01:47 PM
|
#2
|
|
Member
Registered: Feb 2004
Location: Utrecht, The Netherlands
Distribution: Debian
Posts: 79
Rep:
|
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.
|
|
|
|
01-27-2006, 01:50 PM
|
#3
|
|
Member
Registered: Oct 2003
Location: ex USSR, Canada
Posts: 58
Original Poster
Rep:
|
Quote:
|
make sure you have acces to the remote display.
|
How do I do that?
Thanks for the prompt response...
|
|
|
|
01-27-2006, 01:52 PM
|
#4
|
|
Member
Registered: Feb 2005
Location: Metro Detroit, US
Distribution: Suse/Slackware/Mepis
Posts: 174
Rep:
|
export DISPLAY=:0
|
|
|
|
01-27-2006, 01:53 PM
|
#5
|
|
Member
Registered: Oct 2003
Location: ex USSR, Canada
Posts: 58
Original Poster
Rep:
|
No, how do I make sure I have access to remote display. Not "how I set environment variable".
|
|
|
|
01-27-2006, 01:55 PM
|
#6
|
|
Member
Registered: Feb 2004
Location: Utrecht, The Netherlands
Distribution: Debian
Posts: 79
Rep:
|
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.
|
|
|
|
01-27-2006, 02:05 PM
|
#7
|
|
Member
Registered: Oct 2003
Location: ex USSR, Canada
Posts: 58
Original Poster
Rep:
|
Sweet! It works! After I set the DISPLAY value to :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!
|
|
|
|
01-27-2006, 04:31 PM
|
#8
|
|
Member
Registered: Oct 2003
Location: ex USSR, Canada
Posts: 58
Original Poster
Rep:
|
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.
|
|
|
|
01-27-2006, 05:50 PM
|
#9
|
|
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,697
Rep:
|
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
|
|
|
|
01-27-2006, 10:53 PM
|
#10
|
|
Senior Member
Registered: Aug 2005
Posts: 1,755
Rep:
|
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.
|
|
|
|
01-28-2006, 01:02 PM
|
#11
|
|
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,697
Rep:
|
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.
|
|
|
|
01-28-2006, 01:37 PM
|
#12
|
|
Member
Registered: Feb 2004
Location: Utrecht, The Netherlands
Distribution: Debian
Posts: 79
Rep:
|
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.
|
|
|
|
01-30-2006, 02:31 PM
|
#13
|
|
Member
Registered: Oct 2003
Location: ex USSR, Canada
Posts: 58
Original Poster
Rep:
|
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?
|
|
|
|
01-30-2006, 06:35 PM
|
#14
|
|
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,697
Rep:
|
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
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:44 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|