Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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?
Last edited by frankie_DJ; 03-16-2006 at 11:41 PM.
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.