by JamesMcMinn · 11y ago · 0 comments
Put this in your .bashrc file:
function talk { echo "$USER: $@" >> talkfile; }
then run: tail -f talkfile &
The & puts tail into the background so it continues running, and "talkfile" needs to be a file that both of you have write access to.You can both communicate simply by using the talk function like any other bash command:
talk whatever you want and it'll be written to talkfile
This works on Linux, not sure about Mac.It's nice because it records what you say, so there's no need for the other person to be logged in to get your message, and you get a printout of the last few lines of conversation when you "login" (run the tail -f command). There's nothing extra to install either.
(edit, apparently say is already installed on OS X, so I renamed the function "talk")
https://wiki.archlinux.org/index.php/Talkd_and_the_talk_comm...
Make sure to "mesg y" before :-)
We have a 'jump' server, used to ssh into remote boxes, a truly public space with numerous users, such as myself, logged in poking around looking for the right hostnames etc. Having just learned of the wall command, I alt-tabbed to a session and thinking it fun to give a whirl. My message?
"Whats up playas"
A brief reprieve. But ah the word!
"Yo."
So came the flurry. A new message. And another. And another. Messages scratched across the server wall as though all the company had congregated outside this massive sleek black edifice where our words so glowed. I'm sure even some HR slavers or sales kin made the trek through the Terminal Wastes to bear witness to this spectacle. It was our digital Wailing wall except our shrieks were laughter. We were posting ASCII art by the time a sysadmin stepped in and put a stop to our revelry. Anymore posting would result in bans, temporary of course, but exile nonetheless.
Silence.
Then the CEO:
"Sup."
(Sorry)
Just to note, on the Mac there's already a /usr/bin/say, which invokes the text-to-speech. So if you don't create your function, SSHing to the friend's Mac and typing 'say whatever you want' will have an interesting but probably not desired effect :) I'll admit to having used this on a friend's machine once or twice for amusement.
(And invoking 'say' invokes the TTS even if you SSH in as a user other than the one logged in to the main GUI. I'm pretty sure this wasn't always the case; not sure when it changed.)
Been this way since at least 2008 - I remember doing this back in school when bored in class.
echo hello | festival -b --tts man say function talk { while read line ; do echo "$USER [`date +%T`]: $line" >> $talkfile ; done }