set the default keyboard type to ascii mode












0















I am running CentOS 6.5 and I am having problems setting the default keyboard mode to ascii for the virtual terminals. Currently, only the system console defaults to ascii mode, but if I log in to an other virtual terminal, it defaults to unicode mode. These are my configurations:



# /etc/sysconfig/keyboard
KEYTABLE="us"
MODEL="pc105"
LAYOUT="us"
KEYBOARDTYPE="pc"

# /etc/sysconfig/i18n
LANG="en_US.ISO88591"
SYSFONT="iso01.16"

# /etc/sysconfig/console
KEYMAP="us"
FONT="iso01.16"
UNICODE=""


Besides, since these files are more or less documented, I am not sure what is the difference between them and what variables can we assign into them. Any advice?










share|improve this question
















bumped to the homepage by Community 11 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • I know a workaroud for this but it's not really satisfactory. I could add a line like : ` # /etc/profile.d/lang.sh setsysfont ` to my login script so that on login, /etc/sysconfig/i18n would get sourced. But this would just shift from utf-8 to ascii. What I'd like is to have my virtual terminals start off in ascii mode.

    – neoprout
    Jun 5 '14 at 20:42








  • 3





    You may be mixing up terms here. ASCII only covers character codes 0-127, and overlaps exactly with UTF-8 (meaning 0-127 mean the same thing in both ASCII and UTF-8). From your question it looks like you are using ISO-8859-1, which is an extension to ASCII that is not compatible with UTF-8 (all of them share 0-127 but what 128 and beyond mean is different in ISO-8859-1 vs UTF-8).

    – jw013
    Jun 5 '14 at 20:47













  • The terminal and console both have two modes: ascii and utf-8 (as determined by the kbd_mode command). Since i'm using latin1 on my vt it doesn't makes sense to run in utf-8 mode. So I want to run in ascii mode. Ascii here means any byte-wide charset like the iso8859 kinds.

    – neoprout
    Jun 5 '14 at 21:27











  • The difference between ascii and unicode modes is that in ascii mode, the kernel receives each characters of the keyboard as a plain byte. In unicode mode, the kernel might expect up to three bytes for some char. I'm not sure about this but I also think that the keyboard driver reads each char as an utf-16 double-char and sends them endoded in utf-8.

    – neoprout
    Jun 5 '14 at 21:38
















0















I am running CentOS 6.5 and I am having problems setting the default keyboard mode to ascii for the virtual terminals. Currently, only the system console defaults to ascii mode, but if I log in to an other virtual terminal, it defaults to unicode mode. These are my configurations:



# /etc/sysconfig/keyboard
KEYTABLE="us"
MODEL="pc105"
LAYOUT="us"
KEYBOARDTYPE="pc"

# /etc/sysconfig/i18n
LANG="en_US.ISO88591"
SYSFONT="iso01.16"

# /etc/sysconfig/console
KEYMAP="us"
FONT="iso01.16"
UNICODE=""


Besides, since these files are more or less documented, I am not sure what is the difference between them and what variables can we assign into them. Any advice?










share|improve this question
















bumped to the homepage by Community 11 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • I know a workaroud for this but it's not really satisfactory. I could add a line like : ` # /etc/profile.d/lang.sh setsysfont ` to my login script so that on login, /etc/sysconfig/i18n would get sourced. But this would just shift from utf-8 to ascii. What I'd like is to have my virtual terminals start off in ascii mode.

    – neoprout
    Jun 5 '14 at 20:42








  • 3





    You may be mixing up terms here. ASCII only covers character codes 0-127, and overlaps exactly with UTF-8 (meaning 0-127 mean the same thing in both ASCII and UTF-8). From your question it looks like you are using ISO-8859-1, which is an extension to ASCII that is not compatible with UTF-8 (all of them share 0-127 but what 128 and beyond mean is different in ISO-8859-1 vs UTF-8).

    – jw013
    Jun 5 '14 at 20:47













  • The terminal and console both have two modes: ascii and utf-8 (as determined by the kbd_mode command). Since i'm using latin1 on my vt it doesn't makes sense to run in utf-8 mode. So I want to run in ascii mode. Ascii here means any byte-wide charset like the iso8859 kinds.

    – neoprout
    Jun 5 '14 at 21:27











  • The difference between ascii and unicode modes is that in ascii mode, the kernel receives each characters of the keyboard as a plain byte. In unicode mode, the kernel might expect up to three bytes for some char. I'm not sure about this but I also think that the keyboard driver reads each char as an utf-16 double-char and sends them endoded in utf-8.

    – neoprout
    Jun 5 '14 at 21:38














