[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Xterm OSC not working inside screen
From: |
Dennis McGregor |
Subject: |
Re: Xterm OSC not working inside screen |
Date: |
Wed, 10 May 2006 09:37:58 +1000 |
User-agent: |
Mutt/1.5.11+cvs20060403 |
[10.05.06 07:12] Nikolai Weibull <address@hidden> wrote:
> On 5/8/06, Dennis McGregor <address@hidden> wrote:
> >[08.05.06 05:38] Nikolai Weibull <address@hidden> 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