Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (3) </ [1] 2 3 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: non-us keyboard fix in .xinitrc doesn't work, xmodmap works but not "if" clause< Next Oldest | Next Newest >
pirata Offline





Group: Members
Posts: 12
Joined: May 2006
Posted: May 19 2006,21:08 QUOTE

Using DSL 2.4, frugal install to HD, I noticed that there's a fix in /home/dsl/.xinitrc for the non-us keyboard problem with not being able to reach e.g. @ (alt-gr 2 on my Swedish keyboard)

Code Sample
# For non-US Keyboards
if [ ${KEYTABLE:0:2} != "us" ]; then
 xmodmap -e "clear Mod4" -e "add Mod5 = Mode_switch" &
fi

On my system this doesn't work, though. After experimenting, I found that the line
Code Sample
 xmodmap -e "clear Mod4" -e "add Mod5 = Mode_switch" &

is OK, it works by itself.

So I commented out the if and fi lines:
Code Sample
# For non-US Keyboards
#if [ ${KEYTABLE:0:2} != "us" ]; then
 xmodmap -e "clear Mod4" -e "add Mod5 = Mode_switch" &
#fi

and everything works OK here! :D

The error must be in the
Code Sample
if [ ${KEYTABLE:0:2} != "us" ]; then

I couldn't say what that would be, though, or if it's the same on other systems...
???


--------------
Radio Pirata, running Shoutcast server on DSL: http://pirata.tk/
Back to top
Profile PM WEB 
pirata Offline





Group: Members
Posts: 12
Joined: May 2006
Posted: May 20 2006,20:19 QUOTE

OK, I'll comment this myself...

The output for:

Code Sample
getknoppixparam.lua KEYTABLE


is actually "us", although I have specified at bootup a non-us keyboard (Swedish)! And the Swedish keyboard works very good, with all the åäö and @£${[]}\| in their correct places. So what's wrong?

Actually I notice just now that the Spanish letter ñ, that is n with a ~ on top, comes out as ~n. (I had to get the correct letter with copy and paste). That's normally a two-key combination, alt-gr ~ followed by n. Oh no, all accents are the same, ´o instead of ó etc......

Oh well... :O


--------------
Radio Pirata, running Shoutcast server on DSL: http://pirata.tk/
Back to top
Profile PM WEB 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: May 20 2006,23:49 QUOTE

How and where may I ask are you specifying your Swedish keyboard? At boot time with boot code? Using the keyboard GUI? Using the command prompt using loadkeys? Or maybe in /opt/bootlocal.sh?
Back to top
Profile PM WEB 
pirata Offline





Group: Members
Posts: 12
Joined: May 2006
Posted: May 21 2006,12:43 QUOTE

It's a frugal install (DSL 2.4) to HD using LILO. The installation script asked me what keyboard I wanted so I answered "se".

During startup I see these lines (among many others...) pass by:
Quote
INIT: Entering runlevel: 5
Restoring backup files from /mnt/hda3/ Done.
Loading usr/share/keymaps/i386/qwerty/se-latin1.kmap.gz
su(pam_unix)[811] ... etc.

Here's my /cdrom/boot/lilo.conf file:
Code Sample
lba32          #enable large disk support
timeout=30     #wait 3 seconds before auto-booting
vga=normal
boot=/dev/hda   #put boot loader in MBR of target disk
root=/dev/hda1 #set root to be partition of target disk
image=/boot/linux24
label=DSL
initrd=/boot/minirt24.gz
read-only
APPEND="ramdisk_size=100000 init=/etc/init lang=us apm=power-off hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi nomce nodma quiet frugal BOOT_IMAGE=/KNOPPIX/KNOPPIX restore=hda3 home=hda3 opt=hda3 host=tor noscsi lang=se  mydsl=hda3"

and here's /opt/bootlocal.sh:
Code Sample
#!/bin/bash
# put other system startup command here
loadkeys se-latin1
/usr/sbin/lpd

I see there is a "lang=us" early in the APPEND line and a "lang=se" near the end. (Also a lot of unnecessary "hda=scsi"  etc. although I specified "noscsi" during installation.)

I don't specify anything else neither before nor after booting up.

Actually I chose LILO because it was easy to do these "restore=hda3 home=hda3 opt=hda3 host=tor noscsi lang=se  mydsl=hda3" easily during installation, which the grub script doesn't provide. (Edit: removed irrelevant and stupid part....) :D

Thanks for a great distro!
:laugh:


--------------
Radio Pirata, running Shoutcast server on DSL: http://pirata.tk/
Back to top
Profile PM WEB 
pirata Offline





Group: Members
Posts: 12
Joined: May 2006
Posted: May 21 2006,12:57 QUOTE

Oh, but please note that the "alt-gr" problem (for reaching characters @£${[]}\|) only applies to Firefox. In e.g. Ted, they can be typed normally.

The other problem with the accents seems to be more general (´o instead of ó etc.), that is, the problem appears in all applications and with or without the xmodmap fix.

Just to clarify, hopefully... :p


--------------
Radio Pirata, running Shoutcast server on DSL: http://pirata.tk/
Back to top
Profile PM WEB 
11 replies since May 19 2006,21:08 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (3) </ [1] 2 3 >/
reply to topic new topic new poll
Quick Reply: non-us keyboard fix in .xinitrc doesn't work

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code