Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently installed awesome on my ubuntu oneiric, a nice window manager. This doesn't seem to inherit the keyboard settings that were set in the Unity settings.

Now, the problem is, I can't seem to find the correct keyboard layout to set (using setxkbmap). The control panel in Unity just states "US", bet with

setxkbmap -layout us

some keys don't work correctly on my macbook pro 8,2. Does anyone here know the correct settings?

share|improve this question
Just guessing: setxkbmap -layout us -variant mac, or setxkbmap -model macbook78 (or macbook79 for the international keyboard) – hhaamu Mar 6 '12 at 8:06
none of the above work. The problem is that the ~ key should be left to the z key, but instead it is left to the 1 key. – romeovs Mar 6 '12 at 11:51
ok I just edited the files, and it works using setxkbmap. How do I make this permanent (e.g. call setxkbmap on ubuntu, using awesome wm)? – romeovs Mar 7 '12 at 13:37
up vote 1 down vote accepted

The point was that the mac us keymap (setxkbmap -layout us -variant mac) had some keys at the wrong spot.

I edited /usr/share/X11/xkb/symbols/us, where it seemed that the TLDE and LSGT key are switched in the mac section. Loading setxkbmap -layout us -variant mac does the trick now.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.