Ubuntu – How to run a particular command at startup

autostartscripts

I don't understand scripts or how to make them or how to run them. All I want to do is run the command xmodmap -e "keycode 112 = Delete" when my computer starts. When I run this command in terminal, it remaps the PgDn key to be a second Delete key. But then I have to run it again every time I start the computer. How can I do this? I've tried adding it as a line in the rc.local file but it doesn't work.

Best Answer

You can make it run at boot by adding it in startup applications. Open startup applications from the dash. Click 'Add' and put xmodmap -e "keycode 112 = Delete" in the 'Command' field. Give it a name and comment if you want. Click 'Add' and login again.

enter image description here

Related Question