Question about Rev app on remote X11.

K nnoydb at
Mon Aug 16 16:05:19 EDT 2004

Below is a posting I sent some time ago in reference to using RR stand-alones in a cluster environment.  A RR stand-alone should observe the $DISPALY environment variable and if envoked from a remote termial display on that terminal. Another alterative is to use the "--display" commmand line parameter (shown below) which will cause the stad-alone to ignore the $DISPLAY environment variable and use the specified display.



Cluster GUI

solution it is messy but gets the job done.

Create a user with very little access for my purposes I will call it 'clustergui'. 

Manually execute vncserver and set the vnc password to something very secure!

Create a init.d script (or use the one below) to initialize a vncserver secession (protected by local firewall) for user 'clustergui'.  

Add aka locahost to your system xhost (this gives aka localhost the right to mount the gui you just created).

Execute the program like so:

rrprogram -display<display#> 

Note: You can set the DISPLAY environment varaible to<display#> for entire cluster.

Because the firewall is protecting the VNC secession (preventing anyone from connecting) the secession will utilize little processor.  I also configured the ~/.vnc/xstartup to use 'twm' as the window manager (significantly lowering the memory foot-print).  Using it in this manner allows ALL GUI applications to have a X secession (not just RR standalones).  In fact I am now using matlab with bitmap function (which require X) on my cluster.

I am also using this method for my cron/console (dual mode) execution.

The scripts I used to create the secession is below.

Hope this is helpful,


# chkconfig: - 91 35
# description: Starts and stops vncserver. \
#              used to provide remote X administration services.

# Source function library.
. /etc/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

[ -f /etc/sysconfig/vncservers ] && . /etc/sysconfig/vncservers

prog=$"VNC server"

start() {
    echo -n $"Starting $prog: "
    ulimit -S -c 0 >/dev/null 2>&1
    for display in ${VNCSERVERS}
        echo -n "${display} "
        unset BASH_ENV ENV
        initlog $INITLOG_ARGS -c \
            "su ${display##*:} -l -c \"cd ~${display##*:} && [ -f .vnc/passwd ] && vncserver :${display%%:*}\""
        [ "$RETVAL" -ne 0 ] && break
    [ "$RETVAL" -eq 0 ] && success $"vncserver startup" || \
        failure $"vncserver start"
    [ "$RETVAL" -eq 0 ] && touch /var/lock/subsys/vncserver

stop() {
    echo -n $"Shutting down $prog: "
    for display in ${VNCSERVERS}
        echo -n "${display} "
        unset BASH_ENV ENV
        initlog $INITLOG_ARGS -c \
            "su ${display##*:} -c \"vncserver -kill :${display%%:*}\" >/dev/null 2>&1"
    [ "$RETVAL" -eq 0 ] && success $"vncserver shutdown" || \
        failure $"vncserver shutdown"
    [ "$RETVAL" -eq 0 ] && rm -f /var/lock/subsys/vncserver

# See how we were called.
case "$1" in
        sleep 1
        if [ -f /var/lock/subsys/vncserver ]; then
        status Xvnc
        echo $"Usage: $0 {start|stop|restart|condrestart|status}"
        exit 1

Contents of /etc/sysconfig/vncservers:

# The VNCSERVERS variable is a list of display:user pairs.
# Uncomment the line below to start a VNC server on display :1
# as my 'myusername' (adjust this to your own).  You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.  
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted!  For a secure way of using VNC, see
# URL:

# VNCSERVERS="1:myusername"


Any resemblance between the above views and those of my
employer, my terminal, or the view out my window are purely
Any resemblance between the above and my own views is non-deterministic.

 The question of the existence of views in the absence of anyone to hold
is left as an exercise for the reader. The question of the existence of
the reader
 is left as an exercise for the second god coefficient. 
(A discussion of non-orthogonal, non-integral polytheism is beyond the
scope of this article.)

 --- On Mon 08/16, Andre Garzia < soapdog at > wrote:
From: Andre Garzia [mailto: soapdog at]
To: use-revolution at
Date: Mon, 16 Aug 2004 15:14:25 -0300
Subject: Question about Rev app on remote X11.

Hi Folks,<br><br>I am with a friend considering Rev for creating some special apps for <br>an enterprize, the problem is, the app will run on server, and it <br>should be displayed on remote xterminals. The dumb terminals got a <br>XFree86 running in there, and the server will pipe the display there... <br>anyone tried running rev apps from remote yet? Will I be the first one?<br><br>Cheers<br>andre<br>-- <br>Andre Alves Garzia ð 2004 ð BRAZIL<br><br><br>_______________________________________________<br>use-revolution mailing list<br>use-revolution at<br><br>

Join Excite! -
The most personalized portal on the Web!

More information about the Use-livecode mailing list