Re: sending a message to the active console
How can I send a message to the active console? For example, when a cdrom is mounted, mount (or the kernel) reports 'changing media type...', etc. to the active console - if you switch consoles, the text will finish on the new active console. Also, will this type of message appear in xconsole? If not, how can I make it appear in both? The reason I'm asking is because I want to make a simple script to run in the background and send caller-id messages to the console. echo Hello, world /dev/console Thanks --- Paul Miller [EMAIL PROTECTED], finger for public PGP key -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] . -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
sending a message to the active console
How can I send a message to the active console? For example, when a cdrom is mounted, mount (or the kernel) reports 'changing media type...', etc. to the active console - if you switch consoles, the text will finish on the new active console. Also, will this type of message appear in xconsole? If not, how can I make it appear in both? The reason I'm asking is because I want to make a simple script to run in the background and send caller-id messages to the console. Thanks --- Paul Miller [EMAIL PROTECTED], finger for public PGP key -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: sending a message to the active console
Paul Miller [EMAIL PROTECTED] writes: PM How can I send a message to the active console? For example, when PM a cdrom is mounted, mount (or the kernel) reports 'changing media PM type...', etc. to the active console - if you switch consoles, PM the text will finish on the new active console. I believe the kernel can do this with the printk() call. PM Also, will this type of message appear in xconsole? If not, how PM can I make it appear in both? It appears in xconsole, iff the X session is on the currently active VC. PM The reason I'm asking is because I want to make a simple script to PM run in the background and send caller-id messages to the console. Look at the write(1) and wall(1) utilities; these will let you do this without kernel-level hacking. -- _ / \ The cat's been in the box for over | David Maze | 20 years. Nobody's feeding it. The | [EMAIL PROTECTED] |cat is dead. | http://donut.mit.edu/dmaze/ | -- Grant, on Schroedinger's Cat \_/ -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: sending a message to the active console
My goodness Dave! What are they teaching you guys at MIT these days! David Z. Maze wrote: Paul Miller [EMAIL PROTECTED] writes: PM How can I send a message to the active console? For example, when PM a cdrom is mounted, mount (or the kernel) reports 'changing media PM type...', etc. to the active console - if you switch consoles, PM the text will finish on the new active console. I believe the kernel can do this with the printk() call. Yes, but it only goes to log files/terminals because klogd is running. PM Also, will this type of message appear in xconsole? If not, how PM can I make it appear in both? It appears in xconsole, iff the X session is on the currently active VC. Here's the scoop. Note: chilin$ ls -l /dev/xconsole prw-r--r-- 1 root root 4083 Jan 22 07:28 /dev/xconsole /dev/xconsole is a unix pipe. What is written into it can be read. The xconsole program simply opens this file for reading and prints whatever comes through it. You can configure syslog to write stuff to it. Anyone however may write to it who has appropriate permissions (in my case, only root). Try this (as root): echo hello, world /dev/xconsole It's as easy as that. PM The reason I'm asking is because I want to make a simple script to PM run in the background and send caller-id messages to the console. Look at the write(1) and wall(1) utilities; these will let you do this without kernel-level hacking. No need for kernel-level hacking, no need for write or wall. Wanna write to a VT? echo hello, world /dev/tty0 All write does is track down what tty a user is logged in on and writes to that terminal. If that's the functionality you want you can use that program, otherwise just write to the terminal device yourself. -- Jens B. Jorgensen [EMAIL PROTECTED] -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: sending a message to the active console
man console (goes along with tty0) Brandon - Brandon Mitchell [EMAIL PROTECTED] We all know linux is great... it PGP: finger -l [EMAIL PROTECTED] does infinite loops in 5 seconds Phone: (757) 221-4847 --Linus Torvalds -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .