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 |
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) |
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 |
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). :rolleyes: 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 :p ..best regards to germany too :) |
All times are GMT -5. The time now is 09:37 PM. |