Linux - NewbieThis forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I'm actually messing with HTTP requests and all that stuff ( I'm coding some C program about it, that's why ) and, when something doesn't work, I use the telnet client to test my HTTP requests, server responses, etc.
Anyway, the problem is telnet won't let me edit my input should I make any mistake ( backspace is interpreted as '^H' rather than erasing characters ) and I know this can be changed since I used Kubuntu before switching to Slackware and, on the former, telnet actually behave 'as in cooked mode'.
So, I searched the web and the telnet(1) manpage where I found that I could create a .telnetrc file in my home directory in which to write commands ( such as 'mode line' command ). I am using the same /home partition as my former Kubuntu system and there are no .telnetrc file anywhere to be seen ( I even searched the whole Kubuntu / partition via 'find /media/disk -iname "*telnet*rc*"' ). Therefore, I created a simple .telnetrc file (based on the manpage) which looks like this:
DEFAULT
mode line
Still, my problem is not fixed. Also, I recently found out another program I just forgot the name behaves exactly like telnet ( that is in a 'raw mode' like way ) making me think this issue might be system-wide rather than telnet specific.
Long story short, I would like to be able to edit my telnet input lines just like the xterm prompt actually behaves.
P.S.: If you don't understand something in this post, feel free to ask, I'll do my best to reformulate ( English is not my main language ).
I didnt read through your complete post, but of what I read you could simply try executing bash after you connect to the server.
this should remove the ^H problem.
Ah, forgot to say, I'm not using telnet to connect like one would do using ssh. Therefore there are no login and/or password required.
An example of one of my telnet session would be:
$ telnet www.linuxquestions.org 80
Trying 75.126.162.205...
Connected to www.linuxquestions.org
Escape character is '^]'.
GET /index.html HTTP/1.1<CR><LF>
Host: www.google.com<CR><LF>
Connection: Close<CR><LF>
<CR><LF>
<CR><LF>
[where <CR><LF> should be replaced by pressing the 'ENTER' key]
[Below is a snippet of what the server responded:]
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.