X Networking / Remote Control
Summary:- Exporting the Display to Another Unix Machine
- Sharing Displays With Machines Running MS Windows Or Mac Os
- Running Multiple X Sessions
Exporting the Display to Another Unix Machine
Via xhost
- The client has to run an X server.
- To allow the client to receive X data from the host (the application server), type xhost +name_or_IP_of_host
If you can connect to the remote via SSH, you can run X applications very easily - and more secure - via an SSH tunnel. - Login into the host machine and export the display by running
- Start a program of your choice on the host from the client machine.
Via XDMCP
XDMCP 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.- Edit '/etc/X11/xdm/xdm-config' and put an exclamation mark in front of this line:
~DisplayManager.requestPort: 0
- Edit '/etc/X11/xdm/Xaccess' and remove the hash (#) in front of this line (if there is one):
* # any host can get a login window
- Edit '/usr/share/config/kdm/kdmrc' and change
{Xdmcp}<br> Enable=false{Xdmcp}<br> Enable=true- Log out of your X session and log in again.
All applications will run on the remote machine and the visuals will appear on the local machine via the network. To quit the session, log out and choose 'Close Connection' from the 'Menu' dropdown. 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. section index
Sharing Displays With Machines Running MS Windows Or Mac OS
In 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.Currently VNC is not actively maintained, but there's a free (and enhanced) work-alike available, ~TightVNC. Their Red Hat 7.x RPMs should work on Mandrake Linux 8.x systems. You might prefer them to the old VNC RPMs which come with Mandrake Linux. The rest of this article refers to this version of VNC. 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."
(from: Microsoft Windows XP Pro EULA) Setting up VNC is a snap:
- Start the VNC server on the machine whose display you to export and provide a password for the client.
- Start the 'vncviewer' on the machine you want to import the display to providing the IP of the machine which runs the VNC server and its display number (Windows and Macs only have one display, it's '0'), like this vncviewer 192.168.0.2:0.
- You will be prompted for a password.
- Another window will pop up on the client machine, containing the desktop of the machine running the VNC server.
- Now you can move around, run programs or even shut down the remote machine.
Cut and paste between client and server works for unformatted ASCII text, but you don't need it anyway: just start a FTP client/server pair on both machines and transfer the files (or use scp/sftp when you're tunneling). Neat, really. 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.
By editing '~/.vnc/xsetup' you can set the window manager which is to run on the exported display. Otherwise the 'twm' manager would be started and you really don't want this, believe me ;-). Add a line like
exec wmaker &
Running Multiple X Sessions
Yep, even this is possible (whether it is sensible is another question ;-)). In fact it is what VNC basically does. It goes like this:- Start your X server like you always do.
- Now switch to the second console by pressing
. - Login and start the next X server by startx :1
- You can now switch X sessions with
(first session) and (second session). - This way you can start up to six different X servers (i.e. one on each virtual console).
: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
Related Resources:
man xhostRemote X Apps mini-HOWTO
XDMCP HOWTO
VNC documentation
man Xserver
man Xnest Revision / Modified: June 18, 2002
Author: Tom Berger Legal: This page is covered by the GNU Free Documentation License. Standard disclaimers of warranty apply. Copyright LSTB and Mandrakesoft.
X Networking / Remote Control
Version 1.5 last modified by Flink on 23/12/2005 at 18:09
Version 1.5 last modified by Flink on 23/12/2005 at 18:09
Document data
- Lost account?
- Join the community, be part of the Club: it's free!
- Get the PWP Download Subscription!
Mandriva.com
Store
Club


