Ticket #238 (closed enhancement: wontfix)

Opened 18 months ago

Last modified 9 months ago

Terminal Reset (or Reset and Clear)

Reported by: markstinson Owned by: ulidtko
Priority: minor Milestone: 0.5.0
Component: guake Version:
Keywords: Cc:

Description

When working in a terminal, occasionally something fouls up the session requiring a terminal Reset (or Reset and Clear). You can see an example of this menu item in gnome-terminal in the menubar Terminal -> Reset (or the item Reset and Clear).

There's no immediate way to issue a terminal Reset.

Attachments

add_terminal_reset_feature.patch Download (1.8 KB) - added by ulidtko 17 months ago.
Patch which adds terminal reset feature
0001-add-terminal-reset-feature.patch Download (1.6 KB) - added by ulidtko 14 months ago.

Change History

  Changed 18 months ago by markstinson

  • type changed from defect to enhancement

Changed 17 months ago by ulidtko

Patch which adds terminal reset feature

  Changed 17 months ago by ulidtko

This patch implements the terminal reset feature.

It clears the scrollback buffer too; note that Ctrl+L (0x0C, FORM FEED) does clearing the screen too, but doesn't touch scrollback buffer. Also, ^L doesn't perform any resetting of the terminal.

attachment:add_terminal_reset_feature.patch Download

  Changed 17 months ago by ulidtko

  • owner changed from somebody to ulidtko
  • priority changed from minor to Fix available
  • status changed from new to assigned

  Changed 14 months ago by ulidtko

The patch contained garbage, thanks pingou for noticing that.

Attaching corrected and rebased patch.

Changed 14 months ago by ulidtko

follow-up: ↓ 6   Changed 14 months ago by lincoln

Hello there,

I've applied your patch to my tree and I found a small problem. After resetting the terminal, cursor is not being shown again. It's only shown after hitting the Return key. Is this happening with you?

Thanks.

in reply to: ↑ 5   Changed 14 months ago by ulidtko

Replying to lincoln:

I've applied your patch to my tree and I found a small problem. After resetting the terminal, cursor is not being shown again. It's only shown after hitting the Return key. Is this happening with you?

I'm testing it the following way.

  1. Start Guake with this patch applied.
  2. Issue in a terminal cat /dev/urandom, wait few seconds. The whole lot of garbage turns the terminal into a complete mess, and not only with the content, but also with occasionally happened control sequences. So after you stop it with Ctrl+C, typing anything also produces garbage. What a mess!
  3. Use terminal reset. The scrollback buffer is cleared (you can't longer scroll up a bit and see the garbage), and terminal's state is reset to default. You can freely type in commands and receive normal feedback.
  4. But, the shell has no way to know what just did happen. When resetting, terminal doesn't say anything to the program which is running there, so it can't know that it is the time to display the prompt.
  5. And so finally, you should hit enter (that way issuing an empty command to the shell) to make it redraw the propmt.

We could send \n after performing terminal reset to force the shell redisplay the prompt, but that's not so easy because there might be running not a shell. There might be running some ncurses application like htop, and redrawing it should require sending or hitting Ctrl+L; there might be running vim - and still the same, return wouldn't help.

I'm not sure whether this feature may cause misuse or confusion to end users. At least one user requested it, and indeed it might be useful (for example, if you've got the garbage trouble but can't just close the tab because some work still lives there). Most of the users won't miss the feature a lot, imo.

  Changed 12 months ago by ulidtko

  • priority changed from Fix available to minor

When working in a terminal, occasionally something fouls up the session requiring a terminal Reset (or Reset and Clear). You can see an example of this menu item in gnome-terminal in the menubar Terminal -> Reset (or the item Reset and Clear).

There's no immediate way to issue a terminal Reset.

Besides the proposed patch, you *can* easily issue a terminal reset. Consider the reset utility from ncurses-bin package.

Accounting for availability of this flawlessly-working existing tool, I'm changing my mind that we don't need the feature in Guake. It will encumber the GUI and confuse inexperienced users.

  Changed 9 months ago by ulidtko

  • status changed from assigned to closed
  • resolution set to wontfix

Closing as wontfix for reasons explained in 7.

Those who need the feature can use the patch: 0001-add-terminal-reset-feature.patch Download.

Note: See TracTickets for help on using tickets.