geekvenue.net

Welcome to Chucktips Hardware HELP WITH DEAD OS Installing FreeBSD Miscellaneous
 faq
 search
 add article
 cool-stuff
 how-to
 main
 tips


HOWTO : Access graphical applications on Linux Box from FreeBSD
X Windows Posted by Santhosh Joseph on Monday June 17, @02:45AM
from the dept.

The X window system (or X) is a networking window system that provides a base set of communication protocols for building graphical interface clients for computers. X was designed from ground up   to support networking graphics. Programs or applications under X are known as clients.  We would use this network capability of X to access the Applications on the Linux machine on the LAN and have the output displayed on the FreeBSD  machine.


I have the following setup on my LAN :

1. Athlon XP
    OS : FreeBSD 4.5
    Xfree-4.1
    Graphics Card : RIVA TNT 2 with  32MB RAM
    IP Address : 10.0.0.1

2. Celeron
     OS : Redhat Linux 7.3
     Xfree-4.2
     Graphics Card : Integrated with M/B
     IP Address : 10.0.0.2

3. Duron
    OS : Mandrake Linux 8.2
    Xfree-4.2
    Graphics Card : Integrated with M/B
    IP Address : 10.0.0.3

LAN : 100MBps full-duplex on switch.

Lets assume that we want to access Netscape from 10.0.0.2 and Mozilla from 10.0.0.3 and have both displayed on 10.0.0.1

The  xhost program is used to add and delete host names or  user names to the list allowed to make connections to  the X  server.  The term "X server" can be confusing here. To make things easy, lets consider the above example. Since we want the output to be displayed on the FreeBSD machine, we need X window to be running on the FreeBSD Box, and hence the X server runs on the FreeBSD box ! The Clients in this case will be the applications we would access from the other two machines (10.0.0.2 and 10.0.0.3).

First lets permit the two Linux machines to output their displays on the BSD Box.
Start you X window on the FreeBSD machine and open two shells. I used SSH to login to both Redhat and Mandrake box.
 
 

bash-2.05a$ xhost + 10.0.0.2
10.0.0.2 being added to access control list
 

bash-2.05a$ xhost + 10.0.0.3
10.0.0.3 being added to access control list
 

bash-2.05a$ ssh -l bsder 10.0.0.2
bsder@10.0.0.2's password: xxxxxxx (password will not be echoed)

On successful login, you'll get a similar prompt

Last login: Sun Jun 16 22:35:05 2002 from 10.0.0.1
[bsder@ws-2 bsder]$

The next step is to configure the DISPLAY environment variable on both Redhat and Mandrake system from which the client applications are requested.

[bsder@ws-2 bsder]$ export DISPLAY=10.0.0.1:0.0
 
 

The configuration for Mandrake Box is as follows  :

bash-2.05a$ ssh -l cintrix1 10.0.0.2
cintrix1@10.0.0.3's password:
Last login: Mon Jun 17 12:39:01 2002 from 10.0.0.1
[cintrix1@cintrix3 cintrix1]$  export DISPLAY=10.0.0.1:0.0
 

Now you are all ready to access X clients from both the machines

[bsder@ws-2 bsder]$ netscape &
[2] 4024
[bsder@ws-2 bsder]$

[cintrix1@cintrix3 cintrix1]$ mozilla &
[1] 7527
[cintrix1@cintrix3 cintrix1]$
 

and lo ! you can access both Linux Boxes without having to leave your FreeBSD Machine all the while not having your linux users to spare you the machine :-) . You can also aceess the X clients through the internet !  Also, note that the same could be applied in any combination, ie. you can get the X Cilent of FreeBSD on your Linux Box.

So where's the catch ? Well, you'll need a high bandwidth network and the Linux machines should be capable of taking the additional load.
 
 
 

<  |  >

 

Related Links
  • Articles on X Windows
  • Also by Santhosh Joseph
  • Contact author

    Lilliput Mini USB Computer Monitor

    If you have ever wanted to learn about Cisco Routers, check out my new book "Cisco Routers for the Small Business" - it's Cisco CLI for the Regular Guy!

  • Sponsors

    The Fine Print: The following comments are owned by whoever posted them.
    ( Add a Reply )

    Re: HOWTO : Access graphical applications on Linux
    by Sam on Sunday October 12, @12:34PM
    You can also use openssh-s X11 forwarding. No messing with xhost, no messing with the DISPLAY variable. (ssh -X ; X11Forwarding and ForwardX11 in ssh{d,}_config).

    Cheers
    [ Add a Reply to this ]
    Re: HOWTO : Access graphical applications on Linux
    by Toby Wilson on Thursday October 30, @03:16PM
    I tried accessing my freebsd box from my linux box and I got 192.168.1.4 command not found. I tried again and I got name or service not found. Do I need to make another account for accessing from a remote machine?
    [ Add a Reply to this ]
    • Re: HOWTO : Access graphical applications on Linux
      by Erik S on Sunday June 13, @10:45AM
      You are not running the right shell.
      With tcsh for example type:
      setenv DISPLAY YOUR_MACHINE:0 erik
      [ Reply to this ]

     
    The Fine Print: The following comments are owned by whoever posted them.
    ( Article Reply )

    "You never know how many friends you have until you own a Condo on the beach." -- Jason's Postulate

    Powered by Zope  Powered by Apache  Squishdot Powered
    All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©2001 Jason Neumann.
    [ main | post article | search ]