Re: VAR Business story on SCO

From: Roger Cornelius (rac_at_tenzing.org)
Date: 10/18/05


Date: 17 Oct 2005 17:01:00 -0700

Jean-Pierre Radley wrote:
> Roger Cornelius typed (on Mon, Oct 17, 2005 at 11:52:12AM -0700):
> | Bob Stockler wrote:
> | > Roger Cornelius wrote (on Mon, Oct 17, 2005 at 09:58:37AM -0700):
> | >
> | > | Bob Stockler wrote:
> | > | > John Boland wrote (on Mon, Oct 17, 2005 at 10:31:38AM +0100):
> | > | >
> | > | > | > That all sounds fine -- until you temper it with things like SCO
> | > | > | > shipping OpenServer 6 without support for PCI parallel cards
> | > | > |
> | > | > | Bill,
> | > | > |
> | > | > | PCI Parallel will be in MP2 which is due in a few weeks.
> | > | > | Then all will sound fine once again I hope.
> | > | >
> | > | > Will MP2 make possible more than one X session?
> | > |
> | > | It's already possible. Just supply an unused session number as an
> | > | argument to startx. E.g., if you already have session 0, use:
> | > |
> | > | 'startx -- :1' (or 2, 3, etc.)
> | > |
> | > | Look in /dev/X to see what sessions are already active.
> | >
> | > Thanks, that works great!
> | >
> | > On OSR 5.0.6 I was used to just executing startx alone and it
> | > would automatically pick the next available session number.
> |
> | Me too. I wrote my own script to determine the next session number,
> | then exec the real startx with the necessary args.
>
> So would you contribute to the prevention of re-invented wheels? :-)

What follows is basically what I use. I've excluded some non-relative
stuff to select which window manager to use. It isn't perfect. E.g.,
if you have servers 0 and 2 running, it will start server 3 rather than
server 1. I doubt this would be a problem for anyone though. It also
doesn't check to see if the serv3rs listed in /dev/X are actually
running. Once, after rebooting when the machine hung, there were
leftover entries in /dev/X. Again, that probably woudn't be a problem
for anyone.

I'm sure Bob can improve on this.

#!/bin/ksh

# If an xserver is already running, start the next one
# This was automatic with osr507 and earlier, but not OSR6

startx_arg= # argument we pass to /usr/bin/startx, if
any
proto="/dev/X/server.*"
set -A xs $proto # list of running X servers

if [[ "${xs[@]}" != "$proto" ]]
then
    # if server(s) already running, determine what next one s/b
    typeset -i n=${xs[${#xs[*]}-1]##*.}+1
    startx_arg="-- :${n}"
fi
unset n proto xs

exec /usr/bin/startx $startx_arg



Relevant Pages

  • Re: Multiple X Sessions on OSR 6
    ... Bob Stockler wrote: ... I've been indisposed with the flu the ... > | session, X will start and give me the grey stippled background but no ... > | host ...
    (comp.unix.sco.misc)
  • Re: VAR Business story on SCO
    ... |> Will MP2 make possible more than one X session? ... On OSR 5.0.6 I was used to just executing startx alone and it ...
    (comp.unix.sco.misc)
  • Re: VAR Business story on SCO
    ... Just supply an unused session number as an ... |> On OSR 5.0.6 I was used to just executing startx alone and it ... |> would automatically pick the next available session number. ...
    (comp.unix.sco.misc)