How can I use the mouse in GNU screen on the Linux console? I would expect this to have to go via gpm, but that doesn't seem to happen by default, even if the curses library does link to libgpm. (This may be related to screen's termcap heritage...)
-
For what would you want to use the mouse? And what is it that doesn't work? If you have started gpm, then it should be possible to use the mouse to copy and paste text from within screen. If your screen is running in text mode, as opposed to a graphical terminal, that is.– MvGJul 16, 2012 at 10:29
-
3Presumably things like mouse support in emacs, where an application running with screen as the terminal wants to access the mouse directly. Screen already provides adequate copy/paste support.– Daniel HJul 16, 2012 at 21:28
-
It appears that tmux supports this, but I have yet to find more info than that. I'll keep looking and see if I can post an actual answer. In the mean time, do you have permissions on this computer to install tmux, and if so, is that an option?– Daniel HAug 2, 2012 at 21:58
1 Answer
From the latest GNU Screen Changelog has an entry for mouse usage:
* 'defmousetrack' and 'mousetrack', to turn on/off mouse-tracking for
displays. It's turned off by default. With mouse-tracking turned on, it's
possible to switch to a region ('focus') using mouse clicks. It's also
possible to select a text region in copy-mode using a mouse click to place
a mark and the scroll wheel to scroll through the buffer. Additional
features might be to allow clicking on window-titles in the caption to
switch to that window.
Debian unstable seems to have the latest gnu screen with the configuration above.
$dpkg -l screen
[...]
ii screen 4.1.0~20120320gi amd64 terminal multiplexer with VT100/ANSI terminal emu
Have fun!
-
1I used
defmousetrack on
instead ofmousetrack on
with Screenversion 4.04.00 (GNU) 19-Jun-16
in OSX, presently available in Homebrew taps. Oct 18, 2016 at 17:36