3

When issuing commands that require a prompt midway (eg apt install), the prompt immediately aborts, as such:

self@localhost:~$ sudo apt install xterm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
After this operation, 2,023 kB of additional disk space will be used.
Do you want to continue? [Y/n] Abort.
self@localhost:~$

I've heard that this happens because applications are unable to read from stdin. So that's an issue.

I know that for apt, I can pass -y to skip the prompt. What can I do for other programmes that requires prompts but that provide no such option? What could possibly be causing this?

  • A workaround: bash then exit will fix the issue. Still, no idea what causes it. – snazzybouche Aug 07 '19 at 12:01
  • Have you tried to log out and log back in? Reboot and try again? This feels like somebody has got into a bad state and either (or both) of the above should reset it. – NickD Aug 07 '19 at 12:10
  • Which terminal emulator are you using? What happens If you use a different one (e.g. xterm, gnome-terminal, kterm, linux console)? – andcoz Aug 07 '19 at 12:12
  • Could you add the output of ls -l $(tty) ; lsof -V $(tty) in your question ? – X Tian Aug 07 '19 at 12:31
  • What will a simple cat at the prompt do? –  Aug 07 '19 at 13:59
  • I'd love to answer these questions but sadly I have no idea how to reproduce the issue. If it happens again, I'll have a wealth of info. – snazzybouche Aug 07 '19 at 14:13

0 Answers0