Technical article 119224

How can I start an X server and application remotely on OpenServer?

OpenServer 5.0.5OpenServer 5.0.6OpenServer 5.0.7

Written · Last revised

Problem

I would like to start an X server and application remotely on an
Openserver system.  In other words, I want to run an X application
and display it on OpenServer, but I wish to carry this out from
another, remote, system.

Solution

The following script will allow you to start an X server and an application and have all the events logged to /tmp/xserv.log.

#!/bin/sh
:
# Log everything to the log file below
exec 1<&- > /tmp/xserv.log  2>&1
# Set the PATH to include the X Directory and define the app to run
PATH=${PATH}:/usr/bin/X11 export PATH
DISPLAY=:0 export DISPLAY
APP=/usr/bin/X11/xclock
APPARGS="-bg yellow -fg blue -geometry 800x600"
XTTYNUM=02
# In background ensure the getty is disabled for XTTYNUM, allow time
# for it to finish, use the echo command to switch to that screen,
# start the application.  Press ALT-SYSREQ on the console to exit it,
# then allow time to finish then re-enable the getty.
   ( disable tty${XTTYNUM} ; \
   sleep 2 ; \
   echo "\033[`expr ${XTTYNUM} - 1`z\c" > /dev/console  ; \
   /usr/bin/X11/xinit ${APP} ${APPARGS} -- -crt /dev/tty${XTTYNUM}
$(DISPLAY} ; \
   sleep 2 ; \
   enable tty${XTTYNUM} ; ) &
exit 0
NOTE:   It is assumed that:

a) no other X server is running on the server. b) you have access to "rcmd" or "rsh" onto the server. c) the script is held in /local/start.x.app and is ran with the command:

# rcmd <server> /local/start.x.app

d) localhost is defined in /etc/X0.hosts. e) you have run "scologin disable" before starting.

See also

TA107582, "OpenServer 5, rcmd fails with "Permission denied" or rlogin requires a password."

TA107437, "rcmd appears to hang when running daemon programs on remote system"

From the Xinuos technical article database, record 119224. Reproduced with permission. The original is at www.sco.com/ta/119224, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.