0












0








0


0






I am running CentOS 6.5 and I am having problems setting the default keyboard mode to ascii for the virtual terminals. Currently, only the system console defaults to ascii mode, but if I log in to an other virtual terminal, it defaults to unicode mode. These are my configurations:



# /etc/sysconfig/keyboard
KEYTABLE="us"
MODEL="pc105"
LAYOUT="us"
KEYBOARDTYPE="pc"

# /etc/sysconfig/i18n
LANG="en_US.ISO88591"
SYSFONT="iso01.16"

# /etc/sysconfig/console
KEYMAP="us"
FONT="iso01.16"
UNICODE=""


Besides, since these files are more or less documented, I am not sure what is the difference between them and what variables can we assign into them. Any advice?










share|improve this question
















I am running CentOS 6.5 and I am having problems setting the default keyboard mode to ascii for the virtual terminals. Currently, only the system console defaults to ascii mode, but if I log in to an other virtual terminal, it defaults to unicode mode. These are my configurations:



# /etc/sysconfig/keyboard
KEYTABLE="us"
MODEL="pc105"
LAYOUT="us"
KEYBOARDTYPE="pc"

# /etc/sysconfig/i18n
LANG="en_US.ISO88591"
SYSFONT="iso01.16"

# /etc/sysconfig/console
KEYMAP="us"
FONT="iso01.16"
UNICODE=""


Besides, since these files are more or less documented, I am not sure what is the difference between them and what variables can we assign into them. Any advice?







centos terminal keyboard ascii






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 5 '14 at 20:45







neoprout

















asked Jun 5 '14 at 20:18









neoproutneoprout

313




313





bumped to the homepage by Community 11 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 11 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • I know a workaroud for this but it's not really satisfactory. I could add a line like : ` # /etc/profile.d/lang.sh setsysfont ` to my login script so that on login, /etc/sysconfig/i18n would get sourced. But this would just shift from utf-8 to ascii. What I'd like is to have my virtual terminals start off in ascii mode.

    – neoprout
    Jun 5 '14 at 20:42








  • 3





    You may be mixing up terms here. ASCII only covers character codes 0-127, and overlaps exactly with UTF-8 (meaning 0-127 mean the same thing in both ASCII and UTF-8). From your question it looks like you are using ISO-8859-1, which is an extension to ASCII that is not compatible with UTF-8 (all of them share 0-127 but what 128 and beyond mean is different in ISO-8859-1 vs UTF-8).

    – jw013
    Jun 5 '14 at 20:47













  • The terminal and console both have two modes: ascii and utf-8 (as determined by the kbd_mode command). Since i'm using latin1 on my vt it doesn't makes sense to run in utf-8 mode. So I want to run in ascii mode. Ascii here means any byte-wide charset like the iso8859 kinds.

    – neoprout
    Jun 5 '14 at 21:27











  • The difference between ascii and unicode modes is that in ascii mode, the kernel receives each characters of the keyboard as a plain byte. In unicode mode, the kernel might expect up to three bytes for some char. I'm not sure about this but I also think that the keyboard driver reads each char as an utf-16 double-char and sends them endoded in utf-8.

    – neoprout
    Jun 5 '14 at 21:38



















  • I know a workaroud for this but it's not really satisfactory. I could add a line like : ` # /etc/profile.d/lang.sh setsysfont ` to my login script so that on login, /etc/sysconfig/i18n would get sourced. But this would just shift from utf-8 to ascii. What I'd like is to have my virtual terminals start off in ascii mode.

    – neoprout
    Jun 5 '14 at 20:42








  • 3





    You may be mixing up terms here. ASCII only covers character codes 0-127, and overlaps exactly with UTF-8 (meaning 0-127 mean the same thing in both ASCII and UTF-8). From your question it looks like you are using ISO-8859-1, which is an extension to ASCII that is not compatible with UTF-8 (all of them share 0-127 but what 128 and beyond mean is different in ISO-8859-1 vs UTF-8).

    – jw013
    Jun 5 '14 at 20:47













  • The terminal and console both have two modes: ascii and utf-8 (as determined by the kbd_mode command). Since i'm using latin1 on my vt it doesn't makes sense to run in utf-8 mode. So I want to run in ascii mode. Ascii here means any byte-wide charset like the iso8859 kinds.

    – neoprout
    Jun 5 '14 at 21:27











  • The difference between ascii and unicode modes is that in ascii mode, the kernel receives each characters of the keyboard as a plain byte. In unicode mode, the kernel might expect up to three bytes for some char. I'm not sure about this but I also think that the keyboard driver reads each char as an utf-16 double-char and sends them endoded in utf-8.

    – neoprout
    Jun 5 '14 at 21:38

















