LinuxQuestions.org
Visit Jeremy's Blog.
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 12-24-2008, 03:50 PM   #1
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Jessie, Bunsenlabs
Posts: 586

Rep: Reputation: 38
kdyboard printing wrong characters in terminal


Keyboard: Dell QuietKey
Model: RT7D5JTW
Distro: Slackware 12.2

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?

Thanks.

Last edited by JosephS; 12-24-2008 at 03:51 PM.
 
Old 12-24-2008, 05:09 PM   #2
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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.
 
Old 12-24-2008, 06:02 PM   #3
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by JosephS View Post
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.

Last edited by ErV; 12-24-2008 at 06:04 PM.
 
Old 12-24-2008, 07:43 PM   #4
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Jessie, Bunsenlabs
Posts: 586

Original Poster
Rep: Reputation: 38
Quote:
I assume you are talking about real terminal, not xterm/konsole/mrxvt/etc.
Following apply to real terminal only.
I don know what you mean.
I used the shell and the linux console from the menu I added to the panel.

I can`t find these in /etc/rc.d:
/etc/rc.d/rc.font
/etc/rc.d/rc.keymap.

I read the man pages about: unicode_start unicode_stop.

I find this all over my head. Is there somewhere I can get some help with this.

Thanks.
 
Old 12-25-2008, 01:07 AM   #5
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by JosephS View Post
I don know what you mean.
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 View Post
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.
 
Old 12-25-2008, 06:18 AM   #6
wadsworth
Member
 
Registered: Aug 2007
Distribution: Slackware64 13.37
Posts: 215

Rep: Reputation: 65
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.
 
Old 12-25-2008, 07:28 AM   #7
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Jessie, Bunsenlabs
Posts: 586

Original Poster
Rep: Reputation: 38
I tried typing in the real terminal and the keyboard works fine. It`s
the terminal emulators that are the problem.


I`m using Slackware 12.2
This is my /etc/rc.d/
init.d
rc.0
rc.4
rc.6
rc.K
rc.M
rc.S
rc.acpid
rc.alsa
rc.atalk
rc.bind
rc.bluetooth
rc.bluetooth.conf
rc.cups
rc.dnsmasq
rc.font
rc.fuse
rc.gpm
rc.hald
rc.httpd
rc.inet1
rc.inet1.conf
rc.inet1.conf~
rc.inet2
rc.inetd
rc.ip_forward
rc.local
rc.messagebus
rc.modules
rc.modules-2.6.27.7
rc.modules-2.6.27.7-smp
rc.mysqld
rc.nfsd
rc.ntpd
rc.pcmcia
rc.rpc
rc.samba
rc.saslauthd
rc.sendmail
rc.serial
rc.snmpd
rc.sshd
rc.syslog
rc.sysvinit
rc.udev
rc.wireless
rc.wireless.conf
rc.yp
rc0.d
rc1.d
rc2.d
rc3.d
rc4.d
rc5.d
rc6.d


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?

Last edited by JosephS; 12-25-2008 at 07:30 AM.
 
Old 12-25-2008, 09:47 AM   #8
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by JosephS View Post
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?
 
Old 12-25-2008, 10:44 AM   #9
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Jessie, Bunsenlabs
Posts: 586

Original Poster
Rep: Reputation: 38
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

I also tried Xterm
Neither work properly
 
Old 12-25-2008, 04:53 PM   #10
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,645

Rep: Reputation: 146Reputation: 146
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.
 
Old 12-25-2008, 07:25 PM   #11
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by JosephS View Post
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".
 
Old 12-26-2008, 10:29 AM   #12
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Jessie, Bunsenlabs
Posts: 586

Original Poster
Rep: Reputation: 38
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.

Thanks for the help.

Last edited by JosephS; 12-26-2008 at 12:34 PM.
 
  


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
Apache characters are wrong Kanon Linux - Software 3 04-30-2007 01:41 PM
Wrong characters in web pages apffal Fedora 1 07-04-2006 11:03 PM
Weird Characters in terminal Mr. New Linux - Newbie 3 05-10-2005 04:49 PM
few characters like 'i' not printing somasekhar Linux - Newbie 2 12-17-2004 10:25 AM
printing japanese characters... tw001_tw Linux - Software 0 05-02-2004 10:14 PM

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

All times are GMT -5. The time now is 11:39 AM.

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