[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ltsp-developer
Subject:    [Ltsp-developer] Screen session check proposal
From:       Gideon Romm <gideon () symbio-technologies ! com>
Date:       2008-12-21 12:54:27
Message-ID: 1229864067.10135.12.camel () romm-desktop
[Download RAW message or body]

Hi, all.  There's a piece of code that we currently have in
screen_session that I would like to change, but I figured best to make
the proposal here.

We have the following code that does not allow one to use SCREEN_01 for
a screen session:

###  CODE SNIPPET  ###

if [ "${SCREEN_NUM}" = "01" ]; then
    # This is not an error on Fedora.
    if [ ! -e /etc/rwtab ]; then
        logger -t LTSP "Screen scripts should not be run on SCREEN_01"
        echo "SCREEN_01 Contains a screen script ${SCREEN_SCRIPT}
${SCREEN_ARGS}
 Please change to another screen"
        exit 1
    fi
fi

###  CODE SNIPPET  ###

This was a remnant from ubuntu's first LTSP5 work, and remains in the
code because many distros still run a getty on tty1 - tty6, AND many
people coming from LTSP4 (which had SCREEN_01 as the default for screen
session) would have SCREEN_01 in their lts.conf.

Unfortunately, this is rather:

a.  Dictatorial to have in upstream (like saying here's a variable
SCREEN_01 - but you dare not use it!).
b.  Unnecessary unless there actually is something running on tty1
already.

(as you can see Fedora has already started adding code to make sure they
aren't told what to do wrt tty1)

PROPOSAL
--------
Fortunately, we have this lovely "ps" command that can tell us if a proc
is running on tty1 - "ps t tty1".  Moreover, it would seem appropriate
to set an error (or maybe even just a warning?) for *any* screen session
that may want to start on a tty already occupied by other processes.

So, I would like to dump the existing check in favor of one that
performs a check on any SCREEN_XX for running procs on that TTY.

Thoughts?  Objections?

-Gadi



------------------------------------------------------------------------------
_____________________________________________________________________
Ltsp-developer mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-developer
For additional LTSP help,   try #ltsp channel on irc.freenode.net
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic