screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Starting screen from logon script


From: Another Sillyname
Subject: Starting screen from logon script
Date: Tue, 25 Sep 2012 12:30:55 +0100

Hi

I have an embedded device that I want to start screen during an ssh logon.

I have the following script.

#!/bin/sh

SCREENRUNNING=`pgrep SCREEN`

if [ -z "$SCREENRUNNING" ]; then

    echo "Screen not running so let's start the Master session
    sleep 2
    screen -dmS Master
    sleep 2
    screen -x root/Master


else

    echo "Screen is already running let's connect to existing session"

    sleep 2
    screen -x root/Master

fi

This starts screen correctly without problems and gets called from
/etc/config/profile when you do a ssh logon.

However this script stays active until screen is fully shut down, this
is a problem as when you detach from the session and then logoff the
device you end up leaving orphaned scripts each time you log back on.

Is there a way to start the screen -x root/Master session and still
allow this calling script to finish?

Thanks



reply via email to

[Prev in Thread] Current Thread [Next in Thread]