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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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 +hostname
ssh hostname
export DISPLAY:client_I_am_connecting_from:0
First you have to disable X's security feature that prevents this sort of thing.
"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:
Originally posted by podollb So I don't need vnc? fatgod mentioned nothing about it...
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:
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)?
No, other users will not notice.
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
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...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.