Contents
How do I set xmodmap on login?
As my keyboard layout doesn’t suit me, I run xmodmap on login. The script is named .profile and it runs OK, but it breaks the Unity interface. I want to know where to put the xmodmap line so that it executes on my login and doesn’t break anything.
Where do I put my xmodmap Keys record?
However, if you put xmodmap ~/.Xmodmap instead of test file record, keys mapping stays default. It means that default xmodmap overrides settings when xinitrc already started. As said above by @kontrollanten, the most reliable way is to create a .desktop file and put it into ~/.config/autostart directory.
Which is read at startup xmodmap or xinputrc?
It is often confusing which of the various X files (such as .xprofile, .xinitrc, etc) are read at startup, but .xinitrc does seem to be still read under 12.04, whereas .Xmodmap or .xinputrc are not read by themselves. I’m using ElementaryOS (with its GNOME based window manager) and found a solution through using xdg autostart scripts.
Do you have to run xmodmap to change keyboard layout?
Each time setxkbmap is run to change keyboard layout, you will have to run xmodmap ~/.Xmodmap again in the terminal. Your Xmodmap file should not have entries in the xmodmap -e ” ” style as that is used in the terminal for temporarily setting the values. It must have entries in this format:
Why is my xmodmap command not running on startup?
I put the command in System > Preferences > Startup Applications. I put it in a .sh file, marked it chmod +x and put that file in System > Preferences > Startup Applications. I put the script in /etc/init.d. I put the commands in ~/.profile. Nothing seems to work. Both test1 and test2 get created, but the keys are still not remapped.
Where do I put xmodmap changes in Ubuntu?
Putting xmodmap changes in ~/.bashrc or /etc/bash.bashrc doesn’t break anything. Only downside is that one has to open a terminal after each boot to get it activated. Thanks for contributing an answer to Ask Ubuntu!
How to revert xmodmap expression in Ubuntu?
To revert, just xmodmap ~/xmodmap_original. To create your own map, just create a file with xmodmap expressions, then have xmodmap read it xmodmap file_name. Name your xmodmap config file as ~/.Xmodmap. It’ll automatically load if you are using Ubuntu.