Bernhard Fruhmesser wrote: > Hmm, so if i have a X session running on my machine and i start let's > say an xterm and then i ssh to your machine from this xterm i could > startx X applications on your machine which will show up on my screen? > Or can i use this program called "xeyes" to start your WM within my > xterm?? Right. Some simple X things. First off, doing things locally. As in, you're sitting in front of your computer, and how to start an application on the screen. This may seem like a really silly exercise, but stick with me, OK? Open up an xterm [X must be running on your machine for any of this to work]. Bring up a list of environment variables that are currently set. If you're using bash, your best bet is just to type "export" and push return. If you're not using bash, you can work this out on your own. If you look down the list, you'll see an environment variable called "DISPLAY", set to be ":0". Fair enough. Start a random X application. [Throughout this, I sill use the word "xeyes" where I mean "random X application", but it's up to you what you mess with, OK?] Nothing you've never done before, right? Now go to a VT console [or dumb terminal if you've got one, or whatver], probably by pushing ctrl+alt+F2 or similar, and run xeyes. You'll notice that it says "Error: Can't open display: ". OK, then. So set the DISPLAY environment variable in that terminal to be the same as it was in your xterm [:0], and try running xeyes again... then switch back to X [ctrl+alt+F7, probably]. And xeyes is there. Simple. For reference, you may like to try setting the env. variable DISPLAY to something like ":2" and trying to explain what it told you. OK, time for some definitions: the X "server" is what gets run when you "startx". It's the thing that actually displays stuff on your screen. the X "client" is the application that's talking to the server. In my case, it's xeyes. This may seem counter-intuitive to you [it did to me]. Get over it. Next, let's do this badly, from another host. Get onto that other host, by whatever method you please. If you're using ssh, don't run xeyes yet, because that'll probably be doing some voodoo that you don't know about [yet]. In your shell on that host, set the environment variable DISPLAY to be hostname:0 where hostname is the name of the box you're coming from, that is running an X server. _now_ run xeyes. Unless there are very bad things going on, it should tell you that Xlib: connection to ":0.0" refused by server Xlib: Client is not authorized to connect to Server Error: Can't open display: :0 Which is good. Imagine if anyone at all could just start random applications running on your screen at any time... On the machine running the X server you're trying to connect to, run the command "xhost +" This is, again, stupid and dangerous, but we'll get there. Now run xeyes on the foreign machine again. OK. Let's clear some things up, here. X traffic is getting sent over the network, /en clair/, for anyone to read. This is just as bad as using telnet, nowadays. Just don't do it. X Apps always check the DISPLAY environment variable to see where they should connect to. The DISPLAY environment variable is of the form: DISPLAY=host:display.screen If all you're doing is running an X server on your local machine, and want to connect to it locally, you only need it to be ":display". It's always been ":0" so far because you only run one X server. If you're running more than one, you can probably work this all out yourself. An extended variant on the above for connceting to your local machine would be DISPLAY=127.0.0.1:0.0 Almost all random X apps also take the command-line option "-display" which works in exactly the same way. The screen part is for if you've got more than one screen... but you'll probably find that running X apps with "-geometry" to be more useful, anyways. If you want to know more about that, RTFM for xeyes or similar, and look at the output from "xwininfo" when you click on a random window. "xhost +" allows anyone, anywhere, to connect to your X server. Which is bad. You should obviously RTFM, but if, say, you only want other people on your machine to connect to it [from that machine], you could "xhost +localhost" to just allow connections from your localhost. Once a connection is made, you can run "xhost -" and disallow any more connections; the connection already made will still be running. OK. So all that's bad. How can we do it securely? Try connecting to the foreign machine using ssh. If you're using a version of ssh like me: gjb105@chunky:~$ ssh -V OpenSSH_3.0.1p1, SSH protocols 1.5/2.0, OpenSSL 0x0090602f Then you probably want to use options like ssh -X -C foreign-host The -X is probably the default, and the -C is for compression. Which is worth it, trust me. The usual RTFM applies. OK. Now on the foreign host, check your DISPLAY variable; it'll probably be set to something like ":10". That means that your sshd on the foreign host is pretending to be an X server [the 11th one on that machine], and forwarding all the information back to your real X server [that's not 100% how it's working, but that's close enough, OK?] Anyways. You should now just be able to start xeyes on the foreign machine and have it appear on your machine. Note: if you're using ssh, you don't need to run xhost... which is good. If the DISPLAY environment variable isn't set, then the server probably is set not to forward X connections. You need to edit the sshd_config to include something like: X11Forwarding yes X11DisplayOffset 10 Uh... not sure what else to say, really. It should be noted that yes, openGL stuff sometimes works, too, but that's a whole nother can of worms you're opening. Descent 3 works. Sproingies works. The odds on UT working are limited. You work it out. Hope all this helps, Gary (-;