[10.05.06 07:12] Nikolai Weibull <[EMAIL PROTECTED]> wrote:
> On 5/8/06, Dennis McGregor <[EMAIL PROTECTED]> wrote:
> >[08.05.06 05:38] Nikolai Weibull <[EMAIL PROTECTED]> wrote:
> >> Yes, I've tried
> >
> >> termcapinfo xterm* XT
> >
> >> in my screenrc, but it still doesn't work.
> >
> >> Am I missing something here?
> >
> >> I'm "echo -n"-ing "^[]4;1;?^[\", which works fine inside an xterm, but
> >> not inside a screen.
> >
> >> (What I'm trying to achieve is to get the value of a given color in
> >xterm.)
> >
> >> Thanks.
> >
> >> nikolai
> >
> >$ echo -n "\eP\e]4;1;?\007\e\\"
> >works for me.
> This doesn't work for me. I've been able to read the response from an
> xterm with the following code (stolen from xterm ctlseq):
> read_response () {
> exec </dev/tty
> old="$(stty -g)"
> stty raw -echo min 0 time 1
> echo -n '\e]4;240;?\e\' > /dev/tty
> IFS='' read -r response
> stty "$old"
> }
> but it doesn't work inside screen if changed to
> read_response () {
> exec </dev/tty
> old="$(stty -g)"
> stty raw -echo min 0 time 1
> echo -n '\eP\e]4;240;?\e\\e\' > /dev/tty
have you tried it with '\eP\e]4;240;?\007\e\\' here?
as Michael said in the reply about why this needs both BEL and ST, the
ST "\e\" ends the screen escape sequence, so you need to put the \007
BEL char in there to end the xterm sequence before ending the screen one.
^d
> IFS='' read -r response
> stty "$old"
> }
> Anyone have any suggestion on how I might make it work?
> Thanks.
> nikolai
_______________________________________________
screen-users mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/screen-users