[aklug] Re: terminal types and curses programming

From: Shane R. Spencer <shane@bogomip.com>
Date: Sat Jan 24 2009 - 09:49:12 AKST

Or.. be cool and stuff and do the diagnostics like a pro :)
1.) use strace and -o to poop a file of all system calls a program uses.

spencersr@undertow:~$ strace -o traceofevil nano

2.) .... exit out of nano or whatever ....

3.) use grep, search for the term name or if you're know what you're
looking for ('term') use that.

spencersr@undertow:~$ cat traceofevil | grep term
stat("/home/spencersr/.terminfo", 0x7fffcc1d1390) = -1 ENOENT (No such
file or directory)
stat("/etc/terminfo", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
access("/etc/terminfo/x/xterm", R_OK) = -1 ENOENT (No such file or
directory)
stat("/lib/terminfo", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
access("/lib/terminfo/x/xterm", R_OK) = 0
open("/lib/terminfo/x/xterm", O_RDONLY) = 3
read(3, "\32\1\34\0\35\0\17\0\235\1&\5xterm|X11 terminal e"..., 4097) = 2244

4.) Rejoice!
Shane R. Spencer wrote:
> /usr/share/terminfo
>
> Christopher Howard wrote:
>> Would you guys please look at this question I posted on-line:
>>
>> http://www.linuxquestions.org/questions/programming-9/curses-terminal-application-699469/?posted=1#post3419418
>>
>

-- Attached file included as plaintext by Ecartis --
-- File: signature.asc
-- Desc: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkl7YqkACgkQXK/vGhypreLoagCdGeNpJbMY3FYumWBrXpupZOtt
rHgAoImzVGQTQbNKVeghb9aPSJ8BO5c/
=BUj9
-----END PGP SIGNATURE-----

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Sat Jan 24 09:49:23 2009

This archive was generated by hypermail 2.1.8 : Sat Jan 24 2009 - 09:49:23 AKST