Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Change Keyboard Layout permanently

    General pfSense Questions
    3
    14
    9.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • junicastJ
      junicast
      last edited by

      Hi,

      I know there are several threads regarding keyboard layout but none answers my question.
      I'm running pfSense 2.4.4p3 on two Xeon Server with CARP/HA.
      During Installation I changed German keyboard layout but it doesn't seem to affect the installation. It's still US American layout. Weird, right?
      I changed the default behaviour of the system to ask for a password for people who connect to the console directly.
      Having some kbdcontrol in .profile won't help me since the Administrator needs to type in the password which - of course - contains special characters and the .profile is loaded after successful login.
      Our Admins all are German so they have absolutely no clue where to reach { or * or + or similar on the keyboard.
      Is there an official way to switch the layout permanently? The only other option I see is to get rid of special characters in the password.

      Thank you

      1 Reply Last reply Reply Quote 0
      • kiokomanK
        kiokoman LAYER 8
        last edited by kiokoman

        did you try this perhaps?
        https://www.freebsd.org/doc/handbook/using-localization.html

        specifically this for the file /etc/csh.login

        22.2.1.2. Shell Startup File Method

        However, the name of the configuration file and the syntax used differs for the csh shell. These are the equivalent settings for ~/.csh.login, /etc/csh.login, or /usr/share/skel/dot.login:

        setenv LANG de_DE.ISO8859-1
        setenv MM_CHARSET ISO-8859-1
        

        ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
        Please do not use chat/PM to ask for help
        we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
        Don't forget to Upvote with the 👍 button for any post you find to be helpful.

        junicastJ 1 Reply Last reply Reply Quote 1
        • junicastJ
          junicast
          last edited by

          I will give it a shot, thank you.

          1 Reply Last reply Reply Quote 0
          • junicastJ
            junicast @kiokoman
            last edited by

            @kiokoman
            Sadly nothing I tried worked. I can change the keyboard map after login manuallyl by running kbdmap or kbdcontrol but I can't find a way to make this permanent (reboot/upgrade).
            This is a bug I found but I can't find any help in there, too:
            https://redmine.pfsense.org/issues/807

            1 Reply Last reply Reply Quote 0
            • kiokomanK
              kiokoman LAYER 8
              last edited by

              how do you connect to pfsense?
              i have
              setenv LANG it_IT.ISO8859-1
              setenv MM_CHARSET ISO-8859-1
              on my machine inside csh.login and it's working for me, but i connect via ssh with putty

              ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
              Please do not use chat/PM to ask for help
              we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
              Don't forget to Upvote with the 👍 button for any post you find to be helpful.

              junicastJ 1 Reply Last reply Reply Quote 0
              • junicastJ
                junicast @kiokoman
                last edited by

                @kiokoman
                It's not about ssh connections. They work fine out of the box for me.
                My concern is console logins for people who need access to the machine via keyboard/video/mouse in cases of emergency for example.

                1 Reply Last reply Reply Quote 0
                • stephenw10S
                  stephenw10 Netgate Administrator
                  last edited by

                  It you can set it manually you can just have that command run at boot everytime:
                  https://docs.netgate.com/pfsense/en/latest/development/executing-commands-at-boot-time.html

                  Steve

                  1 Reply Last reply Reply Quote 1
                  • junicastJ
                    junicast
                    last edited by

                    I tried the shellcmd option but keyboard layout still is qwerty.
                    This is how I changed the configuration:

                    <pfsense>
                            <shellcmd>/usr/sbin/kbdcontrol -l /usr/share/syscons/keymaps/german.iso.kbd</shellcmd>
                            <version>19.1</version>
                            <lastchange></lastchange>
                            <system>
                            ...
                    </pfsense>
                    
                    1 Reply Last reply Reply Quote 0
                    • stephenw10S
                      stephenw10 Netgate Administrator
                      last edited by

                      Hmm, when you set that manually and it works do you have to do from the console on question?

                      If you ssh in as admin and run it the physical console remains unchanged?

                      Steve

                      junicastJ 1 Reply Last reply Reply Quote 0
                      • junicastJ
                        junicast @stephenw10
                        last edited by

                        @stephenw10 said in Change Keyboard Layout permanently:

                        Hmm, when you set that manually and it works do you have to do from the console on question?

                        yes, I have to enter the kbdcontrol command after successful login in order to change the keyboard layout to German.

                        If you ssh in as admin and run it the physical console remains unchanged?

                        Steve

                        I don't understand. Why should I do that?

                        1 Reply Last reply Reply Quote 0
                        • stephenw10S
                          stephenw10 Netgate Administrator
                          last edited by

                          To test whether that has to be at the console directly to change it, which I think it does.
                          In which case it needs somehow redirecting to run it as a shellcmd.

                          Steve

                          junicastJ 1 Reply Last reply Reply Quote 0
                          • junicastJ
                            junicast @stephenw10
                            last edited by

                            @stephenw10
                            I just tested it.
                            When I invoke kbdcontrol in an ssh session the keyboard layout on the physical console does NOT change accordingly.

                            1 Reply Last reply Reply Quote 0
                            • stephenw10S
                              stephenw10 Netgate Administrator
                              last edited by

                              Ok that's what I thought. Deeper dive into FreeBSD needed....

                              1 Reply Last reply Reply Quote 0
                              • junicastJ
                                junicast
                                last edited by

                                I filed a feature request since I think there should be an easy option for everyone in the GUI to change the console's keyboard layout permanently.
                                https://redmine.pfsense.org/issues/9942

                                1 Reply Last reply Reply Quote 3
                                • First post
                                  Last post
                                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.