LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-23-2010, 04:22 PM   #1
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Rep: Reputation: 234Reputation: 234Reputation: 234
How to get rid of Unicode console fonts and keyboard layout?


I use Slackware 13.1. So far I chose during the installation of the system lat2a-16.psfu.gz font and my applications worked well in console mode. Now the same applications with the same font display gridded rectangles instead of some diacritical characters.

In /etc/rc.d/rc.font I have standard setfont -v lat2a-16.psfu.gz command:

/etc/rc.d/rc.font:
Code:
setfont -v lat2a-16.psfu.gz
In /etc/rc.d/rc.keymap I have standard loadkeys pl2.map command:

/etc/rc.d/rc.keymap:
Code:
if [ -x /usr/bin/loadkeys ]; then /usr/bin/loadkeys pl2.map; fi
Standard setfont -v lat2a-16.psfu.gz command reports for some reason loading of the Unicode mapping table:

# setfont -v lat2a-16.psfu.gz
Code:
Loading 256-char 8x16 font from file /usr/share/kbd/consolefonts/lat2a-16.psfu.gz
Loading Unicode mapping table...
The above command with the switch 8859-2 do the same:

# setfont -m 8859-2 -v lat2a-16.psfu.gz
Code:
Loading symbolic screen map from file /usr/share/kbd/consoletrans/8859-2_to_uni.trans
Loading 256-char 8x16 font from file /usr/share/kbd/consolefonts/lat2a-16.psfu.gz
Loading Unicode mapping table...
In /etc/lilo.conf I have standard vt.default_utf8=0 setting:

/etc/lilo.conf:
Code:
append="vt.default_utf8=0"
In /etc/profile.d/lang.sh I have LANG=en_US setting:

/etc/profile.d/lang.sh:
Code:
export LANG=en_US
The command kbd_mode displays the information about the keyboard working in the Unicode mode:

# kbd_mode
Code:
The keyboard is in Unicode (UTF-8) mode
I examined /etc/rc.d directory but I didn’t find the setting switching the console to the Unicode mode. The same with env and set commands outputs.

I tried to overwrite Slackware 13.1 /usr/share/kbd/consolefonts/lat2a-16.psfu.gz with lat2a-16.psfu.gz file provided in kbd packages from Slackware 12.2 and 11.0 but the results were the same.

I suppose the problem is caused by improper handling of the system settings by the kernel but I’m not sure.

So I ask you how can I get rid of Unicode console font and keyboard layout and come back to ISO-8859-2 font and keyboard?
 
Old 11-24-2010, 08:55 AM   #2
conraid
Member
 
Registered: Feb 2008
Location: Leghorn, Tuscany, Italy
Distribution: Slackware
Posts: 122

Rep: Reputation: 38
try font without built-in unicode mapping

cat /usr/share/kbd/consolefonts/README.psfu
 
1 members found this post helpful.
Old 11-24-2010, 12:12 PM   #3
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
conraid,

As I wrote above lat2a-16.psfu.gz font worked in the past well but with Slackware 13.1 it displays the same invalid character instead of all diacritical characters from ISO Latin 2 encoding:

# setfont -v lat2a-16.psfu.gz
Code:
Loading 256-char 8x16 font from file /usr/share/kbd/consolefonts/lat2a-16.psfu.gz
Loading Unicode mapping table...
I followed your advice and tried iso02.16.gz font but the result was the same:

# setfont -v iso02.16.gz
Code:
Read 32-char 8x16 font from file /usr/share/kbd/consolefonts/partialfonts/none.00-17.16.gz
Read 96-char 8x16 font from file /usr/share/kbd/consolefonts/partialfonts/ascii.20-7f.16.gz
Read 32-char 8x16 font from file /usr/share/kbd/consolefonts/partialfonts/none.00-17.16.gz
Read 96-char 8x16 font from file /usr/share/kbd/consolefonts/partialfonts/8859-2.a0-ff.16.gz
Loading 256-char 8x16 font
Loading Unicode mapping table...
So I downloaded kbd.tgz file from Slackware 7.0 and tried lat2-16.psf.gz font but the result was still the same:

