clear_console should be moved to ncurses-bin
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bash (Ubuntu) |
Triaged
|
Low
|
Unassigned |
Bug Description
clear_console does not work on a pty (xterm, ssh) without being root.
sk@nexus(~)> clear_console
clear_console: terminal is not a console
sk@nexus(~)> strace clear_console 2>&1 | grep open\(
open("/
open("/
open("/
open("/
open("/dev/tty", O_RDWR) = 3
open("/dev/tty0", O_RDWR) = -1 EACCES (Permission denied)
open("/dev/tty0", O_RDONLY) = -1 EACCES (Permission denied)
open("/dev/tty0", O_WRONLY) = -1 EACCES (Permission denied)
open("/
open("/
open("/
sk@nexus(~)> ll /dev/tty0 /dev/console
crw------- 1 root root 5, 1 2006-04-11 01:09 /dev/console
crw-rw---- 1 root root 4, 0 2006-04-11 01:09 /dev/tty0
sk@nexus(~)> tty
/dev/pts/2
sk@nexus(~)> ll /dev/pts/2
crw--w---- 1 sk tty 136, 2 2006-04-11 02:06 /dev/pts/2
Is clear_console supposed to be working in a pty? If yes, then it fails at that. If no, I'm still a little puzzled why this hack was added to the shell package and not /sbin/getty (or /usr/bin/clear?).
Changed in bash: | |
status: | Confirmed → Triaged |
Changed in bash (Ubuntu): | |
status: | Incomplete → Triaged |
Sebastian Kapfer schrieb:
> Is clear_console supposed to be working in a pty?
no.
> If yes, then it fails at that. If no, I'm still a little puzzled why
this hack was added to the shell package and not /sbin/getty (or
/usr/bin/clear?).
yes, it could be added to the ncurses-bin package.