//
you're reading...
Linux

How to change keyboard on Acer Aspire One

I bought this wonderful piece of hardware last week from UK Amazon for amazing 180 pounds and I am still really surprised by this netbook. It is light (just 1 kg), with nice and comfortable keyboard (for its size) and I haven’t noticed any non working or dodgy parts in there. As I am from the Czech republic and I write some blogs in that language, the first thing I need was switching the keyboard and language to Czech. But as I have some experiences with Gentoo only and not with the Linux Linpus (which is some clone of Red Hat Fedora) I had to dig for the advice on the Internet. But since I have found some dirty workarounds and hacks on the Acer Aspire One forums only I decided to investigate the issue by myself. And after all, I am bringing the easy and clean solution so you can now enjoy this lovely laptop with your native language.

Honestly it is pretty easy and straightforward, the only thing you need is edit one(!) configuration file and reboot. The file is /etc/sysconfig/i18n and it contains the list of the languages you can choose from. There are two options in that file we are interested in. LANG specifies the language of the environment, so all your dialogs and windows will be using language you set here. The other option LANGUAGE specifies the keyboard layout. Here is the step by step how to change the file content.

1. Press Alt + F2
2. In the dialog type "sudo xterm" and hit the enter - linux terminal will appear
3. type "vim /etc/sysconfig/i18n" and hit the enter - the file will be opened in the VI editor
4. Change two variables (LANG and LANGUAGE) to reflect your needs. Use the code from the SUPPORTED attribute below, ie. for
   French type fr_FR.UTF-8.
   For those who dont know how to work with VI here are few tips:
     Press "i" for editing the content, press "Escape" for leaving the edit mode, type ":wq" for save the content and quit the editor,
     if you want to quit without changing the file type ":w!".
5. Reboot the computer - either from terminal by typing "reboot" or from taskbar throught the icon on the bottom right.

It is possible to have a different language for dialogs and menus and for keyboard layout so for example my configuration looks like LANG=en_US.UTF-8 and LANGUAGE=cs_CZ.UTF-8 which means, that all the dialogs and menus are in English and I can switch my keyboard from EN, to GB and CS. There is one more settings I changed, since I don’t like that when I boot up the computer, the keyboard language is set to Czech by default and even if I change it to English every new opened application will have the Czech lagunage as the default too. I would like to us GB English by the default language and CZ and US English would be just as secondary option. For fixing this, you have to edit one more file which is located in /usr/bin/xkb_plugin_set_xorg.sh.

In there you have to change the order of languages for your language code. In my case I changed the following line from:

cs_CZ.UTF-8):
sed -e '/XkbLayout/c\        Option      "XkbLayout" "cz,gb,us"'    /etc/X11/xorg.conf > /etc/X11/xorg.conf.bak
;;

To:

cs_CZ.UTF-8):
sed -e '/XkbLayout/c\        Option      "XkbLayout" "gb,cz,us"'    /etc/X11/xorg.conf > /etc/X11/xorg.conf.bak
;;

Mind the swapped “cz,gb,us” to “gb,cz,us”. And here is the step by step:

1. Press Alt + F2
2. In the dialog type "sudo xterm" and hit the enter - linux terminal will appear
3. type "vim /usr/bin/xkb_plugin_set_xorg.sh" and hit the enter - the file will be opened in the VI editor
4. Change the line with your language code to fit your needs.
5. Reboot the computer - either from terminal by typing "reboot" or from taskbar throught the icon on the bottom right.

And that’s it – hope that it will help, dont hesitate to ask in discussion below if you still have issues or something doesnt work as expected.

Discussion