# setfont -v lat2-16.psf.gz
Code:
Loading 256-char 8x16 font from file /usr/share/kbd/consolefonts/lat2-16.psf.gz
Loading Unicode mapping table...
Finally I tried all the above commands with -u none and -m none switches:

# setfont --help
Code:
    -m none    Suppress loading and activation of a screen map.
    -u none    Suppress loading of a unicode map.
In result setfont command stopped to display the message:

Code:
Loading Unicode mapping table...
but diacritical characters were still displayed in an invalid way.

As far the problem persists. I thank you anyway because any answer is better than none.
 
Old 11-25-2010, 05:54 AM   #4
conraid
Member
 
Registered: Feb 2008
Location: Leghorn, Tuscany, Italy
Distribution: Slackware
Posts: 122

Rep: Reputation: 38
mmm...

man kbd_mode

with kbd_mode command you can change keyboard "mode"

try -a or -k in /etc/profile

It's only a idea

p.s.
my kbd_mode output is unicode in console, raw in X terminal
Before, I don't remember since, I had to set "kbm_mode -u" in /etc/profile for unicode mode. Perhaps now is the default unicode
 
1 members found this post helpful.
Old 11-26-2010, 08:58 PM   #5
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
Unfortunately in my case kbd_mode used with -a switch does nothing (keyboard still works in Unicode mode) and kbd_mode with -k switch changed keyboard into minefield -- the only way to exit from that mode was to switch power off.

Anyway I thank you, conraid, for your constant support.

***

A month ago I bought ThinkPad X60s. I restored on it the system I installed previously on my older ThinkPad T60. I use my new machine almost constantly since I bought it. Recently I noticed the problem with the console fonts and keyboard. I described it above. Today I ran for some reason my older machine. There is no problem with the console font and keyboard on it.

I hate such problems! The same Slackware 13.1 installed on two similar machines behaves in two different ways.
 
Old 11-28-2010, 10:58 AM   #6
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
I solved the problem with console font and keyboard.

I keep Slackware 13.1 on the second partition. Recently I installed Linux Mint 10 Julia on the first partition. Because Mint’s GRUB is invalid it doesn’t allow to install bootloader on ReiserFS partition (see: that thread) so I was forced to install it on MBR and call Slackware using Mint instead of calling Mint using Slackware. Now I overwrote MBR with Slackware’s LILO and in result console font and keyboard started to work properly.

Below there are two excerpts of Linux Mint’s /boot/grub/grub.cfg. First loads Unicode font and second calls Slackware.

Code:
insmod part_msdos
insmod reiserfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 142dff0d-d853-40d2-925a-6cf0620466b7
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=1024x768
  load_video
  insmod gfxterm
fi
Code:
menuentry "Slackware Linux" {
set root=(hd0,2)
linux /boot/vmlinuz-generic-smp-2.6.33.4-smp root=/dev/sda2 ro vga=791
initrd /boot/initrd.gz
}

menuentry "Slackware Linux Huge" {
set root=(hd0,2)
linux /boot/vmlinuz root=/dev/sda2 ro vga=791
}
 
Old 12-21-2010, 03:41 PM   #7
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
The above solution answers to the question why Slackware's console displays invalid diacritic characters when Linux Mint's GRUB chainloads Slackware's LILO. Now I installed in Linux Mint 10 Julia old GRUB Legacy. It allows to put bootloader at the beginning of the partition. So I can use Slackware's LILO to chainload Linux Mint's GRUB. In result when I run Slackware it displays valid console font. The solution is described here.
 
  


Reply



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
change keyboard layout in console danielfisica Slackware 14 03-08-2021 11:55 AM
Switching Keyboard Layout in Console Only Saint-Ours Ubuntu 2 02-07-2011 08:57 AM
How to switch keyboard layout in virtual console in Ubuntu 8.04? swingnjazz Linux - Newbie 1 08-03-2008 08:57 AM
keyboard layout and fonts giraf Debian 1 03-06-2007 12:41 PM
Issue with keyboard layout in X server (vs console) michapma Debian 9 10-05-2004 04:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:29 PM.

Main Menu
Advertisement
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
Twitter: @linuxquestions
Open Source Consulting | Domain Registration