10
3
I want to run this command every time I log in (or every time I start up, if that doesn't work): xmodmap -e 'keysym Delete = Menu' -e 'keysym Menu = Delete'
I've tried many things. 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.
Finally, I put this in my ~/.profile
:
touch test1
xmodmap -e 'keysym Delete = Menu' -e 'keysym Menu = Delete'
touch test2
Both test1 and test2 get created, but the keys are still not remapped. If I just copy/paste the command and run it manually, it works fine. But it won't run on login. Any ideas?
For Gnome 3.10 no longer loading ~/.xmodmap, I found a solution that worked at the https://bbs.archlinux.org/viewtopic.php?pid=1194968#p1194968 : disable Gnome's keyboard plugin.
– plnx – 2015-02-03T21:59:05.933$ gsettings set org.gnome.settings-daemon.plugins.keyboard active false
Thanks, this worked perfectly. Out of curiosity, how would I get back to the dialog that I checked "don't ask me again" for if I wanted to some time in the future? – Matthew – 2010-09-06T20:33:17.567
1@Matthew: Untested: launch
gconf-editor
, browse to/desktop/gnome/peripherals/keyboard/general
, and edit theknown_file_list
entry to remove.Xmodmap
. – Gilles 'SO- stop being evil' – 2010-09-06T21:25:57.360This worked for me on the Ubuntu 10.10 beta back when you first answered this question. I did a fresh install of Ubuntu 10.10 yesterday, and put an identical .Xmodmap file in my home folder. When I logged back in, I got the dialog, loaded .Xmodmap, and ticked the box just like before. But it doesn't seem to be remapping the keys. I checked in gconf, and .Xmodmap is definitely in the known_file_list. Any ideas? – Matthew – 2010-09-18T16:47:59.820
This is also not working for me on Gnome 3.10.1/Archlinux. I wonder if something hasn't been adjusted in the order Gnome loads keyboard layouts. – Caleb – 2013-12-28T10:38:39.197