How to configure keyboard setup on Linux RedHat?

Posted on 1999-08-02
Medium Priority
Last Modified: 2012-08-14
I just installed a Linux RedHat 5.2 system which is working fine. Using the setup command I can define my keyboard layout which is a Swiss French.
Now,I start X system (using startx command) and unfortunatly, the keyboard setup is not okay at all.

What should I do (I'm using the default Fvwm system) in order to have my keyboard set correctly.
Question by:joel011197
  • 2

Expert Comment

ID: 1585988
When you were defining your system settings at install time it should have set up the X settings aswell. If it's not right then you will need to change your XF86Config file (under /etc/X11 in RedHat I think). You can either do this by running 'XF86Setup' (the easiest option), 'xf86config' (not quite so user friendly) or by hand editing the file using your favourite editor (if you know what you are doing). Before you run XF86Setup (if thats the way you choose to go) then make sure you have all the information about your hardware to hand, although if you entered the right information at install time then this shouldn't be a problem, it will be all the same except you need to make sure that you define the correct keyboard.

Author Comment

ID: 1585989
Thank you for your feedback, I already found info about the XF86config file. Now I have the right setup for most of the keyboard but character like "@", "#" cannot be obtained. On Swiss French keyboard you need to press "Alt Gr + 2" to get the "@". On my Linux system it does not work. Why?

Expert Comment

ID: 1585990
Have you tried one of the other keyboard types? I'm afraid that I don't know much about any of the foreign keyboard types except for the UK101 that I use myself. Does "alt gr + 2" work under console mode in Linux, is the problem just under X? If it works under console mode then the problem should be fairly easy to fix, if not then the problem might be slightly more complicated. What I would recommend doing is trying out a few of the different keyboard settings that are available and seeing if any of them work. If not you may want to have a look at the Keyboard and Console HOWTO, which should be available at metalab.unc.edu/pub/Linux/docs/HOWTO


Accepted Solution

HalldorG earned 150 total points
ID: 1585991
There are some tricks that can be done.

First to get the correct font in console and the correct

change /etc/sysconfig/keyboard

/etc/rc.d/init.d/keytable the start script

                # Load the proper keymap
                echo -n "Loading keymap: "
                . /etc/sysconfig/keyboard
                if [ "${KEYTABLE:-bogus}" != "bogus" ]; then
                # Specify VT0 in case we use a serial console
                        loadkeys $KEYTABLE < /dev/tty0 > /dev/tty0
                if [ "${SYSFONT:-bogus}" != "bogus" ]; then
                        setfont $SYSFONT

That will give you correct fonts in vi and correct keyboard
to correct bash then

create or edit
~/.inputrc to

set convert-meta off
set meta-flag on
set output-meta on        

This will allow for deadkeys

Then it is the /etc/X11/XF86Config file

the keyboard section should look like

Section "Keyboard"
          Protocol    "Standard"
          AutoRepeat  500 5
          LeftAlt     Meta
          RightAlt    ModeShift
          RightCtl    Compose
          ScrollLock  ModeLock
          XkbRules    "xfree86"
          XkbModel    "pc101"
          XkbLayout   "fr"
          Xkbkeycodes "xfree86"
          XkbTypes    "default"
          XkbCompat   "default"
          XkbSymbols  "fr(pc101)"
          XkbGeometry "pc"

One more thing the
add there

export LANG          

Or whatever is correct language setting for what
you are useing.

Hope this help

Halldor G.


Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Watch the video of Kernel Migrator for SharePoint, which demonstrate the process easily of migration from SharePoint to SharePoint, OneDrive for Business & Google Drive servers, Public Folder to SharePoint, File Server to SharePoint. The tool has va…

588 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question