Exporting Display
Hi,
I have heard you can export the display of a linux box to remotely admin it via X as you would be sitting in front of the monitor at that box. I have two linux machines and was hoping to try that out what are the steps needed? |
You mean like VNC? You can also run X applications through SSH but it not exactly like sitting at the monitor.
|
Hi,
Yes you can monitor a linux box remotely either from another linux machine or from windows. The procedure is 1)You need the machines to be on the network. 2)If connecting from windows have vnc , xwin32 or exceed installed or if it is linux have vnc installed on it. 3)for windows - start xwin32 ,exceed or vnc (whichever you installed) 4)logon to linux system using ssh and export DISPLAY=x.x.x.x:0 (x.x.x.x - ip address of the client machine where xwin32 ,exceed or vnc is installed, 0 - display number set on the software) run startkde or gnome-session 5)you will now find the linux desktop on your xwin32 ,exceed or vnc. hope it helps. bye, boby |
It's quite simple dude, we harrass people at work by sending them xkills and dodgy images via vx all the time ;)
"xhost +" will disable all Xhost security stuff, you can also "xhost +hostname" to allow only a specific host to send windows to your node, which is a good idea. This can be an IP or a hostname. Secondly, you ssh to the target node. and do "export DISPLAY=x.x.x.x:0" where x.x.x.x is the IP of the machine that your connecting _FROM_. ie where you want the window to appear. the :0 is setting the display number it will send the window to on the node. if you only have one session of X, (and no doubt you do) then the number here should be 0. You can put a hostname here too if you want to, so long as it resolves to the intended machine. Thats it! start something that would normally want to throw up a window, like mozilla or somthing, and enjoy ;) Now excuse me while I harass my co-workers with some pictures of Zena. |
So I don't need vnc? fatgod mentioned nothing about it...
Also will the use of the display from a remote machine make the Xwindows for other users at that machine screw up (or is that where I would need to export to a display other than 0)? |
Go forth and send X windows to your machines via the network...
Quote:
Nope you dont need VNC. VNC is cool for a great number of reasons, but you dont need it to export X windows to other machines. Do as I said earlier, I actually know what I'm talking about for once ;) Quote:
X is a little strange ;) You can run many instances of X servers on one machine, each X server (aka X Session) is assigned a screen number. so like mine at work is fatgod@some.where:53 So I have the 53rd X session on the machine some.where. I can export displays from other machines too and they just appear on my server. I literally use an X client on another machine to display windows on my server by setting the DISPLAY environment variable to some.where:53. It's quite normal behaviour for an X-Windows environment. VNC is basically the same thing but you dont need X-Windows to do it, you use VNC instead, people use it becasue it works accross a plethora of platforms. So I suppose your more confused than ever now. Good then, just go and do ;) |
No you have not confused me, only enlightened me!
Thanks for your help it worked flawlessly... |
Sweet ;)
|
How about if I want to export everythign even X? So it would be simliar to what VNC does I think (which I could use I guess) but I was wondering if there was a way simliar to above to do that...
|
All times are GMT -5. The time now is 02:58 AM. |