0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ターミナルの表示異常を直す

0
Last updated at Posted at 2022-10-11

環境

  • GNOME端末 Version 3.44.0 for GNOME 42
  • RLogin 2.25.9
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04 LTS
Release:	22.04
Codename:	jammy

試験症状:カーソルを消す

文字化けだとかもテストしたかったけれどもバイナリを cat しても文字化けが再現できず、仕方なくカーソルが消えた症状をターゲットとしました。

$ echo -e "\e[?25l"

とするとカーソルが消えます。

カーソルを再表示させるには?

echo でエスケープシーケンス

$ echo -e "\e[?25h"

で表示されます。
image.png

GUI メニュー

image.png
これの「リセット」でカーソルが出現します。

「リセットとクリア」だと画面もクリアされ、スクロールバックが使えなくなります。

reset コマンド


$ reset

先の「リセットとクリア」と同じように画面もクリアされ、スクロールバックが使えなくなります。

2024/7/6 追記

Debian で、タイプしたエコーバックが表示されない問題が発生しました。

上記の 「GUIメニュー」では直りませんでしたがこの「reset」コマンド、ないし下記の「tset」を発行したら直りました。

tset

先の reset コマンドの実体は tset コマンドです。

$ ls -alh /usr/bin/reset
lrwxrwxrwx 1 root root 4  7月  9 20:39 /usr/bin/reset -> tset

tset コマンドを単純に呼び出すようにすると、画面クリアせずにカーソルが表示されます。


$ tset

RLogin を用いて Windows から Ubuntu サーバを操作している途中、バイナリを cat して文字化けしましたが、 tsetコマンドを発行することで正常になりました。

image.png

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?