Ubuntu – How to apply Xmodmap permanently

keyboardkeyboard-layoutxmodmap

I had to make some changes to the xmodmap in my home directory. When i execute xmodmap ./.Xmodmap everthing works as expected. But i can't figure out how to apply this permanently. I tried to add it to a file called .xinitrc liek suggested in other questions here but it's just not working.

My system is freshly installed 13.04 64bit.

Best Answer

You can use gnome-session-properties (in the Dash can be found by typing Startup - it will find the Startup Applications Preferences application:

see:

screenshot

Then add a new command for xmodmap. Use the absolute path to the file you want to launch with xmodmap:

see:

screenshot

You can also switch back to a “normal” layout using: setxkbmap -layout fr (replace “fr” with “us” or your keyboard layout variant).

Related Question