18 thoughts on “How to change keyboard on Acer Aspire One

  1. My file appears as [readonly], so, although I can change the area from ‘US’ to ‘GB’, I can’t save the changes. Is there something simple that needs to be changed?

    Posted by Tomdickharri | December 8, 2008, 7:32 pm
  2. Hi, are you sure that it is read only? What does the “ls -la /etc/sysconfig/i18n” says?

    The problem can be that you dont run the terminal under the root and as a normal user you dont have permission for editing this file.

    If the file is really set to read only try “chmod u+w /etc/sysconfig/i18n” – this will change the write permission for owner of the file.

    Let me know if it helps, cheers.

    Posted by admin | December 8, 2008, 7:49 pm
  3. Thanks Admin, but I get “Operation not permitted” when I enter chmod u+w /etc/sysconfig/i18n
    I know huge amounts about Windows but not a sausage about Linpus/Linux. In Windows, I can simply go to the Regional settings – 2 seconds and it’s fixed. I’m tempted to use a USB stick to install XP, though it seems overkill just to get a UK keyboard.

    Posted by Tomdickharri | December 9, 2008, 1:12 pm
  4. P.S.
    The result of using your first command was ………..
    -rw-r–r– 1 root root 493 2008-12-09 01:13 /etc/sysconfig/i18n

    Posted by Tomdickharri | December 9, 2008, 1:16 pm
  5. Okay so I think you don’t run the xterm as root. You can simply check it by typing command “id” in terminal – the first uid should be the root (like “uid=0(root) gid=0(root) …”)

    Check if you don’t forget to run the xterm without sudo (the step 2. from howto)

    Try to type “sudo” directly in terminal and then run the “id” again to check the root permissions.

    Please could you paste results of “id”, “sudo” and “ls -la /etc/sysconfig/i18n” in here? Cheers.

    Posted by admin | December 9, 2008, 1:28 pm
  6. id result = uid=500(user) gid=500(user) groups=10(wheel),500(user)
    sudo result = usage: sudo -h | -K | -k | -L | -l | -V | -v
    usage: sudo [-bEHPS] [-p prompt] [-u username|#uid] [VAR=value]
    {-i | -s | }
    usage: sudo -e [-S] [-p prompt] [-u username|#uid] file …
    id result = same as before
    ls… result = -rw-r–r– 1 root root 493 2008-12-09 01:13 /etc/sysconfig/i18n
    —————————————
    I’m running Terminal by right-clicking on the Desktop and selecting ‘Terminal’ from the resulting menu. Do I gather that I need to be an ‘administrator’ to update the sysconfig file? If that’s the case, how do I give myself authority?

    Posted by Tomdickharri | December 9, 2008, 2:06 pm
  7. Okay, thought that you have read the article, seems that not :) Try to read it please, all the necessary steps are explained there.

    Posted by admin | December 9, 2008, 2:15 pm
  8. Thanks. Didn’t realise there was a fundamental difference in the way you access Terminal. Now I’ve used your Alt/F2 etc, I can see it says ‘root’ instead of ‘user’ and I made the change stick but still getting ‘@’ when I use Shift/2 instead of ‘”‘.
    Perhaps a reboot will resolve it.
    Thanks again for your patience.

    Posted by Tomdickharri | December 9, 2008, 2:39 pm
  9. You are welcome, I am happy to help – reboot is definitely needed BTW. Hope it works now :)

    Posted by admin | December 9, 2008, 2:41 pm
  10. Hi Guys

    To change the keyboard layout, update your unit using Live Update. On reboot you will find a Keyboard Layout manager in Settings.

    Posted by AcmeUK | April 1, 2009, 1:17 am
  11. Ah so Acer finally made it easier! Good news, thanks or it.

    I have Gentoo installed on it already, I was desperate that all the configuration files are not on the usual places when I am used to have them so decided to switch to my favorite distribution.

    Posted by admin | April 1, 2009, 9:25 am
  12. hi,

    i try it like your description.
    changed the value of LANG and LANGUAGE to cs_CZ.UTF-8. then i have reboot and since that in the bottom riht corner where the keyboard languages appears it shows unknowed.
    what did i wrong?
    please help

    thanks
    Jan

    Posted by Jan Pulpan | June 26, 2010, 9:03 pm
  13. Hi, that with the liveupdate works. But it change “just” the layout of the keyboard. I need to write characters with diacritics – thats not possible right now.

    Any help please?

    Posted by Jan Pulpan | June 27, 2010, 10:41 am
  14. Hi Jan, unfortunately I can’t help you at this moment as I have changed to operational system on my Aspire to Gentoo long time ago. Good luck and if you find some solution, feel free to update this forum with it. I think other people would really appreciate it. Cheers, Tomas.

    Posted by admin | June 27, 2010, 10:59 am
  15. Hi, i found the solution. you have to update the linpus to get the czech keyboard layout.
    and if you want to type characters with diacritic you have to type AltGr + the normal key – like in windows

    Posted by Jan Pulpan | June 27, 2010, 6:43 pm
  16. Hello. I have an Acer Netbook. Somehow the keyboard is messed up. On the right hand portion of the keyboard where the numbers appear, it only types number. In order to get letters, I need to hold down the Fn key. How do I get the keyboard to function properly? I have not read any thing that helped me fix the problem. Thank you.

    Posted by Terry Cestnik | January 14, 2011, 5:53 pm
  17. Hey! I kept looking around and found the solution. Press the Fn key and the Num Lock key F11 at the same time. Thanks for the help. :-)

    Posted by Terry Cestnik | January 14, 2011, 6:20 pm

Trackbacks/Pingbacks

  1. Pingback: Jak na českou klávesnici u Acer Aspire One - ady - November 15, 2008

Leave a comment

Your email address will not be published. Required fields are marked *