Hello Karel: I constantly use my SuSE File,print,fax... server remotetly. I seem to be using a simpler method than you do so I'll explain my method. Additionally, I've never used Xnest, and thought it was for something totally diferent. So here a question on the list: What is XNest and what do you use it for? Now to help Karel... First a little theory, about XWindows and how it works. XWindows is a system that lets programs "Draw" on your display (screen). To do this, programs use special routines to execute the drawing commands. This is just like any other "Windows" system. Where XWindows differs from most (maybe all?) windowing systems is that the program which issues the drawing commands may be on a diferent machine than the actual display being drawn on. Sounds complicated, but it's not. In XWindows you can share your display with other machines. When you do so, programs running on other machines draw on your display. That's all. (A-Side: Here most people go into the naming of the XWindows componenets, but I don't see a reason to, so I won't!) Now, when you start a XWindows program (a program that call XWindows drawing commands), it needs a way to know on to which display to draw. Most programs let the XWindows Library (commands) decide for themselves. The XWindows library needs a method to know which display you want it to draw on! This can be done by setting an environment variable called... (You guesed it!) "DISPLAY". The value you can set the "DISPLAY" environment variable to formatted as follows: "export DISPLAY=<host>:<display-no>.<screen-no>" where: <host> is the tcp-name/number of the computer with the display! <display-no> is the number of the display (on <host>). <screen-no> is the number of the screen (of the display, on host)... So we see, that not only can you draw on a diferent host, but that each host can have more than one display? A Display usually corresponds to XWindows instance but does not need to. The way to get a new display number is to start a new instance of XWindows. This can be done by starting a second XWindows on terminal 8 (<CTRL>-<ALT>-<F8>), or starting a program like VNC which creates a "Virtual Display". As you've already noticed I add all kinds of extraneous info into what would really be a simple answer, but I'll skip Starting new instances of XWindows, for the sake of.... Well, geting to an end here someday! But.... On your linux box you could have 2 people physically working on the machine at the same time. You would need to drop in an old graphic card, and plugin a USB keyboard/mouse. Once correctly configured a second instance of XWindows would use the additional graphics-card, keyboard/mouse. Then you would have one machine serving 2 people working on thier own graphical interfaces.... Sorry... sidetracked again! Back to my original... sidetracK! Okay, so now you see what <host> and <display-no> are in "<host>:<display-no>.<screen-no>", but what is <screen-no>? Well, in 15 years experience working on/with XWindows I've never seen any other value than "0" used. So my advice to you?.... Yep, you guessed again... Always use "0". So now we've seen the power hiding behind XWindows... And as you've guessed you can do lots of nifty things, like in a shell, setting the "DISPLAY" variable to your bosses computer, and then starting a jpeg viewer, with the picture "Playmate_October_2003.jpg" right before the Company Big Bosses walk in! That'll get him fired (or her, we don't want to be male chauvanists here). Now we see the first complication. Permisions. Fortunatetly for bosses all over the world, you need to give someone permision before they can draw something on your screen. This is done with "xhost +". This needs to be executed in a shell, in the XWindows instance which is giving EVERYONE ANYWHERE permision to do ANYTHING! (Bosses beware!) For more infomation on XWindows permisions see "man xhost". So thats the theory! Thank you for reading this far! Now to the actuall answer. To start the program xclock on machine "server", using the display on machine "work" you could: 1) execute "xhost +" (allow connects on my display) 2) execute "telnet server" (connect to remote machine) 3) login on server 4) execute "export DISPLAY=work:0.0" (display to use, assuming "0") 5) execute "/usr/X11R6/bin/xclock" (exec xclock, use remote disp.) But the designers of SSH, forsaw the usage of SSH to remote execute xwindows programs so the following will work just as well: 1) "ssh -X <user>@server /usr/X11R6/bin/xclock" The ssh version has the advantage that all the information sent back and forth between the program and the display are encrypted! (Complication number 2!) You will also notice that you do not need to start anything on the remote machine to get the display back on your machine! Jerry On Mon, 2004-04-12 at 19:01, Karel De Vriendt wrote:
I have two SuSE machines (and a couple of Windows machines).
One of the SuSE machines is connection to my network but has no keyboard and monitor attached to it. I want to use it as a fileserver (Samba) and will do the administration from my second SuSE machine.
I can open a connection to the rempote machine (remote) via
ssh -X login@remote
And then I startup a graphical session in which I will do all my work via
Xnest -name "remote" -query remote :1 & export DISPLAY=remote:1
And this works fine. I am not an expert, nor in ssh, nor in X but after reading through a number of postings on the web, that is how I got things to work.
Some questions:
- Closing the graphical session (via closing the window, I do not know another method) seems not always to stop the Xserver started with Xnest. Rebooting fileserver cures things but there must be a better way.
- The graphical session (connected to an Xserver session on remote) uses a standard (US) keyboard but both SuSE machines have been configured to work with a Belgian (azerty) keyboard. How do I indicate that I want to use a Belgian keyboard (extra parameter with Xnest command?).
- Some postings on the Internet say that all this DISPLAY stuff is not needed (and is even dangerous as this would make the connection not to use the secure ssh tunnel). But without, nothing works.
All good advise would be welcome.
Karel De Vriendt