screen-users
[Top][All Lists]
Advanced

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

Re: How to automatically attach to session, create new window and run a


From: Eugeny N Dzhurinsky
Subject: Re: How to automatically attach to session, create new window and run a program?
Date: Mon, 15 Oct 2007 16:23:34 +0300
User-agent: Mutt/1.5.16 (2007-06-09)

On Mon, Oct 15, 2007 at 04:44:34PM +0400, Andrew Pantyukhin wrote:
> Sorry, you shoult try without the single quotes

EXcellent, looks like this works:

#!/bin/sh

SCREEN=/usr/local/bin/screen
TERM=rxvt +vb -bg black -fg green -geometry 106x40+0+0 -sl 2048 -fn 
-xos4-terminus-bold-r-*-*-24-*-*-*-*-*-koi8-u

if [ "x`screen -wipe | grep Attach`" != "x" ]; then
        $SCREEN -D -RR current -X screen
elif [ "x`screen -wipe | grep Detach`" != "x" ]; then
        $SCREEN -D -RR current -X screen
        $TERM -e screen -r
elif [ "x`screen -wipe | grep \"No Sockets found\"`" != "" ]; then
        $TERM -e screen
fi

so when I said to fluxbox invoke this script when I typed F12 - the screen is
populated and new window is created and focused!

However there is a small issue - when the screen is detached, if the script is
executed - the newly created window isn't focused, but last one I chose
previously is focused. Do I miss something?

-- 
Eugene N Dzhurinsky

Attachment: pgpJNdqcmLv1C.pgp
Description: PGP signature


reply via email to

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