Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Printing text to console/tty6 from user script

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
electrolux
Posts: 37
Joined: 2015-03-16 23:48

Printing text to console/tty6 from user script

#1 Post by electrolux »

Is this just silly:

/etc/inittab

Code: Select all

#6:23:respawn:/sbin/getty 38400 tty6
6:23:respawn:/root/stream_data_to_tty6.sh 38400 tty6
/root/stream_data_to_tty6.sh

Code: Select all

#!/bin/bash
cat /home/electrolux/bin/msfifo > /dev/tty6
And in my music playing script there's a line

Code: Select all

cat /mnt/msrd/playing.txt > ~/bin/msfifo
playing.txt contains metadata from the internet radio stream I am playing, usually artist/track or show information. I'm trying to display the metadata on the monitor even if X isn't running (pynotify is used when X is running).

I guess this is risky 'cause of handling data off the internet as root, but it does work! Is there another neat hack to do this, or a better program?

I guess I could use tail -f on playing.txt with this arrangement, too. No idea if it'd be better in any ways.

Cheers, 'lux

PS If this isn't just nuts, how can the machine switch to tty6 at boot?

Post Reply