# Why will not my xmodmap command work on startup/login?

I intend to run this command every single time I visit (or every single time I start up, if that does not function) : xmodmap -e 'keysym Delete = Menu' -e 'keysym Menu = Delete'

I've attempted several points. I placed the command in System > Preferences > Startup Applications. I place it in a .sh documents, noted it chmod +x and also placed that documents in System > Preferences > Startup Applications. I placed the manuscript in /etc/init.d. I placed the commands in ~/.profile. Absolutely nothing appears to function.

Ultimately, I place this in my ~/.profile:

touch test1
touch test2


Both test1 and also test2 get developed, yet the keys are still not remapped. If I simply copy/paste the command and also run it by hand, it functions penalty. Yet it will not work on login. Any kind of suggestions?

0
2019-05-04 09:05:03
Source Share

Put it in ~/.xsessionrc and also see to it that /etc/X11/Xsession.options has allow-user-xsession.

0
2019-05-08 02:30:19
Source

Depending on your circulation the ~/.xsession documents is implemented (a shell manuscript ) when logging right into X. And/or the ~/.Xmodmap documents is sourced by an xmodmap procedure.

The ~/.profile documents is just implemented by a login shell (with or without X ), hence it is not the appropriate area

0
2019-05-07 22:37:11
Source