Now, I just use ssh, make sure that X11Forwarding is set to yes on the server (sshd_config), and then I can just ssh to the machine, let X commands go across the wire encrypted, and it'll always go back to the right place. I also had to make sure that no one did anything silly like reset DISPLAY if it was already set. Since $DISPLAY was being evaluated locally (where it's set properly), and not being passed literally across rsh, the display would always be set correctly. But, if you don't face these limitations, you can implement the idea in ksh or bash, I think.Īnyway, I would basically run 'rsh $machine -l $user "$cmd"' where $machine, of course, was the machine I was logging in to, $user, similarly obvious (though when I was going in as "root" this had some variance as we have multiple roots on some machines for reasons I don't fully understand), and $cmd was basically "DISPLAY=$DISPLAY xterm", though if I were launching konsole, for example, $cmd would be "konsole -display=$DISPLAY". Korn shell wasn't much of an option, either, since most of our Linux boxes don't have pdksh installed. Bourne shell wasn't sufficient, and we don't have bash on Sun or HP machines (and didn't have bash on AIX at the time - AIX 5L wasn't out yet). Using rsh, I put together a table of machines vs OS vs custom options which would guide this process in perl. Example of values localhost:4 :0 :0.0 hostname:D.S means screen S on display D of host hostname the X server for this display is listening at TCP port 6000+D. Usually there's only one screen though where 0 is the default. Since then, most of our servers have had ssh installed, which has made this easier. A display can actually have multiple screens. The basic syntax to specify displays is HOST: NUMBER if you omit the HOST part, the display is a local one. over SSH), or virtual displays such as Xvfb, etc. It's probable that on your local system you've got DISPLAY:0. ssh listens on that port and forwards traffic back to the calling system, using its original value of DISPLAY to determine the server address. These displays can be physical displays (one or more monitor), or remote displays (forwarded over the network, e.g. When you run ssh -X remotehost and you get DISPLAYlocalhost:10 presented to the remote host. My original solution was based on using rsh. A Unix system can run multiple X servers, i.e. you want to launch an X-based application on machine C, having it display to the VNC server on machine B, so you can see it on machine A.you're launching a console (xterm or equivalent) on machine B and using that to connect to machine C.you're connecting to a vnc server on machine B, displaying it using a VNC client on machine A.I'm guessing here, based on issues I've had in the past which I did solve:
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |