|
|
X Networking / Remote ControlSummary:
X is network-capable. You can run applications on one machine (the application server) and serve them to X servers running on client machines (yes, the server has to run on the client). These clients may run any operating system, as long as there is an X server for this system available. You can also run several instances of X on the same machine. Exporting the Display to Another Unix MachineVia xhost
Via XDMCPXDMCP is the X Display Manager Control Protocol. In order to use it, you will have to log in via a graphical login manager (GDM, KDM) on the machine which will act as the server. Configuration steps require 'root' privileges and have to be done on the machine running the login manager only.
~DisplayManager.requestPort: 0
* # any host can get a login window
{Xdmcp}<br> Enable=false
to {Xdmcp}<br> Enable=true
If you're using GDM, you can configure that in the advanced options field of gdm-config.
X -broadcast (notice that you can and should do this as non-root). The login screen of the remote machine running the display manager will come up and you can log in. Since the local X server requires very little resources, this is a neat way to run a full blown graphical desktop on older machines. Security notice: Only use XDMCP in trusted environments, there's no encryption whatsoever, everything - including passwords - is sent in plain text over the network between the connected machines. XDMCP requires UDP port 177 to be open on the display server. Sharing Displays With Machines Running MS Windows Or Mac OSIn order to import an X display from another machine, the importing machine has to run an X server. Currently XFree is available for all major operating system including MS Windows 9x / NT /XP via cygwin and Mac OS X via ~XonX . Additionally, there's a wide range of proprietary X servers available, among the more affordable are: ~WiredX(-Lite) (free of charge, Java) MI/X (25$, free for Mac OS) and X-~WinPro (100$). ~LinuxWorld has a comparative review of three proprietary X servers which might be of interest. Another (free) possibility is provided by a software called Virtual Network Computing . VNC allows you to access displays of Unix, Windows and Mac machines from other Unix, Windows or Mac machines. In contrast to X servers, VNC will always serve the complete remote desktop and not single applications. Notice that you might void your Windows XP license by running a VNC server on XP: >"Except as otherwise permitted by the ~NetMeeting, Remote Assistance, and Remote Desktop features described below, you may not use the Product to permit any Device to use, access, display or run other executable software residing on the Workstation Computer, nor may you permit any Device to use, access, display, or run the Product or Product's user interface, unless the Device has a separate license for the Product." Setting up VNC is a snap:
On my former 10MBit LAN the speed was bearable enough to run applications like Word or the Internet Explorer (not at the same time, though). Of course, the real fun starts at 100MBit ;-). The load on the client machine is next to none, in fact, when I wrote the original version of this article, I had it running along with 3 virtual terminals and Netscape Communicator. On KDE . And 64MB RAM ;-). One minor drawback on Linux is that you can't export the current display in use, VNC will always start the server at the next available display number. exec wmaker & Running Multiple X SessionsYep, even this is possible (whether it is sensible is another question ;-)). In fact it is what VNC basically does. It goes like this:
:0 local /usr/X11R6/bin/X -bpp 16 vt7 :0<br> :1 local /usr/X11R6/bin/X -bpp 24 vt8 :1<br> :2 local /usr/X11R6/bin/X -bpp 8 vt9 :2 This will start three X servers, the first on virtual terminal 7 with a color depth of 16 bpp, the second on virtual terminal 8 with a color depth of 24 bpp and a third on virtual terminal 9 with a color depth of 8 bpp. Supplying the color depth option is - well - optional. What now happens is this: you get into the KDM login screen and login as usual. You are on the default X server, display :0, virtual terminal 7. Now press . You are now on the second X server, display :1, virtual terminal 8 and are greeted by the KDM login screen again. Press and - well, you get the idea. By pressing you can instantly switch between these sessions. Another option is running another X session inside your current session. This can be done using 'Xnest' (package XFree86-Xnest), a virtual X server. Start it with: Xnest :1 -ac & and you should get a 'gray' X window (notice that the '-ac' option turns off access control, it's convenient but might be dangerous in an untrusted network). Somewhat boring, though. Obviously you can get things started only from your current session. Open a new command line window and type: export DISPLAY=localhost:1 Now every application you start from this command line window will run on the virtual X server. Start an terminal like 'xterm' or 'rxvt' from the command line and you'll see the application appearing in the Xnest window. How about a window manager? Sure thing, why not: wmaker will start the 'Window Maker' window manager in Xnest (provided it is installed). One word of caution though: do not run the same window manager or environment in Xnest you are using on the 'real' X session. This will at least crash the server. You see what amazing possibilities X offers you. Go wild1.1 But read the available documentation first ;-). Related Resources:man xhost Revision / Modified: June 18, 2002 Legal: This page is covered by the GNU Free Documentation License . Standard disclaimers of warranty apply. Copyright LSTB and Mandrakesoft. |