SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just installed Slackware 12.2
I ran xorgsetup
For keyboard I chose: Dell Generic 101
This is the choice I made for Slackware 12.1
I didn't have any problems.
Problem:
I can log in with my password when I boot up with the computer, so it seems like the keyboard is ok (not sure).
When I use the console the keys are printing the wrong characters.
Is this a problem with my choice of keyboard or something with the console?
Probably neither. Check to the "Settings" in console, if possible, to see what terminal input emulation is selected in your current profile. It often defaults to XFree when Linux Console is more appropriate.
When I use the console the keys are printing the wrong characters.
Is this a problem with my choice of keyboard or something with the console?
I assume you are talking about real terminal, not xterm/konsole/mrxvt/etc.
Following apply to real terminal only.
Possible causes:
1) You didn't set correct terminal encoding using setfont with "-u" key. This is done in /etc/rc.d/rc.font
example:
Code:
#!/bin/sh
#
# This selects your default screen font from among the ones in
# /usr/share/kbd/consolefonts.
#
#unicode_stop
setfont -v koi8c-8x16 -u koi8r
2) You didn't load correct keyboard map using loadkeys. This is done in /etc/rc.d/rc.keymap. Example.
Code:
#!/bin/sh
# Load the keyboard map. More maps are in /usr/share/kbd/keymaps.
if [ -x /usr/bin/loadkeys ]; then
/usr/bin/loadkeys ru-utf.map
fi
3) Console is in unicode mode when it shouldn't be or it isn't in unicode mode when it should be. This is manipulated by unicode_start and unicode_stop. Check manpages for those commands for more info. I think that in kernels beginning from 2.6.26.x console is in unicode mode by default, while in all previous version it isn't.
Examples use russian keyboard layout and encoding and were taken from my machine.
For more info see manpages for all mentioned commands.
xterm/konsole/mrxvt/etc are programs called terminal emulators, and they work under X. When I talk abuot "real terminal" I'm talking about terminals you normally see when you press Alt+Ctrl+F1..F4.
Quote:
Originally Posted by JosephS
I can`t find these in /etc/rc.d:
/etc/rc.d/rc.font
/etc/rc.d/rc.keymap.
Are you using slackware? Those scripts exist in slackware, at least since version 11.0. They are present on my 12.2 system.
You can simply rename /etc/rc.d/rc.font.new to get your rc.font file.
/etc/rc.d/rc.keymap doesn't exist on my system either, but it is mentioned
in /etc/rc.d/rc.M so it will execute at startup if present.
Remember it must be set executable (chmod +x ...) or it won't run.
Where is the font.new file, is this /etc/rc.d/rc.font.new?
This is in man setfont:
Quote:
The setfont command reads a font from the file font.new and loads
it into the EGA/VGA character generator, and optionally outputs the previous
font. It can also load various mapping tables and output the previous versions.
Won`t changing /etc/rc.d/rc.font.new to /etc/rc.d/rc.font cause problems
with setfont?
Is there a tutorial on this. I don`t know where to start with this and
I`m not finding much help in searching the web?
I tried typing in the real terminal and the keyboard works fine. It`s
the terminal emulators that are the problem.
If there is no problems in real terminal, then don't touch files I mentioned before, I don't think they will make any difference for terminal emulator.
What terminal emulator are you using? xterm? konsole? mrxvt? Something else?
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,645
Rep:
Maybe I am missing something, but it reads like your /etc/X11/xorg.conf isn't set up right. Keyboard settings in a "real" console and a terminal emulator are different, the second is controlled by xorg.conf.
Did you have any line in your old xorg.conf file from 12.1 pointing to another language keyboard layout? This should be only a problem if you not want to use en_US as layout I guess.
I added the menu for terminal sessions to the panel
Konsole 1.6.6 (Using KDE 3.5.10)
X terminal for use with KDE
Launch konsole.
In "Settings->Encoding" menu (in Konsole window), select encoding you want to use.
Once you found your encoding, select "Settings->Save as Default".
I found the problem.
I ran xorgsetup again. I chose the wrong keyboard layout the first time.
This time I chose Us instead of Canada.
Now the terminal emulator is working with the keyboard.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.