How to force input from tty

Posted by ZelluX on Stack Overflow See other posts from Stack Overflow or by ZelluX
Published on 2010-05-05T08:24:18Z Indexed on 2010/05/05 8:28 UTC
Read the original article Hit count: 254

Filed under:
|
|
|

I'd like to write a program which reads user input only from tty, instead of redirected stdin pipes, like passwd and ssh do. Is there any approach?

Many thanks

© Stack Overflow or respective owner

Related posts about c

    Related posts about tty

    • How to mount a blu-ray drive?

      as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
      Maybe it is for the best to close this question. This has nothing to do with a bluray drive in general anymore. Probably a hardware defect. I will try to test it with a windows system and different cables again... Thx so far. I have a bluray/dvd/cdrom drive with SATA. Ubuntu wont find it under /dev/sd wodim… >>> More

    • Fedora, ssh and sudo

      as seen on Server Fault - Search for 'Server Fault'
      I have to run a script remotely on several Fedora machines through ssh. Since the script requires root priviliges, I do: $ ssh me@remost_host "sudo touch test_sudo" #just a simple example sudo: no tty present and no askpass program specified The remote machines are configured in such a way that… >>> More

    • TTY Resolution in Xubuntu 9.10

      as seen on Super User - Search for 'Super User'
      I've exhausted my ability to search through Google for this, so I'm giving it a go here. What I'm trying to do is increase the resolution (or decrease the font size) in the TTY terminals. Xubuntu 9.10 uses GRUB2, and everywhere I can find directs me to edit the /etc/default/grub File in order… >>> More

    • Bricked - tty mode incorrect, terminal disabled, unity broken

      as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
      After installing VirtualBox unity seems to be uninstalled.. Launcher and task bar are missing. I can't access terminal from the normal ctrl alt T command. I tried logging into TTY mode but it says my login is incorrect. I am trying to login with my normal ubuntu username and password. I have searched… >>> More

    • How do I get my blacked out ttys back?

      as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
      Original Question: After I replaced my Ubuntu 10.10 with 11.04 all I get when I Strg+Alt+F1-6 into a tty is a black screen. Also when I boot there's a while of black screen after grub2 menu is displayed. Then until just before gnome starts it stays black. I have an Nvida Geforce Quadro FX 770M on… >>> More