3

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.

enzotib
  • 96,093
OttoRobba
  • 225

3 Answers3

4

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.

1

I'm not 100% sure this will work but you could try creating a file called .xinitrc in your home folder with the contents:

export GTK_IM_MODULE=xim

setxkbmap us intl 

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

gnome-session &

then making the file executable and restart, chooseing 'User Defined Session' when you log in.

dv3500ea
  • 37,734
0

Add least the xmodmap part can be solved by putting it in the file ~/.Xmodmap (just the string content without the xmodmap -e'...'). Gnome and XFCE4 should parse the file on startup.

Grumbel
  • 4,879