Monday, November 23, 2009  
Google
Web pcquest.com

CIOL Network sites

Search by Issue | Sitemap | Advanced Search

• For most updated version of DQ TOP 20 issue, visit dqindia.com • Ad : Play and Plug ERP by IBM
 Home > Linux > Linux Hands On

Run X Apps Remotely

PCQ

Tuesday, February 05, 2002

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.

The logic

When graphical X applications like Gimp, StarOffice, or xmms run on a Linux machine they look for the location of a running X server to emit their graphical display. By default, the X server is assumed to be running on the same machine. However, by changing an environment variable named DISPLAY you can tell X applications to use an X server running on a different machine

User machines
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:

xhost +192.168.1.1

(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:

telnet 192.168.1.1

Login as a user previously setup and issue the following command.

export DISPLAY=192.168.1.10:0
(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.

Page(s)   1  

Print Comment Email DiggDigg DeliciousDel.icio.us RedittReddit TwitterTwitter


Untitled Document



ZTE:Leading CDMA Technology



   
 

 
 

Magazine Subscription | RQS | Contact Us | Team PCQuest | Advertising - Print | jobs@cybermedia