On: Thu, 27 Aug 1998 21:19:48 +0000 Phillip Neumann writes:
> 
> Hi,
> What sould i do to run an X session, and then changing to another
> console and make another X session, without linux saying me it canot
> do it??

I have written the following shell function to do this automatically:

x() {
      D=x
      for i in 0 1 2 3 4;do if [ ! -f /tmp/.X${i}-lock ]; then D=$i; break; fi; 
done
      if [ "${D}" = "x" ]; then
        echo "Kein freies Terminal" # No free terminal, tty12 is used for syslog
      else
        if [ $# -lt 1 ];
          then startx -- :${D} -bpp 16 2> ~/.X.err > ~/.X.out &
          else startx -- :${D} -bpp $1 2> ~/.X.err > ~/.X.out  &
        fi; 
      fi
}

16bit colors are default, but can be changed by the first parameter
(e.g., x 8).

        Torsten

Reply via email to