Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
I'm the creator of the script referred by the OP. Thanks everyone for your insight on this issue. I'll be reviewing the compatibility of my script with newest Linux distros, and letting you know how everything goes via the "official" page. –  Tamh Sep 25 '11 at 6:06

3 Answers 3

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.

share|improve this answer
    
Thanks but I tried that, no success. –  OttoRobba Jun 22 '11 at 4:14

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.

share|improve this answer
    
Hmm mea culpa on the login screen, I'm using elementaryOS (which is pretty much ubuntu 10.10 so I thought there wouldn't be any problems but I don't have session options so I guess there are). I did try adding the command with & to the .Xsession file but that... didn't work so well. :P I have more or less solved it through custom scripts and having alacarte link to them (and awn with custom icons). So it works 95%. –  OttoRobba Jun 22 '11 at 4:58

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.