Bug 138000 - when switching from an X console to a non-X console, something is interpreting the cursor visibility state of the switched-to console as applying to all other consoles if the visibility state of the switched-to console is hidden, but not if the state i...
when switching from an X console to a non-X console, something is interpretin...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Dave Jones
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-03 13:24 EST by Daniel Reed
Modified: 2015-01-04 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-06 00:06:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Daniel Reed 2004-11-03 13:24:34 EST
Version-Release number of selected component (if applicable):
kernel-2.6.9-1.649

How reproducible:
Every time

Steps to Reproduce:
Compile this C code as curs_set, -lncurses:
#include <ncurses.h>

int     main(int argc, char **args) {
        initscr();
        curs_set(atoi(args[1]));
        while (1)
                sleep(100);
        return(0);
}

Run ./curs_set 0 in tty4
Note that the cursor disappears.
Switch to X on tty7
Switch to tty5, note that the cursor is still blinking. Switch to tty4, note
that the cursor is correctly not blinking. Switch to tty5 again and not it is
still correctly blinking.
Switch to X on tty7
Switch directly to tty4. The cursor is correctly not blinking. Switch to tty5.
Note that the cursor is incorrectly also not blinking.

It appears that, when switching from an X console to a non-X console, something
is interpreting the cursor visibility state of the switched-to console as
applying to all other consoles if the visibility state of the switched-to
console is hidden, but not if the state is underscore (./curs_set 1) or block
(./curs_set 2).

Moving tty4 from curs_set 0 back to the default (by hitting ^C while curs_set is
running, flipping to another pty in screen on that terminal, etc.) is enough to
restore all other terminals' cursors (it "breaks the curse" so to speak).
Running ./curs_set 1 on any other terminal is also enough to break the curse
(without affecting tty4's hidden state).
Comment 1 Daniel Reed 2008-08-02 16:16:37 EDT
The original summary for this bug was longer than 255 characters, and so it was truncated when Bugzilla was upgraded. The original summary was:

when switching from an X console to a non-X console, something is interpreting the cursor visibility state of the switched-to console as applying to all other consoles if the visibility state of the switched-to console is hidden, but not if the state is underscore or block

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