Ubuntu – Script at Startup

10.10scriptsstartupxmodmap

I'm using 10.10 and I need to run a script in order to get a windows-like international keyboard layout – basically, it changes how dead keys work.

(Original script from this page http://t.tam.atbh.us/en/win-us-intl-4-linux/ )

Since I can't seem to manage to get it going from boot, I have to run a custom script to launch any application.


The script:

export GTK_IM_MODULE=xim

setxkbmap us intl 

xmodmap -e 'keycode 48 = dead_acute dead_diaeresis dead_acute dead_diaeresis acute diaeresis'

application_name

So if I put abiword in the application_name, it runs abiword respecting the keyboard script.


Ideally, the original script would start at boot and then any applications I use would function with it – just like what happens if I run it first in Terminal (without the app_name line) and then run apps from it. I tried to make the script run from boot by adding it to /etc/rc.local but to no avail. Tried to add it to init.d but that also didn't work.

If anyone can help, I'd be most grateful.

Best Answer

You should be able to add the script using "Startup Applications" (just search for it with unity).

enter image description here

*edit: Saw you were using 10.10. You should still be able to use "Startup Applications", but I think you can find it in system > preferences, since you probably don't have unity.

Related Question