Re: Write to a console

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 13, 2002 at 02:06:10PM -0400, israel fdez. wrote:
> My question isn't about kernel programming but is abour Linux programming.
> I need a daemon to write to the avtive console, and I need more, I need to 
> wait for a user answer, but I don't know how to find the right one, I've 
> tried writing to /dev/conole and /dev/tty0 but no results.

Israel, I'm afraid you may have incompatible goals with the setups of
most Linux boxes. Consider that consoles aren't needed on many machines.
Consider that on many machines, serial is the only console available.
Other systems use vga console, others use framebuffer console, and many
boot into X in a real hurry, masking whatever console used to be there.

If you want to write to the physical console, your best bet may be to
use syslog, as configured by syslog.conf(5). If you really want
interactive responses, why not just use the stdin, stdout, and stderr
that your program was passed when it was exec()ed? That will work no
matter if the program was started on a console, over telnet, or ssh.

-- 
http://sardonix.org/

Attachment: pgp00077.pgp
Description: PGP signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux