From owner-freebsd-questions@FreeBSD.ORG Fri May 29 08:29:06 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FE9610656E5 for ; Fri, 29 May 2009 08:29:06 +0000 (UTC) (envelope-from lars@larseighner.com) Received: from mail.team1internet.com (mail.team1internet.com [216.110.13.10]) by mx1.freebsd.org (Postfix) with ESMTP id 0D4658FC15 for ; Fri, 29 May 2009 08:29:05 +0000 (UTC) (envelope-from lars@larseighner.com) Received: by mail.team1internet.com (Postfix, from userid 12346) id 4099316BDA2; Fri, 29 May 2009 03:29:05 -0500 (CDT) Received: from larseighner.com (unknown [216.110.13.70]) by mail.team1internet.com (Postfix) with SMTP id 590B616BDA3; Fri, 29 May 2009 03:29:02 -0500 (CDT) Received: by larseighner.com (nbSMTP-1.00) for uid 1001 lars@larseighner.com; Fri, 29 May 2009 03:25:47 -0500 (CDT) Date: Fri, 29 May 2009 03:25:45 -0500 (CDT) From: Lars Eighner X-X-Sender: lars@debranded.6dollardialup.com To: Graham Bentley In-Reply-To: <024FF181E9F1495DB6B3C4AC45B4CFC0@main> Message-ID: <20090529021521.Q35417@qroenaqrq.6qbyyneqvnyhc.pbz> References: <20090527221613.98D351065845@hub.freebsd.org> <024FF181E9F1495DB6B3C4AC45B4CFC0@main> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-272298827-1243585545=:35417" X-Sanitizer: Anomy and SpamAssassin mail filter - see http://www.6dollardialup.com/support/spaminfo.html Cc: freebsd-questions@freebsd.org Subject: Re: UK Currency Symbol in 7.2 Console - A Question actually about FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2009 08:29:06 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-272298827-1243585545=:35417 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Fri, 29 May 2009, Graham Bentley wrote: > Hello All, > > Im still struggling with this one and have tried all I could find > by Googling lists and forums. @ and " keys are fine as are > every other key apart from =A3 symbol. Can anyone suggest > ways to track this down. At 'Login:' I can actually get =A3 but > after loging I get a beep? I have tried various fonts and maps > to no avail. > > Any suggestions / pointers, even an RT[URL]FM or useful > flame appreciated. All these remarks apply to the console (and virtual ttys) not xterm or other terminals in X. First, you must have a font with =A3 in it. It seems you do if you ever se= e this character, but for the record your most likely choices are iso-8859-1 and iso-8859-15 (also has the Euro symbol). It is best to load these at boot in three sizes: These lines in /etc/rc.conf font8x14=3D"iso-8x14" font8x16=3D"iso-8x16" font8x8=3D"iso-8x8" will load iso-8859-1 and these font8x14=3D"iso15-8x14" font8x16=3D"iso15-8x16" font8x8=3D"iso15-8x8" will load iso-8859-1 There are applications that will help you to edit a font, but that is beyon= d the scope here. remember, in /etc/rc.conf, when the same item is set multiple times, the last entry wins, so it is best to read this file from the bottom and add at the bottom. (Do not edit the master file in /etc/defaults.) You can see what fonts are on your system and try one out temporarily using the vidfont command. Second you must set your TERM variable to something compatible. You do thi= s in your shell login scripts. You can do this for everyone using the same shell in /etc or per user in the dot file in the home directory of the user= .=20 Consult the man page for your particular shell. This works for bash in /etc/profile or in the user's .profile: TERM=3D'cons25l1' export TERM cons25l1 is for an 80x25 console using iso-8859-1. It also appears to work for iso-8859-15. If you have a different number of characters (than 80) or a different number of lines (than 25), select something appropriate from /usr/share/misc/termcap (there may be symbolic link to it from /etc/termcap). DO NOT EDIT THE TERMCAP. Finally you need to select an appropriate keyboard from /usr/share/syscons/keymaps and be sure it is entered in /etc/rc.conf. Your main choices would seem to be uk.iso-ctrl.kbd and uk.iso.kbd. Both of these have =A3 at shift-3 (above the letter keys, not on the numeric keypad). You can try out keyboards with the keymap command. this should be in your /etc/rc.conf keymap=3D'uk.iso.kbd' (or the other one, if you choose it. Remember, the LAST assignment to keymap in /etc/rc.conf wins) Keymaps are exceeding easy to edit in FreeBSD, which is one of the reasons = I use FreeBSD instead of one of the many linux distros I have tried. If you want to give it a try, I suggest you back it up first. cp uk.iso.kbd uk.iso.kbd.dist will do. Then to use your edited map enter keymap=3D'uk.iso.kbd' Here are a few lines from uk.iso.kbd: # alt # scan cntrl alt alt cntrl lock # code base shift cntrl shift alt shift cntrl shift state # ------------------------------------------------------------------ 000 nop nop nop nop nop nop nop nop O 001 esc esc esc esc esc esc debug esc O 002 '1' '!' nop nop '`' '`' nop nop O 003 '2' '"' nul nul '@' '@' nul nul O 004 '3' 163 nop nop '#' '#' nop nop O 005 '4' '$' 164 164 '4' '$' nop nop O 006 '5' '%' nop nop '5' '%' nop nop O The character code for =A3 is 163. You get that from shift-3 (using the 3 from above the letter keys, not the numeric keypad). The character code for the Euro sign is 164. You should be able to see that you get that from cntrl-4. If you had more use for that than $, you could switch them by editing line 005 to read: 005 '4' 164 '$' 164 '4' '$' nop nop O If you have an edited keymap you like, keep a copy in a safe place (like your home directory) in case it get stomped when you upgrade your system. If you do not have root access, you can change keymaps with kbdcontrol, and you could change fonts and video modes with vidcontrol. (See the man pages for each if you are interested.) You could put these in the dot file for your particular shell to have them take effect when you login. You can even change these on a per-application basis by using a shell scrip= t to launch particular applications. This might be useful, for example, if you had applications that do not look right without the IBM box-drawing characters. You could use vidcontrol in a script to switch to cp437 before calling the application and to switch back afterwards. Fortunately many applications these days know what to do or can be configured to do the righ= t thing without such drastic measures. --=20 Lars Eighner http://www.larseighner.com/index.html 8800 N IH35 APT 1191 AUSTIN TX 78753-5266 --0-272298827-1243585545=:35417--