0

I'm trying to remap my keyboard by using the following line:

xmodmap -e "keycode 94 = backslash"

It works but it will return back to default after restarts.

How do I run this command every time I start up the computer?

I'm a extreme beginner please give me a step-by-step guide.

Thank you!

  • I believe there is a way to make that line of code into a small program, then add it to your Startup Aplications list. Let me look into it a little more. – Drew Stewart May 25 '14 at 17:43

2 Answers2

0

Simply, you can add your command to /etc/rc.local and it will be executed on system startup.

sudo echo "xmodmap -e \"keycode 94 = backslash\"" >> /etc/rc.local
0

Create a file in ~/.config/autostart with a name ending in .desktop (e. g. xmodmap-backslash-94.desktop) and fill it with this:

[Desktop Entry]
Exec=xmodmap -e "keycode 94 = backslash"
Terminal=false
Type=Application
X-GNOME-Autostart-enabled=true
Name=Modify keymap
Comment=Put backslash on key 94

The last two lines can be edited to your likes.

David Foerster
  • 36,264
  • 56
  • 94
  • 147