Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A script to replace line breaks in 'talk' UNIX
I don't recall when it stopped working, if it ever did work, but talk seems to be annoyingly broken in Panther. I like to ssh home from work and gossip securely with my sweetie-pie, who does the same. I have several good reasons to avoid the "secure" extensions to the various IM clients, so the best option for us is to open a remote shell on my G5 at home and start a "unix talk" session. Unfortunately, Panther's talk seems unable to deal with line breaks; it prints ^M instead of a carriage return/new line sequence (CR/NL). Control-J will force a CR/NL, but this is quite unsatisfactory. I fooled around with stty options for awhile until I gave up and wrote the following expect script:
#!/usr/local/bin/expect

spawn /usr/bin/talk $argv
interact "\r" { send "\n" }
I named it "talk", placed it in my path, made it executable, and ran rehash (I use tcsh, not bash). This fix completely cleared up the problem. I'm not sure whether expect is now part of the standard distribution -- it's in /usr/bin on my G5 and in /usr/local/bin on my G4, both of which have Panther -- but it's easily available in binary package form from many sources.

[robg adds: I can't get talk to work on my Panther boxes; I followed the instructions in an earlier hint to enable it, but it fails both before and after editing the inetd.conf file. As such, I can't test this one...]
    •    
  • Currently 1.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[5,887 views]  

A script to replace line breaks in 'talk' | 6 comments | Create New Account
Click here to return to the 'A script to replace line breaks in 'talk'' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to replace line breaks in 'talk'
Authored by: larkost on Apr 12, '04 11:58:35AM

You might want to try enabling talk with xinetd rather than inetd. inetd has been depreciated in 10.3.



[ Reply to This | # ]
A script to replace line breaks in 'talk'
Authored by: sjk on Apr 12, '04 12:20:34PM
It's deprecated, you meant. :-)

[ Reply to This | # ]
A script to replace line breaks in 'talk'
Authored by: clith on Apr 12, '04 12:43:54PM
To enable "talk", sudo service start talk. Not sure if this enables it the next time you boot too or not. In olden days you had to use chkconfig for that.

[ Reply to This | # ]
starting talk...
Authored by: oink on Apr 14, '04 11:54:39PM

Could it be "service ntalk start"?

Tried all the others but kept getting error messages. This one starts a process. However, I still couldn't get talk to work at all.



[ Reply to This | # ]
A script to replace line breaks in 'talk'
Authored by: bjackson on Apr 12, '04 03:42:46PM

You only have to enable talkd if you want people on remote machines to connect to you from their machines:

talk brian@briansmachine.com

If you are both on the same machine (such as the poster describes) you just have to type:

talk brian

My install of Panther bottomed out with "talk: wendigo: Unknown host"

wendigo is the name of my machine. A quick edit of the /etc/hosts file did the trick. Make sure your entry for localhost looks like:

127.0.0.1 localhost wendigo

to be consistent I also put it in for IPV6:

::1 localhost wendigo

of course replace wendigo with your hostname :)

Brian

---
--
Brian Jackson
b.k.jackson@verizon.net
http://www.brian-jackson.net



[ Reply to This | # ]
A script to replace line breaks in 'talk'
Authored by: cryptlib on Apr 15, '04 06:08:11PM

To enable talk, I just uncommented "ntalk" from /etc/inetd.conf, and perhaps rebooted or sent something a hangup signal. I'm not so worried about the security of doing this, 'cause I have a little Netgear natbox/firewall preventing anyone from connecting to the talk port from outside my home network, and I trust my honey to use Ssh responsibly

---
% kill -H -1



[ Reply to This | # ]