LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-07-2003, 04:04 PM   #1
frankieboy
LQ Newbie
 
Registered: Aug 2003
Location: Germany/Hessen/Kassel
Distribution: RedHat 9.0A
Posts: 11

Rep: Reputation: 0
Question Executing X-Programs remotely


Hello Forum,

my router (RH9) manages the internetconnection via ISDN with DialOnDemand.

Now I want to display the status of the connection with xisdnload on my client. I think that I can start it on the router with
xisdnload -display IP.of.the.client:0.0
But unfortunately I get the message: display not found.

If I connect to the router with ssh and then type xisdnload, this program is displayed on the screen of the client. But I want to integrate the neccassary call into a startup-script of the router.

Google only shows solutions for a remote login and a complete redirection of the X-server, but not for a easy and simple executing of programs remotely.

Many thanks for your help

Frank Becker
 
Old 10-07-2003, 05:04 PM   #2
yapp
Member
 
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
Try to use 'ssh' with X11 forwarding the information will be encrypted before it's transmitted over the network, and doesn't require another connection either.

set these values in /etc/ssh/sshd_config:
X11Forwarding yes
X11UseLocalhost yes

then update your sshd process, you could even run this command from an ssh session!
killall -HUP sshd

Then, connect to the server with "ssh -X you@hostname", and start an X program. Don't configure your client to enable X forwarding automatically (in /etc/ssh/ssh_config), because you expose your display to the server.


If you want to redirect programs to another display, this could work as well: export DISPLAY=hostname:0.0 omit the hostname if you redirect to another display at the same machine (for example another X, or Xvnc)

Last edited by yapp; 10-07-2003 at 05:06 PM.
 
Old 10-07-2003, 05:25 PM   #3
frankieboy
LQ Newbie
 
Registered: Aug 2003
Location: Germany/Hessen/Kassel
Distribution: RedHat 9.0A
Posts: 11

Original Poster
Rep: Reputation: 0
Hello yapp,

thank you for the fast reply.

Exactly this: export DISPLAY=hostname:0.0 is what I wanted and what I tried. But if I then start any X-Application like xeyes (with no params) the box tells:Xlib: connection to "hostname:0.0" refused by server
Xlib: No protocol specified
Error: Can't open display: hostname:0.0


I also tried xon hostname xeyes like described in the manpage of X but without success.

Your solution with ssh needs to implement certificates for automate login. That is too much work for a small job.

Best regards to the Netherlands.

Frank

Last edited by frankieboy; 10-07-2003 at 05:30 PM.
 
Old 10-08-2003, 02:31 AM   #4
yapp
Member
 
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
It seams that the "connection is refused" by the server. Use 'xauth' to authorize a user/machine to your display.

This is a security percausion, since you authorize someone to display popups at your screen, but also create a screenshot, or place a hook in your display (monitor keystrokes). X applications communicate with each other; for example, when you copy-paste text. (using the 'select text' + 'middle mouse' button trick) ..there is a 'sandbox' program to prevent this, but it causes much problems of your apps try to communicate.

If you want a secure connection, just use ssh+X11 forwarding, but I could understand this is a little much effort if you want to display a simple server-status program


..best regards to germany too

Last edited by yapp; 10-08-2003 at 02:35 AM.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
keep running x programs remotely kichukov Linux - Software 16 10-23-2005 11:52 AM
can't run X programs remotely mcshen Linux - General 2 07-28-2005 07:47 PM
executing programs?!? cmargiol Linux - General 8 10-29-2003 02:38 PM
executing programs with arguments ? shaneblyth Mandriva 10 09-27-2003 08:01 PM
Executing Perl Programs 1huskerfan Programming 3 01-06-2002 07:39 PM


All times are GMT -5. The time now is 12:21 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration