Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!elroy.jpl.nasa.gov!decwrl!csus.edu!csusac!unify!openlook!openlook-request From: Michael.Oconnor@West.Sun.COM (Michael O'Connor - SE Sacramento) Newsgroups: comp.windows.open-look Subject: Re: Launching remote X applications Message-ID: Date: 24 Jun 91 22:55:45 GMT Sender: news@Unify.Com Lines: 65 []From owner-openlook@uunet.uu.net Mon Jun 24 13:32:17 1991 []Return-Path: []To: openlook@uunet.UU.NET []Path: unify!csusac!ucdavis!ucbvax!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!caen!hellgate.utah.edu!csn!otis!paulo []From: paulo@ohmeda.com (Paul Ourada) []Newsgroups: comp.windows.open-look []Subject: Launching remote X applications []Date: 24 Jun 91 16:19:57 GMT []Organization: Ohmeda Monitoring Systems []Lines: 40 []Status: RO [] []Hi again. I'd like to thank everyone for their suggestions and tips wrt []launching remote X applications. It seems, that my problem was specifically []the LD_LIBRARY_PATH environment variable. I will cover the entire procedure []below for those other newcomers like myself. [] []setenv OPENWINHOME /usr/openwin []setenv FONTPATH $OPENWINHOME/lib/fonts []setenv HELPPATH $OPENWINHOME/lib/help []setenv LD_LIBRARY_PATH $OPENWINHOME/lib:/usr/lib []setenv MANPATH $OPENWINHOME/share/man:/usr/man [] []when you rlogin or rsh, set the DISPLAY env var thusly: [] []setenv DISPLAY "you host name":0.0 [] []Scott Brim gave me the following script which he calls rx: [] []--------------------------------- []#!/bin/sh - [] []host=$1 ; shift [] []case $DISPLAY in []:0|:0.0|unix:0|unix:0.0) xhost $host >/dev/null ; DISPLAY=`hostname`:0 []esac [] []rsh -n $host "sh -c 'DISPLAY=$DISPLAY $@ >/dev/null 2>&1&'" [] []---------------------------------- [] []I haven't tried it yet, so I can't tell you if it works, but Scott seems like a []nice guy...:-) He says that his officemate has a more complicated one. [] [] []Again, thanks to all that have replied. It has been an uplifting experience. [] []Paul E. Ourada []Software Engineer []Ohmeda Monitoring Systems []paulo@ohmeda.com [] Another interesting approach is to use the on(1C) command which uses rexd(8c) to execute the process on the remote system. On executes the command remotely but unlike rsh, it maintains the users current environment and even performs NFS mounts if necessary. On may not be implemented on all vendors systems however. You still have to set the DISPLAY variable however as by default it is set to :0 instead of `hostname`:0. --michael