I know a workaroud for this but it's not really satisfactory. I could add a line like : ` # /etc/profile.d/lang.sh setsysfont ` to my login script so that on login, /etc/sysconfig/i18n would get sourced. But this would just shift from utf-8 to ascii. What I'd like is to have my virtual terminals start off in ascii mode.

– neoprout
Jun 5 '14 at 20:42







I know a workaroud for this but it's not really satisfactory. I could add a line like : ` # /etc/profile.d/lang.sh setsysfont ` to my login script so that on login, /etc/sysconfig/i18n would get sourced. But this would just shift from utf-8 to ascii. What I'd like is to have my virtual terminals start off in ascii mode.

– neoprout
Jun 5 '14 at 20:42






3




3





You may be mixing up terms here. ASCII only covers character codes 0-127, and overlaps exactly with UTF-8 (meaning 0-127 mean the same thing in both ASCII and UTF-8). From your question it looks like you are using ISO-8859-1, which is an extension to ASCII that is not compatible with UTF-8 (all of them share 0-127 but what 128 and beyond mean is different in ISO-8859-1 vs UTF-8).

– jw013
Jun 5 '14 at 20:47







You may be mixing up terms here. ASCII only covers character codes 0-127, and overlaps exactly with UTF-8 (meaning 0-127 mean the same thing in both ASCII and UTF-8). From your question it looks like you are using ISO-8859-1, which is an extension to ASCII that is not compatible with UTF-8 (all of them share 0-127 but what 128 and beyond mean is different in ISO-8859-1 vs UTF-8).

– jw013
Jun 5 '14 at 20:47















The terminal and console both have two modes: ascii and utf-8 (as determined by the kbd_mode command). Since i'm using latin1 on my vt it doesn't makes sense to run in utf-8 mode. So I want to run in ascii mode. Ascii here means any byte-wide charset like the iso8859 kinds.

– neoprout
Jun 5 '14 at 21:27





The terminal and console both have two modes: ascii and utf-8 (as determined by the kbd_mode command). Since i'm using latin1 on my vt it doesn't makes sense to run in utf-8 mode. So I want to run in ascii mode. Ascii here means any byte-wide charset like the iso8859 kinds.

– neoprout
Jun 5 '14 at 21:27













The difference between ascii and unicode modes is that in ascii mode, the kernel receives each characters of the keyboard as a plain byte. In unicode mode, the kernel might expect up to three bytes for some char. I'm not sure about this but I also think that the keyboard driver reads each char as an utf-16 double-char and sends them endoded in utf-8.

– neoprout
Jun 5 '14 at 21:38





The difference between ascii and unicode modes is that in ascii mode, the kernel receives each characters of the keyboard as a plain byte. In unicode mode, the kernel might expect up to three bytes for some char. I'm not sure about this but I also think that the keyboard driver reads each char as an utf-16 double-char and sends them endoded in utf-8.

– neoprout
Jun 5 '14 at 21:38










1 Answer
1






active

oldest

votes


















0














The file /etc/sysconfig/i18n is the place to make changes. But it contains the proper settings in your example. No change should be made to /etc/sysconfig/keyboard (if it worked, leave it alone). Actually on my Centos6.x, I have a directory at /etc/sysconfig/console (which could contain a keymaps) — and a mailing list discussion from 2002 hints that it has been a directory at least that long.. Some other systems have a file there, e.g., Linux From Scratch.



To get "ASCII" as requested means that you have to change your system locale, which is set in /etc/sysconfig/i18n using the LANG property. By default, that would have



LANG="en_US.UTF-8"
SYSFONT="latarcyrheb-sun16"


(or some other LANG with "UTF-8", giving more or less the same effect). I changed my machine to match yours, checking that the values matched the machine:



LANG="en_US.iso88591"
SYSFONT="iso01.16"


that is, the LANG value is in locale -a:



