Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 07-17-2008, 02:35 PM   #1
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Minicom via ttyS0: Please help with $TERM, $MINICOM, colors, mouse/gpm.

Aaargh! Frustrations with Minicom as a serial terminal application!

Basically it works. But that's it. And it worked better half an hour ago, but I have something borked somewhere on one of the machines.

First, I'll say that I have read and reread the man pages for mc, GPM, Minicom, Termcap, and Terminfo, and I am no further ahead.

Termcap/Terminfo is adding to my confusion.

I have Minicom on the OLD computer (Slackware based OS), connected to the NEW computer (Slackware) via ttyS0. It logs in fine, and I have been trying to set up proper rendering of the character set and color usage, using Midnight Commander via serial, as the test of character set & colors.
Until 1/2 hour ago, I was getting happier, but now I am back at less than square one, with no explanation.

AFAIK, the only thing(s) I have been fiddling with are configuration options in Minicom itself, and the $TERM and $MINICOM variables, all on the OLD machine.
I am logging in as USER over ttyS0, not as root.

---I had managed to get colors working in mc over ttyS0.
---mc would run fine, but the characterset (used by curses?) that makes up the menu boxes, outlines, etc, was all funny, with foreign letters and all that.
---mc works perfectly on the NEW machine.

---mc still works perfectly on the NEW machine.
---mc will not run via ttyS0 unless I use the -d switch to disable the mouse; otherwise I get an error message like "gpm: screen dimensions not set. assuming 80x25" and the mc process hangs instantly so I need to kill it on the NEW machine.
---the characterset is still screwed up.
---colors do work via ttyS0, if I do an `ls` or whatever.

I googled "minicom" plus the gpm error, and got a grand total of 5 hits (wow!) and none of them helped.


1) Does anyone know what/how/whatever sends the screen dimension over to the host machine when needed? I really do not care if the mouse works or not via ttyS0, but I WOULD like to know what happened to it (and on which machine) so that I have to forcibly disable it now when I run MC.
2) what role does Termcap/Terminfo play in this setup, both on the host and client machine?
3) Is it even *possible* to get a curses-based application like MC to properly render via ttyS0 using Minicom?
4) Does anyone even use Minicom for anything like this, and does it work for you with regards to the above problems? If so, how have you got it configured?
5) What about the $TERM/$TERMINFO variable? AFAIK, the default for the former is either 'linux' or 'xterm', and the latter I have no clue. So what role if any does this play in my situation?

---For the most part, I use UTF-8 on my machine(s).
---$TERM='xterm' on both machines.
---Minicom is the newest version, 2.3

---$MINICOM="-l -L -w -c on -a on"
which means:
-literal; assume screen uses non-IBM-PC characterset
-don't assume screen uses ISO8859
-wrap lines
-colors ON
-attributes (reverse/highlight) ON

and this worked best, till I logged and/out or did something unknown, and next I logged back in and the problems were apparent, namely the gpm problem that appeared out of nowhere, and the ongoing characterset/curses rendering problems.

Please help!
Old 07-18-2008, 08:26 AM   #2
Senior Member
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
What does 'xterm' default to? Did you try an explicit terminal type like xterm-color or ansi (color by default)?

Are you connecting minicom-to-minicom, or are you running something like 'mgetty' to provide a connection? I get the impression that you're doing minicom-minicom.

1. the 'xterm' terminal type has mouse support - you may want to switch to a terminal type without mouse stuff

2. on the remote machine, '$TERM' will affect data sent over the line; on your machine you need to match '$TERM' if you're going to interpret the incoming serial data correctly. "termcap" is simply "Terminal Capabilities" - what special sequence to use for 'backspace', color support, screen size, etc. "terminfo" files contain a list of the terminal capabilities of different types of terminals.

3. I never had problems with minicom, but I never was interested in the color schemes. Minicom claims to have full support for "ansi" and "vt100", so you can try setting the TERM to 'ansi' rather than 'xterm'.

4. I usually use minicom for testing and never used the colors. In a few situations I've set up "pppd" instead so I can just use tools like "ssh" over the serial line.

5. The TERM variable is there to let programs which run know what their terminal type is (for the few programs that actually care). Tools like "reset" are sensitive to the TERM value.
Old 07-19-2008, 08:01 AM   #3
LQ Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Original Poster
Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Hi Pinniped,

Thanks for the feedback.
I can only reply briefly ATM as I am at work, but:

The serial connection is Minicon-to-agetty, not minicom-minicom.

I will investigate your suggestion of setting the TERM variable on the client machine, but also, I would rather use SSH as you mention. This minicom thing is for the birds methinks

I use PPPD for my dialup connection,but I will also look into setting it up on the serial port (will this work?) as I have no NIC in the old machine (yet).

Thanks again; Cheers!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Convert TERM script to Minicom 2.1 oharek Linux - Software 0 12-19-2005 09:22 AM
minicom flensplop Linux - Newbie 2 08-30-2004 09:21 PM
using minicom Pico_01 Linux - General 5 02-12-2004 04:01 AM
Minicom /dev/ttyS0 locked zmaint Linux - Software 4 12-23-2003 05:03 PM
Minicom in /dev/ttyS0 Luis GUSTAVO Linux - Software 0 07-31-2003 06:42 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:27 AM.

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