Issue
I have a very simple bash script saved in my www folder in Apache directory, which prints "website hit" whenever the php script is called.
The problem is i want that print to print on the local screen i got plugged in with the HDMI. currently is not printing anywhere, i think its because its printing it somewhere else.
I did try everything now and i cant figure out how to get the bash to echo to the user logged in locally.
Is there anyway i can print to a specific logged in user which is local?
Thanks in advanced
Solution
To write to a user, use the talk
command. It has a man page: man talk
is likely to be helpful.
If you want to write to TTY1 regardless of which user is logged in, echo "some text" >/dev/tty1
. (Obviously, you'll need to ensure that the user running the web server has write permissions to the device).
Answered By - Charles Duffy