I am using the following control sequence to set up that when I click in the command line in shell (BASH) in XTerm the cursor moves to the position. At least, it used to worked that way in my ancient Fedora 18 I used to have. (I tend to write very long pipelines and therefor this feature is splendid and quite crutial to me, because I got completely used to it during the years using it.)
What I do to enable the "click-to-go-to-position" function I do (usualy in PS1
BASH variable):
\[\e[?2001;2002;2003;2004;2005;2006s\e[?2001;2002;2003h\]
and to restore the original saved state (usualy in PS0
so that it does not influence the command to be run from the shell):
\[\e[?2001;2002;2003;2004;2005;2006r\]
Here are aliases for experimenting:
alias tmouseon='printf -- '\''\e[2001;2002;2003;2004;2005;2006s\e[?2001;2002;2003h'\'''
alias tmouseoff='printf -- '\''\e[?2001;2002;2003;2004;2005;2006r'\'''
This is my XTerm configuration (some parts of it may be relevant to this issue but according to the XTerm's manual I was not able to find additional options or an option that may be causing the issue in my configuration; also note that I do not xrdb -merge
my X resource file in my .xinitrc
but just xrdb
because I never liked the defaults from distributions and want to have full control of it and I've been using it this way for ages without any troubles):
! Init
XTerm.ptyInitialErase: true
XTerm.waitForMap: true
! Buffers
XTerm.buffered: true
XTerm.bufferedFPS: 100
XTerm.maxBufSize: 131072
XTerm.minBufSize: 8192
! TERMINAL
! Name
XTerm.VT100.termName: xterm-256color
! Session
XTerm.VT100.loginShell: true
! Features
XTerm.VT100.allowFontOps: true
XTerm.VT100.allowMouseOps: true
XTerm.VT100.allowTcapOps: true
XTerm.VT100.allowTitleOps: true
XTerm.VT100.allowWindowOps: true
XTerm.VT100.c132: true
! Input
XTerm.VT100.backarrowKey: true
XTerm.VT100.backarrowKeyIsErase: true
! Scrolling
XTerm.VT100.scrollBar: false
XTerm.VT100.scrollTtyOutput: false
XTerm.VT100.allowScrollLock: true
! Screen buffer
XTerm.VT100.saveLines: 10000
! Alternate screen
XTerm.VT100.titeInhibit: true
XTerm.VT100.tiXtraScroll: true
! Visual bell
XTerm.VT100.visualBell: true
XTerm.VT100.visualBellLine: true
XTerm.VT100.visualBellDelay: 150
! Pointer shape
XTerm.VT100.pointerShape: hand1
! Margin bell
XTerm.VT100.marginBell: true
XTerm.VT100.nMarginBell: 8
! Cursor blinking
XTerm.VT100.cursorBlink: true
XTerm.VT100.cursorOffTime: 250
XTerm.VT100.cursorOnTime: 750
! Selection
XTerm.VT100.charClass: 33:48,36-47:48,58-59:48,61:48,63-64:48,95:48,126:48
XTerm.VT100.highlightReverse: false
XTerm.VT100.highlightSelection: true
XTerm.VT100.trimSelection: true
(Colors settings omited...)
After I upgraded the very very outdated (I know, I know, but there was no need to while I use rather "spartan" environment and use common tools) Fedora 18 workstation to the recent Fedora 36, the feature of moving cursor in XTerm on a mouse-click stopped working and I really cannot find out the root cause of the issue. (I tried hard to solve it but failed completely.) I would like to get the functionality back. Can anyone help, please?
Does anyone have the same issue? How to analyze it?
I guess it may be something about TermInfo changed or something but I have no idea how to dig into it more further... Thanks for all your ideas on how to get it working again!
dnf download --disablerepo=* --enablerepo=fedora --downloadonly --releasever=30 xterm
to download several releases of the binary rpm, and didrpm2cpio | cpio -cdimB
to unpack them locally, andstrings usr/bin/xterm
to look for "readline-button". It still appears in the fedora 30 binary, but has disappeared in the fedora 31 rpm. The code for this feature is still in the sources for fedora 36, so we need to find why fedora is not building with it. Perhaps it has to do with their move to wayland?readline-button()
set up, and I am not sure if it was set up by default (which would be very weird and the left click worked without any extra key pressed). I still suspect that the whole issue can be unrelated to XTerm as such and could have more to do with some changes in, say, GNU Readline that may be involved or so. This is still hard to tell. I will try to go through changelogs of all libraries that may be related to the issue.