2

I'm running Ubuntu 13.10. When I remap keys using xmodmap using the instructions at How do I remap certain keys or devices? , the remapping works fine. But when I create the .xinitrc file as a plain text file with xmodmap .Xmodmap in the home folder, and restart the computer, I still lose the changes. I've also tried xmodmap ~/.Xmodmap but that made no difference. When I simply run xmodmap .Xmodmap in the command after booting, it does work. Any ideas?

Shane
  • 123
  • 3

2 Answers2

-1

You can make a script, to run each time you login.

  • Create an empty .sh file
  • Input your code inside. It can look like this:
#!/bin/bash
# This is my remapping to change AltGr with W. Edit it to work with yours.
sleep 25
xmodmap -e "remove mod1 = Alt_R"
xmodmap -e "keycode 108 = w W Cyrillic_ve Cyrillic_VE"
  • Make it executable.

  • Add it to Application Autostart tab of Session and Startup.

qxp
  • 91
  • 1
  • 12
-1

Try creating .xsessionrc instead. .xinitrc is only used by xinit, I believe - when X is started by a display manager like lightdm or gdm, I don't think it is sourced.

Steve Dee
  • 837
  • 4
  • 9