File ~/.Xmodmap is not sourced on startup in 18.04
Apparently for gnome it should be ~/.xprofile
, but that file is executed too early for xmodmap
to work.
So I got it to work by creating .config/autostart/xmodmap.desktop
[Desktop Entry]
Type=Application
Exec=/home/tvbox/bin/modmap
Hidden=false
X-GNOME-Autostart-enabled=true
Name=xmodmap
Comment=xmodmap script
And in /home/tvbox/bin/modmap
, I have:
xmodmap ~/.Xmodmap