local X server, remote application
I don't know what exactly am I missing here, but I am pretty sure I am doing something wrong.
OK so I have two Linux computers (A and B) that are networked through the router and I want to be able to run X server on one of them with application from the other one. So, local Xserver, remote application. This is what I do: 1. On A: xhost +B 2. On A: ssh -X A (type in login and password) 3. On B, logged from A: export DISPLAY="A:0.0" 4. On B, logged from A: startx When I do this, my Xwindows actually open on B, the remote computer. What am I doing wrong? |
So, if I understand what you want to do, you want to be able to do this:
You are sitting in front of A, you want to log onto B with SSH. Then you want to run a program on B via SSH and see the window in front of you on A? If that's the case you need to do this: * Make sure the SSH server running on B has X11 forwarding enabled. Check the "/etc/ssh/sshd_config" file for this option. (If you had to enable the option, you need to reastart the SSH server (or reboot)) * On A, run "> ssh -X B", login and password. You should now be logged into B. * Type the name of the program you want to run on B and see on A. For example: "> firefox". This may be a bit slow depending on your network, etc, but you should see the window for your program pop up. I do this sort of thing on a daily basis, and I never have to mess with any DISPLAY variables or anything. I would think something was set up really strange if you needed to. You also shouldn't need to mess with the "xhost" command at all. The reason the startx command isn't doing what you want is because the startx command starts an X server. An X server is what communicates with the graphics hardware to draw to the screen. So, if you run startx on B, no matter how you set up your DISPLAY variable, the startx command on B will always draw to B's screen. There is another method to remotely display windows on other X servers, but it is a little more complicated, and not encrypted at all. Because you are using SSH, you can skip the whole mess and just use SSH's X11 forwarding feature. Does that help? |
To activate X forwarding on the client:
Code:
echo "ForwardX11 yes" >> ~/.ssh/config Check the file /etc/ssh/sshd_config for a line reading similar to the above, and verify that it has the setting you want. Then to log in and use remote applications: Code:
ssh hostname Regards, Alunduil |
Thanks for replies. This is what I did
On remote computer, B, I put in /etc/ssh/sshd_config file a line: Code:
X11forwarding yes Code:
ForwardX11 yes Code:
twm Code:
twm: can't open display "" |
Quote:
|
thanks guys i got it to work.
|
Check out this article.
Running remote Xwindows Apps |
All times are GMT -5. The time now is 09:09 AM. |