en_SG.utf8
en_US
en_US.iso88591
en_US.iso885915
en_US.utf8
en_ZA


and SYSFONT is the name of a console font file:



/lib/kbd/consolefonts/iso01.16.gz


After making the change, I rebooted and see "ASCII" behavior on each of the tty's (2-6, since X is running on tty1). But checking with showconsolefont shows that it still loads the original font. That is set in /boot/grub/grub.conf. Editing that file to change the SYSFONT=latarcyrheb-sun16 to SYSFONT=iso01.16 gives the desired effect. Here is a screenshot:



screenshot after changing SYSFONT in CentOS6



That is, the ISO-8859-1 font is loaded. The keyboard (being US) will only do "ASCII" without some interesting keymap.



Further reading:





  • Appendix D. The sysconfig Directory (Red Hat)


  • 28.1.13. /etc/sysconfig/i18n (CentOS 5: users of 6 and 7 are directed to Red Hat)






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f134744%2fset-the-default-keyboard-type-to-ascii-mode%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    The file /etc/sysconfig/i18n is the place to make changes. But it contains the proper settings in your example. No change should be made to /etc/sysconfig/keyboard (if it worked, leave it alone). Actually on my Centos6.x, I have a directory at /etc/sysconfig/console (which could contain a keymaps) — and a mailing list discussion from 2002 hints that it has been a directory at least that long.. Some other systems have a file there, e.g., Linux From Scratch.



    To get "ASCII" as requested means that you have to change your system locale, which is set in /etc/sysconfig/i18n using the LANG property. By default, that would have



    LANG="en_US.UTF-8"
    SYSFONT="latarcyrheb-sun16"


    (or some other LANG with "UTF-8", giving more or less the same effect). I changed my machine to match yours, checking that the values matched the machine:



    LANG="en_US.iso88591"
    SYSFONT="iso01.16"


    that is, the LANG value is in locale -a:



    en_SG.utf8
    en_US
    en_US.iso88591
    en_US.iso885915
    en_US.utf8
    en_ZA


    and SYSFONT is the name of a console font file:



    /lib/kbd/consolefonts/iso01.16.gz


    After making the change, I rebooted and see "ASCII" behavior on each of the tty's (2-6, since X is running on tty1). But checking with showconsolefont shows that it still loads the original font. That is set in /boot/grub/grub.conf. Editing that file to change the SYSFONT=latarcyrheb-sun16 to SYSFONT=iso01.16 gives the desired effect. Here is a screenshot:



    screenshot after changing SYSFONT in CentOS6



    That is, the ISO-8859-1 font is loaded. The keyboard (being US) will only do "ASCII" without some interesting keymap.



    Further reading:





    • Appendix D. The sysconfig Directory (Red Hat)


    • 28.1.13. /etc/sysconfig/i18n (CentOS 5: users of 6 and 7 are directed to Red Hat)






    share|improve this answer




























      0














      The file /etc/sysconfig/i18n is the place to make changes. But it contains the proper settings in your example. No change should be made to /etc/sysconfig/keyboard (if it worked, leave it alone). Actually on my Centos6.x, I have a directory at /etc/sysconfig/console (which could contain a keymaps) — and a mailing list discussion from 2002 hints that it has been a directory at least that long.. Some other systems have a file there, e.g., Linux From Scratch.



      To get "ASCII" as requested means that you have to change your system locale, which is set in /etc/sysconfig/i18n using the LANG property. By default, that would have



      LANG="en_US.UTF-8"
      SYSFONT="latarcyrheb-sun16"


      (or some other LANG with "UTF-8", giving more or less the same effect). I changed my machine to match yours, checking that the values matched the machine:



      LANG="en_US.iso88591"
      SYSFONT="iso01.16"


      that is, the LANG value is in locale -a:



      en_SG.utf8
      en_US
      en_US.iso88591
      en_US.iso885915
      en_US.utf8
      en_ZA


      and SYSFONT is the name of a console font file:



      /lib/kbd/consolefonts/iso01.16.gz


      After making the change, I rebooted and see "ASCII" behavior on each of the tty's (2-6, since X is running on tty1). But checking with showconsolefont shows that it still loads the original font. That is set in /boot/grub/grub.conf. Editing that file to change the SYSFONT=latarcyrheb-sun16 to SYSFONT=iso01.16 gives the desired effect. Here is a screenshot:



      screenshot after changing SYSFONT in CentOS6



      That is, the ISO-8859-1 font is loaded. The keyboard (being US) will only do "ASCII" without some interesting keymap.



      Further reading:





      • Appendix D. The sysconfig Directory (Red Hat)


      • 28.1.13. /etc/sysconfig/i18n (CentOS 5: users of 6 and 7 are directed to Red Hat)






      share|improve this answer


























        0












        0








        0







        The file /etc/sysconfig/i18n is the place to make changes. But it contains the proper settings in your example. No change should be made to /etc/sysconfig/keyboard (if it worked, leave it alone). Actually on my Centos6.x, I have a directory at /etc/sysconfig/console (which could contain a keymaps) — and a mailing list discussion from 2002 hints that it has been a directory at least that long.. Some other systems have a file there, e.g., Linux From Scratch.



        To get "ASCII" as requested means that you have to change your system locale, which is set in /etc/sysconfig/i18n using the LANG property. By default, that would have



        LANG="en_US.UTF-8"
        SYSFONT="latarcyrheb-sun16"


        (or some other LANG with "UTF-8", giving more or less the same effect). I changed my machine to match yours, checking that the values matched the machine:



        LANG="en_US.iso88591"
        SYSFONT="iso01.16"


        that is, the LANG value is in locale -a:



        en_SG.utf8
        en_US
        en_US.iso88591
        en_US.iso885915
        en_US.utf8
        en_ZA


        and SYSFONT is the name of a console font file:



        /lib/kbd/consolefonts/iso01.16.gz


        After making the change, I rebooted and see "ASCII" behavior on each of the tty's (2-6, since X is running on tty1). But checking with showconsolefont shows that it still loads the original font. That is set in /boot/grub/grub.conf. Editing that file to change the SYSFONT=latarcyrheb-sun16 to SYSFONT=iso01.16 gives the desired effect. Here is a screenshot:



        screenshot after changing SYSFONT in CentOS6



        That is, the ISO-8859-1 font is loaded. The keyboard (being US) will only do "ASCII" without some interesting keymap.



        Further reading:





        • Appendix D. The sysconfig Directory (Red Hat)


        • 28.1.13. /etc/sysconfig/i18n (CentOS 5: users of 6 and 7 are directed to Red Hat)






        share|improve this answer













        The file /etc/sysconfig/i18n is the place to make changes. But it contains the proper settings in your example. No change should be made to /etc/sysconfig/keyboard (if it worked, leave it alone). Actually on my Centos6.x, I have a directory at /etc/sysconfig/console (which could contain a keymaps) — and a mailing list discussion from 2002 hints that it has been a directory at least that long.. Some other systems have a file there, e.g., Linux From Scratch.



        To get "ASCII" as requested means that you have to change your system locale, which is set in /etc/sysconfig/i18n using the LANG property. By default, that would have



        LANG="en_US.UTF-8"
        SYSFONT="latarcyrheb-sun16"


        (or some other LANG with "UTF-8", giving more or less the same effect). I changed my machine to match yours, checking that the values matched the machine:



        LANG="en_US.iso88591"
        SYSFONT="iso01.16"


        that is, the LANG value is in locale -a:



        en_SG.utf8
        en_US
        en_US.iso88591
        en_US.iso885915
        en_US.utf8
        en_ZA


        and SYSFONT is the name of a console font file:



        /lib/kbd/consolefonts/iso01.16.gz


        After making the change, I rebooted and see "ASCII" behavior on each of the tty's (2-6, since X is running on tty1). But checking with showconsolefont shows that it still loads the original font. That is set in /boot/grub/grub.conf. Editing that file to change the SYSFONT=latarcyrheb-sun16 to SYSFONT=iso01.16 gives the desired effect. Here is a screenshot:



        screenshot after changing SYSFONT in CentOS6



        That is, the ISO-8859-1 font is loaded. The keyboard (being US) will only do "ASCII" without some interesting keymap.



        Further reading:





        • Appendix D. The sysconfig Directory (Red Hat)


        • 28.1.13. /etc/sysconfig/i18n (CentOS 5: users of 6 and 7 are directed to Red Hat)







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 26 '16 at 23:58









        Thomas DickeyThomas Dickey

        52.2k594165




        52.2k594165






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f134744%2fset-the-default-keyboard-type-to-ascii-mode%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            CARDNET

            Boot-repair Failure: Unable to locate package grub-common:i386

            Aws NAT - Aws IGW- Aws router