Bug 352945 - PATCH/RFE: add support for terminal background detection (vim background autodetection)
Summary: PATCH/RFE: add support for terminal background detection (vim background auto...
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: emulation (show other bugs)
Version: master
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-20 16:02 UTC by Pavel Raiskup
Modified: 2015-10-03 19:30 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 15.12


Attachments
Implemented feature. (7.37 KB, patch)
2015-09-20 16:03 UTC, Pavel Raiskup
Details
Implemented feature against KDE/4.14. (7.25 KB, patch)
2015-09-20 16:08 UTC, Pavel Raiskup
Details
Implemented feature. (7.37 KB, patch)
2015-09-21 13:31 UTC, Pavel Raiskup
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Raiskup 2015-09-20 16:02:31 UTC
vim uses control sequence 'echo -e "\033]11;?\a"' to request real background
color -- to detect whether terminal has dark or light background.  This is,
however not yet supported by konsole (but is by xterm or gnome-terminal).

The painful result of this is that anytime you "ssh-connect" to remote machine
in konsole with dark background (default in konsole anyway), remote vim takes
the default style -- 'set background=light' and the text is mostly unreadable.

Implemented 'COLORFGBG' variable does not help because that is widely
filtered... (e.g. by ssh itself).

More info:
https://bugzilla.redhat.com/show_bug.cgi?id=1262843


Reproducible: Always

Steps to Reproduce:
1. Run konsole and execute 'echo -e "\033]11;?\a"  && sleep 10'
2. You should see something like: ^[]11;rgb:0000/0000/0000

Actual Results:  
No response given by konsole.
Comment 1 Pavel Raiskup 2015-09-20 16:03:51 UTC
Created attachment 94657 [details]
Implemented feature.
Comment 2 Pavel Raiskup 2015-09-20 16:08:44 UTC
Created attachment 94658 [details]
Implemented feature against KDE/4.14.
Comment 3 Pavel Raiskup 2015-09-21 13:31:12 UTC
Created attachment 94664 [details]
Implemented feature.
Comment 4 Rex Dieter 2015-09-21 13:46:55 UTC
I'd encourage you to consider submitting this feature patch to reviewboard.kde.org
Comment 5 Pavel Raiskup 2015-09-21 14:13:23 UTC
Thanks for the suggestion, https://git.reviewboard.kde.org/r/125333/
Comment 6 Kurt Hindenburg 2015-10-03 19:30:20 UTC
Git commit 9076c3af475e3b0d8cc3158e60c41ac64725b9ee by Kurt Hindenburg.
Committed on 03/10/2015 at 19:26.
Pushed by hindenburg into branch 'master'.

Implement xterm's background color request/reply

vim uses control sequence 'echo -e "\033]11;?\a"' to request real
background color -- to detect whether terminal has dark or light
background.

Thanks to Pavel Raiskup praiskup redhat com
REVIEW: 125333
FIXED-IN: 15.12

M  +5    -0    src/Emulation.h
M  +22   -0    src/Session.cpp
M  +13   -0    src/Session.h
M  +10   -0    src/SessionController.cpp
M  +1    -0    src/SessionController.h
M  +14   -8    src/Vt102Emulation.cpp
M  +2    -1    src/Vt102Emulation.h

http://commits.kde.org/konsole/9076c3af475e3b0d8cc3158e60c41ac64725b9ee