Bug 1213844 - guestfish should reset the console on ^Z
Summary: guestfish should reset the console on ^Z
Keywords:
Status: NEW
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-21 12:22 UTC by Richard W.M. Jones
Modified: 2019-10-03 07:52 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2015-04-21 12:22:38 UTC
Description of problem:

If you use 'less' to view a file, and you use ^Z to suspend
the process group, then your terminal will have guestfish
colours (eg. red).

To demonstrate this:

$ guestfish -N fs -m /dev/sda1 
><fs> touch /foo
><fs> less /foo

At this point (inside less) hit Ctrl-Z to suspend the process:

[1]+  Stopped                 guestfish -N fs -m /dev/sda1

Now your terminal will be in red.

guestfish should detect the signal and reset the terminal
colours.

Version-Release number of selected component (if applicable):

guestfish 1.29.36fedora=23,release=1.fc23,libvirt

How reproducible:

100%

Steps to Reproduce:
1. See above.

Comment 1 Maros Zatko 2016-02-01 18:06:22 UTC
I can't seem to reproduce it.
Tried it on F20 and F23 with xfce4-terminal and gnome-terminal.

Comment 2 Richard W.M. Jones 2016-02-01 18:11:52 UTC
I can reproduce it with

libguestfs-tools-c-1.33.7-1.fc24.x86_64

and xfce4-terminal.

Comment 3 Norman Rasmussen 2019-10-03 07:52:18 UTC
I can reproduce with:

# disable any terminal color settings from your shell
PS1='\u@\h:\w\$ '
# configure guestfish prompts (this is directly from the man page)
export GUESTFISH_PS1='\[\e[92m\]><fs>\[\e[91m\] '
export GUESTFISH_OUTPUT='\e[0m'
export GUESTFISH_RESTORE='\e[0m'
export GUESTFISH_INIT='\e[94m'
guestfish
# ctrl-Z

on Debian with:
guestfish 1.40.2
GNOME Terminal 3.30.2 using VTE 0.54.2 +GNUTLS

package versions:
libguestfs-tools 1:1.40.2-2
gnome-terminal 3.30.2-2
libvte-2.91-0 0.54.2-2


Note You need to log in before you can comment on or make changes to this bug.