Imagine a Linux machine with a large-capacity hard disk, oodles of RAM and a fast processor. What if X (graphical) applications installed on such a powerful machine could be shared and worked upon by users sitting on different machines on the network. Let the IP address of this Linux machine on your private network be 192.168.1.1.
Set up server
First, you must run Telnet for users to log in remotely to this machine and run X applications. Issue the command ‘ntsysv’ and from the list of services select ‘telnet’. Restart the Linux machine. Log in as root on this machine and create accounts for users (using ‘useradd’ and ‘passwd‘commands) who will use the graphical applications installed on this machine.
On a user machine (for example, with IP 192.168.1.10), start the X server using the ‘startx’ command. In a terminal window within X issue:
(Syntax: xhost +<IP address>)
The above command authorizes graphical applications launched on 192.168.1.1 to use the X server running on this machine for display. Now telnet to 192.168.1.1.
In the terminal window issue:
Login as a user previously setup and issue the following command.
(Syntax: export DISPLAY= <IP-address-ofuser-machine>:0)
Append this command in a file named .bash_profile (note the dot prefix) in your home directory (/home/<user name>) on 192.168.1.1. Start any X application, say Gimp, as:
gimp & (Syntax: <X application executable> &)
This will display the Gimp graphics editor on the X server running on the user’s machine. However, all the files which you open, save, or modify will be on the host machine.
X apps on Windows
What if the user machine is running Windows? Then you need an X server for Windows. On this month’s CD, you will find Xmanager in /usr/Utilities. After installing, start Xmanager from Start>Programs>Xmanager 1.3.9>Xmanager. Xmanager minimizes to the taskbar. Right click on it and select File>Configure. Click on ‘XDM’ tab and select the option ‘Do not use XDM (Passive)’. Click on Security tab, check the option ‘Enable Access Control’ and then click on the ‘Configure’ button. In the ‘New Host’ text field enter 192.168.1.1 and click on ‘Add’. This step corresponds to using ‘xhost’ command on Linux. Telnet to 192.168.1.1. The subsequent steps remain the same as for Linux.