Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I designed a keyboard layout for myself, after I run xmodmap it works OK, but after standby or reboot, the layout turn back to qwerty.

How can I set it as default? My OS is Debian Wheezy with XFCE4.

share|improve this question
    
I have the same problem, debian jessie with xfce4. –  John Lawrence Aspden Sep 3 at 16:31

2 Answers 2

Check out this archlinux forum thread Xmodmap Reset after Suspend to RAM. There are several examples in the thread that'll get you started and show you how to setup a hook which will get triggered via the power management subsystem that will run your xmodmap setup each time you come out of suspend.

share|improve this answer

Premilinary note: you shouldn't use the obsolete xmodmap command, but XKB (xkbcomp).

Then you can change the settings from your ~/.xsession script. Personally I have:

setxkbmap -types local -print | \
  sed -e '/xkb_symbols/s/"[[:space:]]/+local&/' > $HOME/.xkb/keymap/custom
xkbcomp -w0 -I$HOME/.xkb -R$HOME/.xkb keymap/custom $DISPLAY

in my ~/.xsession file, and my XKB settings are put in ~/.xkb/symbols/local and ~/.xkb/types/local files. This will change the settings after each X login.

Unfortunately these settings are lost after suspend/resume. There's a workaround: save them and restore them via pm-utils with a script in the /etc/pm/sleep.d directory; you may need

xhost +si:localuser:root

in your ~/.xsession script since root doesn't have your xauth information. I have given an example (for XKB): https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=633849#92

share|improve this answer

Your Answer

 
discard

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.