LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Tags used in this thread
Popular LQ Tags , , , , ,

Reply
 
Thread Tools
Old 01-19-2009, 11:43 PM   #1
Vhann
LQ Newbie
 
Registered: Nov 2008
Location: Quebec, Canada
Distribution: Slackware 13.0
Posts: 23
Thanked: 1
Slackware 12.1 problem: raw mode telnet client ( xterm )


[Log in to get rid of this advertisement]
Hi all,

So, here's my problem:

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 ).

Thank you for your attention.
Regards,
Vhann
Vhann is offline  
Tag This Post , , , , ,
Reply With Quote
Old 01-20-2009, 12:15 AM   #2
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,173
Thanked: 6
I didnt read through your complete post, but of what I read you could simply try executing bash after you connect to the server.
Quote:
login:test
password:test
$bash
bash-3.01$
this should remove the ^H problem.
w3bd3vil is offline     Reply With Quote
Old 01-20-2009, 01:03 AM   #3
Vhann
LQ Newbie
 
Registered: Nov 2008
Location: Quebec, Canada
Distribution: Slackware 13.0
Posts: 23
Thanked: 1

Original Poster
Quote:
Originally Posted by w3bd3vil View Post
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:]

HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Tue, 20 Jan 2009 05:59:08 GMT
Content-Type: text/html; charset=iso-8859-1
Connection: keep-alive
Location: http://www.linuxquestions.org/index.php
Vary: Accept-Encoding
Content-Length: 247
[etc.]

Regards,
Vhann
Vhann is offline     Reply With Quote
Old 01-20-2009, 04:12 PM   #4
Vhann
LQ Newbie
 
Registered: Nov 2008
Location: Quebec, Canada
Distribution: Slackware 13.0
Posts: 23
Thanked: 1

Original Poster
Up, thank you
Vhann is offline     Reply With Quote
Old 04-13-2009, 08:04 PM   #5
Vhann
LQ Newbie
 
Registered: Nov 2008
Location: Quebec, Canada
Distribution: Slackware 13.0
Posts: 23
Thanked: 1

Original Poster
Just remembered I created this one thread quite some time ago from now.

In case someone runs into the same problem, here's a link that helped me fix my problem:
http://www.ibb.net/~anne/keyboard.html

Regards,
Vhann
Vhann is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in getting telnet client prompt by pressing Escape character( ctrl -] ) Prassanta Suse/Novell 0 01-23-2007 01:33 AM
Difference between Telnet and Raw Telnet?? bh5687 Linux - Newbie 1 03-30-2006 11:25 AM
Raw data telnet bh5687 Linux - Newbie 1 03-23-2006 09:56 AM
Raw mode keyboard input vivekagrawal82 Linux - Software 1 07-02-2005 11:11 PM
Client for 'raw telnet mode' like PuTTY wies Linux - Networking 1 03-30-2005 11:20 AM


All times are GMT -5. The time now is 06:41 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration