screen-devel
[Top][All Lists]
Advanced

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

[screen-devel] bug using 'screen -X' and feature request


From: Guyzmo
Subject: [screen-devel] bug using 'screen -X' and feature request
Date: Fri, 21 Nov 2008 17:01:58 +0100

Hi,

first things first, I'm trying to control remotely a screen session
from an IDE, so I can send build/execution/interpreters in that
session's windows.

So far, what I've done is pretty simple :
1/ run 
"screen -X 'screen -t %s %s'" % (title, command)
2/ run 
"screen -X 'screen -X 'exec ::: python %s %s '" % (script_path,dbus_id)

3/ controller-script.py
a/ connects to the IDE and register itself, sending session name,
session's pid and current window number
b/ receives a list of regular expressions, and send a match dbus message
when one regexp is matched (useful for parsing build/execution failures)

It overall works pretty well, but there's a major issue : when running
in sequence 1/ and 2/ there's no way to be sure that command 2/ will be
sent to command 1/.

I tried using -p'.', guessing the window number (but if the user does
^ac it will be wrong)... And I am now out of solutions to make it work.

So here am I with a feature request: how hard would it be to either :
- find a way to return the created window number when command 1/ is
executed (either using the environment, or sending it to stdout)
- execute a sequence of commands like this one :
    "screen -X 'screen -t %s %s ; exec ::: python %s %s' % (title,
                                        command, script_path, dbus_id)
so the exec command is sent to the newly created window.

finally, I went through opened tickets and found no tickets related to
that, and looked through the mailing list (but not comprehensively) and
found no references to such a problem. If I have confirmation there is
indeed no ticket related to that, I'll create one.

I'm also ready to write a patch about it (I'd personally prefer the
second solution), but being new to screen's code, I'd appreciate if
someone could give me hints on where to begin, what shall I see.

And finally, I've seen the thread on integrating a scripting language in
screen, and I'm definitively interested in that option (though I'm
neither a fan of lua :p but guile seems really promising). But I'd like
to have my problem solved before this gets done.

Cheers,

-- 
Guyzmo





reply via email to

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