GNU screen でスクロールホイールを使用する 質問する

GNU screen でスクロールホイールを使用する 質問する

マウスのスクロールホイールでスクロールバック バッファ内をスクロールできるように GNU screen を設定するにはどうすればよいでしょうか。これについて Google で検索してみましたが、ヒットしたほとんどの情報は screen 内のアプリケーションでスクロールホイールを使用できるようにする方法に関するものでした。

ベストアンサー1

次のような行を追加するだけでよいと思います~/.screenrc:

termcapinfo xterm* ti@:te@

ここで、「xterm*」は現在の TERM の glob マッチです。動作を確認するには、^A^D で画面から切り離し、再度screen -d -r接続し、これをls数回繰り返して、スクロールバックしてみます。私の場合は動作しました。


この魔法とは何でしょうか? では、マニュアルページを参照してみましょう。

screen(1)言う:

termcapinfo term terminal-tweaks [window-tweaks]
  [..]
  The first argument specifies which terminal(s) should be affected by this
  definition. You can specify multiple terminal names by separating them with
  `|'s. Use `*' to match all terminals and `vt*' to match all terminals that
  begin with "vt".
  [..]
  Some examples:

      termcap xterm*  LP:hs@

  Informs screen that all terminals that begin with `xterm' have firm
  auto-margins that allow the last position on the screen to be updated (LP),
  but they don't really have a status line (no 'hs' -  append  `@'  to turn
  entries off).  Note that we assume `LP' for all terminal names that start
  with "vt", but only if you don't specify a termcap command for that terminal.

からtermcap(5)

String capabilities
    [..]
    te   End program that uses cursor motion
    ti   Begin program that uses cursor motion

おすすめ記事