From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.43) id 1E9hAo-0005n3-Sd for garchives@archives.gentoo.org; Mon, 29 Aug 2005 10:47:31 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.4/8.13.4) with SMTP id j7TAiuxO028668; Mon, 29 Aug 2005 10:44:56 GMT Received: from mail.pnpitalia.it (85-18-21-122.ip.fastwebnet.it [85.18.21.122]) by robin.gentoo.org (8.13.4/8.13.4) with ESMTP id j7TAhEYq032223 for <gentoo-dev@lists.gentoo.org>; Mon, 29 Aug 2005 10:43:14 GMT Received: from localhost (localhost [127.0.0.1]) by mail.pnpitalia.it (Postfix) with ESMTP id ED6CF7AD6F8 for <gentoo-dev@lists.gentoo.org>; Mon, 29 Aug 2005 12:45:07 +0200 (CEST) Received: from mail.pnpitalia.it ([127.0.0.1]) by localhost (db [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 16133-02 for <gentoo-dev@lists.gentoo.org>; Mon, 29 Aug 2005 12:45:07 +0200 (CEST) Received: from [192.168.4.153] (host-4-153.pnpitalia.it [192.168.4.153]) by mail.pnpitalia.it (Postfix) with ESMTP id 80CA57AD6F6 for <gentoo-dev@lists.gentoo.org>; Mon, 29 Aug 2005 12:45:07 +0200 (CEST) Message-ID: <4312E71F.2080603@gentoo.org> Date: Mon, 29 Aug 2005 12:44:47 +0200 From: Francesco R <vivo@gentoo.org> User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en Precedence: bulk List-Post: <mailto:gentoo-dev@lists.gentoo.org> List-Help: <mailto:gentoo-dev+help@gentoo.org> List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@gentoo.org> List-Subscribe: <mailto:gentoo-dev+subscribe@gentoo.org> List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org> X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Re: Fixing the TERM mess References: <20050821220505.4efbaff2@snowdrop.home> <1124661626.13706.13.camel@sponge.fungus> <20050821231356.050432ce@snowdrop.home> <46059ce1050821154310568d72@mail.gmail.com> <20050822000800.7c366b4f@snowdrop.home> In-Reply-To: <20050822000800.7c366b4f@snowdrop.home> X-Enigmail-Version: 0.92.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at db X-Archives-Salt: 124434b7-3c54-45aa-8273-8af648bcf8a9 X-Archives-Hash: fa73585b1c7ac95e7bb0a0d9370de31b Ciaran McCreesh wrote: >On Sun, 21 Aug 2005 18:43:54 -0400 Dan Meltzer ><parallelgrapefruit@gmail.com> wrote: >| putty pretends to be an xterm and dies at xtermcontrol --get-bg... I >| can test other things if you need.. just give me some idea :) > >Thanks. The other useful one is to see whether it does 256 colours >properly like real xterm does. The following bash script, when run with >'256' as its argument, should look the same as it does when run under >a real xterm. > > >#!/usr/bin/env bash ># vim: set sw=4 sts=4 et : > >[[ -z "${1}" ]] && cat <<END && exit 1 >Usage: ${0} [count] > >count should usually be either 88 (rxvt-based terminals) or 256 >(xterm-based terminals). >END > >echo -n " 0: " >for (( a = 0 ; a < ${1} ; a++ )) ; do > echo -n -e "\e[38;5;${a#0}m#\e[48;5;${a#0}mX\e[0;0m " > [[ -z "${a##*9}" ]] && echo -n -e "\n\e[0;0m$(printf '%3d' ${a} ): " >done >echo -e "\e[0;0m" ; echo > > > Probably putty use "xterm" as default instead to be usable on most configurations. I've found that putty is the best (free on windows) "linux" term emulator around. As a consequence all my win boxes use it with the following settings: Terminal -> Keyboard -> The Functions keys and keypad -> Linux Connection -> Data -> Terminal-type string -> "linux" with this settings the "xtermcontrol --get-bg" output this: xtermcontrol: TERM=linux: probably not xterm variant The script you posted here has good results for $1 = 256 for putty version 0.58 . For version 0.56 of putty the for loop need to start from "13" instead of "0" or it screwed up things at the extend that a "reset" need to be run. Additionally the color support is limited to 16 . -- gentoo-dev@gentoo.org mailing list