Keyboard map issue

Discussion in 'Linux' started by Zippo, Jul 15, 2008.

  1. Zippo

    ags

    Joined:
    Jul 22, 2008
    Messages:
    34
    Likes Received:
    0
    Changing the Xorg.conf file is not enough. The keymap seems to be reset when the computer is rebooted or something changes on the desktop.

    What actually happens is that the Xorg.conf file is overwritten by the original configuration and your changes saved to xorg.conf.bak!!

    After about an hour of trying to find what is making the file be overwritten, I may have found the culprit. The file /usr/bin/xkb_plugin_set_xorg.sh does the overwriting. It looks to be a fairly simple shell script that parses the system locale file and then sets some predetermined default keyboard maps.

    Anyone care to comment before I go playing around some more...
     
    ags, Jul 22, 2008
    #41
  2. Zippo

    zaphod

    Joined:
    Jul 10, 2008
    Messages:
    156
    Likes Received:
    0
    Location:
    France
    I don't know much about Linux but it looks like it might be worth playing around with /usr/bin/xkb_plugin_set_xorg.sh and/or the /etc/sysconfig/i18n file that it refers to.
     
    zaphod, Jul 22, 2008
    #42
  3. Zippo

    nngomes

    Joined:
    Jul 22, 2008
    Messages:
    30
    Likes Received:
    0
    Location:
    Porto, Portugal
    Hi!

    Im a complete noob in linux and i choosed "English" on installation, although im Portuguese. I wanted to set the system to english and the keyboard to Portugues (pt) obviously but now, having read this thread, i put my system in Portuguese (the menus). However i still CAN´T put my keyboard right!!! it´s all messed up!

    Can you please teach me how to do a file and the correspondent shortcut like you did for you?

    Im a complete noob, although, thanks to this forums i´ve managed to get the advanced desktop and installed a few things, but im really stucj at this!!! I´ve already made ALL the updates available, set the keyboard to portuguese in two of the menus that the advanced desktop gives me but it doesn´t seem to recognize it... Im with the US/UK sign now but when i click on it, nothing happens too... IM LOST HERE!!!
     
    nngomes, Jul 22, 2008
    #43
  4. Zippo

    zaphod

    Joined:
    Jul 10, 2008
    Messages:
    156
    Likes Received:
    0
    Location:
    France
    I did the following:

    On the Aspire One desktop: open "My Files"
    Right click - create document - empty file
    Give the file a name such as: pt.sh
    Right click on file - open with mousepad
    Insert the line "setxkbmap pt" in the file and save
    Right click on file - properties - permissions - tick box for "allow this file to run as a program"

    Next right click on Desktop to get up advanced mode menus
    Select: settings - keyboard settings - shortcuts
    Select: add
    Enter the command "./pt.sh" and click on OK
    Push the keys you want to be used as a shortcut e.g.alt+k

    Your new shortcut should now appear in the menu.

    Hope that helps.
     
    zaphod, Jul 22, 2008
    #44
  5. Zippo

    zaphod

    Joined:
    Jul 10, 2008
    Messages:
    156
    Likes Received:
    0
    Location:
    France
    Yes this is the solution for me. I have modified the last "XkbLayout" entry in this file from "gb,us" to "fr,gb,us" and I now have a French keyboard at reboot whilst retaining an English OS.

    Thanks for having identified the key file :D
     
    zaphod, Jul 22, 2008
    #45
  6. Zippo

    Sid

    Joined:
    Jul 22, 2008
    Messages:
    632
    Likes Received:
    0
    Location:
    UK - (most locations)
    This stuff is a bit deep for me.
    I will point out that initially I had the problem where I could not map the UK keyboard, I did another update check and there were updates listed for US and UK keyboards. (and a few other things) I can now click the "EN" and it will change to "UK" - this was not possible prior to the update and reboot.

    If I am misdirecting folk I apologize, only trying to help (Alert - Linux noob).
     
    Sid, Jul 22, 2008
    #46
  7. Zippo

    speekergeek

    Joined:
    Jul 17, 2008
    Messages:
    76
    Likes Received:
    0
    THERE IS AN UPDATE!! it was released today to address the keyboard issue, hopefully it will be resolved, although i already took care of my problem with the help of this forum.
     
    speekergeek, Jul 22, 2008
    #47
  8. Zippo

    skateasian

    Joined:
    Jul 16, 2008
    Messages:
    28
    Likes Received:
    0
    YAY acer! update! =D
     
    skateasian, Jul 22, 2008
    #48
  9. Zippo

    Daniel_S

    Joined:
    Jul 22, 2008
    Messages:
    1
    Likes Received:
    0

    Thank you!
     
    Daniel_S, Jul 22, 2008
    #49
  10. Zippo

    Guest Guest

    Finally! Thanks
     
    Guest, Jul 23, 2008
    #50
  11. Zippo

    ags

    Joined:
    Jul 22, 2008
    Messages:
    34
    Likes Received:
    0
    Just to finish off my previous post. The file /usr/bin/xkb_plugin_set_xorg.sh gets called from the /etc/init.d/rc.S file. The files in the init directory are all executed during bootup, so this is when the keyboard gets rewritten in the Xorg.conf file.

    As far as I can tell /usr/bin/xkb_plugin_set_xorg.sh is a Linpus/Acer add-on. I can't see why they did it, but presumably they had a good reason.

    Fixing the keyboard problem requires a manual edit to the /usr/bin/xkb_plugin_set_xorg.sh file to set the keyboard that you want as default. Or you could comment out the line in /etc/init.d/rc.S file.
     
    ags, Jul 23, 2008
    #51
  12. Zippo

    nngomes

    Joined:
    Jul 22, 2008
    Messages:
    30
    Likes Received:
    0
    Location:
    Porto, Portugal
    Thanks zaphod!!!

    It worked GREAT!!!

    Now, im reading this thread and i still couldn´t find a DEFINITIVE way of putting my keyboard in portuguese.... am i reading wrong?
     
    nngomes, Jul 23, 2008
    #52
  13. Zippo

    zaphod

    Joined:
    Jul 10, 2008
    Messages:
    156
    Likes Received:
    0
    Location:
    France
    I reckon you should be able to do what I did. You will need to edit the file "/usr/bin/xkb_plugin_set_xorg.sh" and modify the last "XkbLayout" entry in this file from "gb,us" to "pt,gb,us".

    You will need to be root to edit the file so the best way is to open a terminal. You can do this by "alt+f2" and entering the command xfterm4. This should bring up a terminal in which you can type "sudo mousepad /usr/bin/xkb_plugin_set_xorg.sh" to edit the file which you can then save. You may get an error message with the sudo command, just ignore it.
     
    zaphod, Jul 23, 2008
    #53
  14. Zippo

    sesy

    Joined:
    Jul 23, 2008
    Messages:
    2
    Likes Received:
    0
    Hi

    I got the One today and by using the good instructions on this site got a finnish keyboard to work.

    Also I got the right-click menu to show text in finnish and some other texts also...

    I changed the i18n LANG and LANGUAGE values to fi_FI.UTF-8 and added that as one option into that /usr/bin/xkb_...sh shell script, with "fi" as the kbd definition.

    Had at first some issues when I left the earlier values commented on next line, it messed up the awk a bit, so it's better to just change the values to something suitable. Although the change is trivial, it might still be a good idea to have a backup file like

    sudo cp i18n i18n.original

    or so.

    So I would think that it's possible to get some parts of the system to your native language if you're so inclined. The background texts on desktop did not change, they are probably somewhere else.

    Best
    Seppo
     
    sesy, Jul 23, 2008
    #54
  15. Zippo

    zaphod

    Joined:
    Jul 10, 2008
    Messages:
    156
    Likes Received:
    0
    Location:
    France
    A word of warning for those of you (like me) who have modified the "/usr/bin/xkb_plugin_set_xorg.sh" file in order to get your required keyboard map. If you apply all the latest Live Updates then expect to have to go back and modify the file again.
     
    zaphod, Jul 23, 2008
    #55
  16. Zippo

    janss

    Joined:
    Jul 23, 2008
    Messages:
    220
    Likes Received:
    0

    Thanks for this mates, I did the same and set it to "fi,gb,us" and now I have english OS with finnish keyboard : :mrgreen:
     
    janss, Jul 24, 2008
    #56
  17. Zippo

    nngomes

    Joined:
    Jul 22, 2008
    Messages:
    30
    Likes Received:
    0
    Location:
    Porto, Portugal
    Great directions zaphod! Im working now, it´s 11am here, but when i get home i´ll try this. Im sure i´ll be able to do this since it´s perfectly explained!!!

    MANY thanks zaphod, and thanks for the heads up about the updates (post below).

    Nuno
     
    nngomes, Jul 24, 2008
    #57
  18. Zippo

    zaphod

    Joined:
    Jul 10, 2008
    Messages:
    156
    Likes Received:
    0
    Location:
    France
    You mean to say that you don't always have your Aspire One with you, charged up and ready to run ;)
     
    zaphod, Jul 24, 2008
    #58
  19. Zippo

    nngomes

    Joined:
    Jul 22, 2008
    Messages:
    30
    Likes Received:
    0
    Location:
    Porto, Portugal
    You´re right... that would be the correct way to put it! :D

    (have got to clean history, cookies and cache after this!) :twisted:
     
    nngomes, Jul 24, 2008
    #59
  20. Zippo

    Lucas Tadeu

    Joined:
    Jul 24, 2008
    Messages:
    1
    Likes Received:
    0
    Thank you Zaphod.

    I had the same problem (am also a Portuguese User). Tried the solution you described and worked great.

    Cheers!
     
    Lucas Tadeu, Jul 24, 2008
    #60
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.