PDA

View Full Version : Display Device file



bubu
21st July 2004, 03:37 AM
:confused: Hi I was just wondering if anybody had come across this, I'd be intersted to find out how to do it.

I know that the device driver for my monitor resides in /dev/ but how do I know which one it is?

Then knowing this isn't there some way to write to this device, either with a bit of C code or echo statement. What i had seen before was someone was able to write to someone elses display on the network by doing somethings along the lines of

echo "Follow the white rabbit" > /dev/(monitor device)

Well if any body know I would love to hear

Jman
21st July 2004, 12:27 PM
No need for C code, just a little scripting.

The device files are under the /dev/pts directory. These are the virtual consoles people were worried just kept increasing. Just direct the output of something to the relevant pts. (You can get this with the w command.)

For example:
echo "Hello, World" | /dev/pts/37

This also works with text logins. (In X use <Ctrl><Alt><F1> to get one.) Direct the output to /dev/ttyx where x is the tty number you got from w. I think you need to be root for permission.

The wall command is also fun. It sends messages to everybody.