I've got it so that I can enable Japanese input into an application by typing the following at a command prompt (with FireFox, for example): [dave@localhost ~]$ kinput2 -canna & [1] 10631 [dave@localhost ~]$ XMODIFIERS='@im=kinput2' LC_CTYPE=ja_JP.utf8 firefox
However, I would rather not have to type in all that craziness each time I want to start an application. Further, instead of having to configure each application individually, it would be better to have this setting just on all the time for every application, both existing and new.
I was under the impression this was possible. Following advice gained elswhere, I thought I could put the following into /etc/X11/Xresources: ! Japanese Input #!/bin/sh XMODIFIERS='@im=kinput2' LC_CTYPE=ja_JP.utf8 kinput2 -canna &
But doing so results in Japanese input not being available for any application.
I'm using KDE, and I learned that I should be able to put any shell script in the ~/.kde/Autostart/ directory and have it launch on start. So I put a file there called j-input.sh, changed it's permissions with chmod 755, and put the same commands that I had in Xresources.
But still no result.
Long story short: How do I get these command line settings to be permanently on: XMODIFIERS='@im=kinput2' LC_CTYPE=ja_JP.utf8 kinput2 -canna &
Dave
On Sat, 2005-08-13 at 18:15 +0900, Dave Gutteridge wrote:
I've got it so that I can enable Japanese input into an application by typing the following at a command prompt (with FireFox, for example): [dave@localhost ~]$ kinput2 -canna & [1] 10631 [dave@localhost ~]$ XMODIFIERS='@im=kinput2' LC_CTYPE=ja_JP.utf8 firefox
However, I would rather not have to type in all that craziness each time I want to start an application. Further, instead of having to configure each application individually, it would be better to have this setting just on all the time for every application, both existing and new.
I was under the impression this was possible. Following advice gained elswhere, I thought I could put the following into /etc/X11/Xresources: ! Japanese Input #!/bin/sh XMODIFIERS='@im=kinput2' LC_CTYPE=ja_JP.utf8 kinput2 -canna &
But doing so results in Japanese input not being available for any application.
I'm using KDE, and I learned that I should be able to put any shell script in the ~/.kde/Autostart/ directory and have it launch on start. So I put a file there called j-input.sh, changed it's permissions with chmod 755, and put the same commands that I had in Xresources.
But still no result.
Long story short: How do I get these command line settings to be permanently on: XMODIFIERS='@im=kinput2' LC_CTYPE=ja_JP.utf8 kinput2 -canna &
You should be able to put this in your (the user you login as) ~/.bash_profile:
export XMODIFIERS='@im=kinput2' export LC_CTYPE=ja_JP.utf8 /usr/X11R6/bin/kinput2 -canna &
If that works, and if you need them for all users, you can later move them to a file named ja-support in /etc/profile.d/
-------------
That might not be the best solution though.
I don't know how iiimf works ... but I notice that there are plenty of files in /etc/X11/xinit/xinput.d and /etc/X11/xinit/xinitrc.d for CentOS-4 that are related to iiimf, there has to be another way to make it autoload.
On Sat, 2005-08-13 at 05:40 -0500, Johnny Hughes wrote:
On Sat, 2005-08-13 at 18:15 +0900, Dave Gutteridge wrote:
I've got it so that I can enable Japanese input into an application by typing the following at a command prompt (with FireFox, for example): [dave@localhost ~]$ kinput2 -canna & [1] 10631 [dave@localhost ~]$ XMODIFIERS='@im=kinput2' LC_CTYPE=ja_JP.utf8 firefox
However, I would rather not have to type in all that craziness each time I want to start an application. Further, instead of having to configure each application individually, it would be better to have this setting just on all the time for every application, both existing and new.
I was under the impression this was possible. Following advice gained elswhere, I thought I could put the following into /etc/X11/Xresources: ! Japanese Input #!/bin/sh XMODIFIERS='@im=kinput2' LC_CTYPE=ja_JP.utf8 kinput2 -canna &
But doing so results in Japanese input not being available for any application.
I'm using KDE, and I learned that I should be able to put any shell script in the ~/.kde/Autostart/ directory and have it launch on start. So I put a file there called j-input.sh, changed it's permissions with chmod 755, and put the same commands that I had in Xresources.
But still no result.
Long story short: How do I get these command line settings to be permanently on: XMODIFIERS='@im=kinput2' LC_CTYPE=ja_JP.utf8 kinput2 -canna &
You should be able to put this in your (the user you login as) ~/.bash_profile:
export XMODIFIERS='@im=kinput2' export LC_CTYPE=ja_JP.utf8 /usr/X11R6/bin/kinput2 -canna &
If that works, and if you need them for all users, you can later move them to a file named ja-support in /etc/profile.d/
That might not be the best solution though.
I don't know how iiimf works ... but I notice that there are plenty of files in /etc/X11/xinit/xinput.d and /etc/X11/xinit/xinitrc.d for CentOS-4 that are related to iiimf, there has to be another way to make it autoload.
With a little more research, I found:
Main Menu Button [on the Panel] => Preferences => More Preferences => Sessions
There is some good help in there concerning running things with X startup.
Also see this: http://mirror.centos.org/centos/4/docs/html/rhel-rg-en-4/s1-x-runlevels.html
Johnny,
Sweet! Putting the settings in ~/.bash_profile as you suggest has made it work perfectly! Thank you! You'll notice from my use of exclamation points that I'm really psyched about this. I've been wanting Japanese support for weeks, and now I finally have it the way I want.
I think it might be ideal to have this setting for "all users", but as I'm currently the only user of this machine, that's really an academic point. But still, I'm curious to know if it's possible. You suggest putting the settings in a file called /etc/profile.d, but then you also say that might not be the best solution. Is there a reason you think there might be some dangers there, or is that just being open to the idea that there might be more elegant solutions?
Also, I notice I don't have a Sessions application anwywhere on my menu. Of course I first searched where you said it would be, and then I looked in other areas, and can't find it. Is this a deficiency of my set up, or do I have to specify to have it available?
Dave
Hello,
There is an alternative way (other than the one suggested by Johhy Hughes) that is provided by KDE.
On startup kde executes all scripts in ~/.kde/Autostart but these scripts can NOT modify the global/future environment (setting variables like XMODIFIERS and LC_TYPE) as you did notice...
...but there is a way! kde has another special directory ~/.kde/env that works the same way _BUT_ adds to the global/future environment. So you could add the suggested piece of shell-script to (for example) ~/.kde/env/jap_input.sh
/Peter
On Saturday 13 August 2005 11.15, Dave Gutteridge wrote:
I've got it so that I can enable Japanese input into an application by typing the following at a command prompt (with FireFox, for example): [dave@localhost ~]$ kinput2 -canna & [1] 10631 [dave@localhost ~]$ XMODIFIERS='@im=kinput2' LC_CTYPE=ja_JP.utf8 firefox
However, I would rather not have to type in all that craziness each time I want to start an application. Further, instead of having to configure each application individually, it would be better to have this setting just on all the time for every application, both existing and new.
I was under the impression this was possible. Following advice gained elswhere, I thought I could put the following into /etc/X11/Xresources: ! Japanese Input #!/bin/sh XMODIFIERS='@im=kinput2' LC_CTYPE=ja_JP.utf8 kinput2 -canna &
But doing so results in Japanese input not being available for any application.
I'm using KDE, and I learned that I should be able to put any shell script in the ~/.kde/Autostart/ directory and have it launch on start. So I put a file there called j-input.sh, changed it's permissions with chmod 755, and put the same commands that I had in Xresources.
But still no result.
Long story short: How do I get these command line settings to be permanently on: XMODIFIERS='@im=kinput2' LC_CTYPE=ja_JP.utf8 kinput2 -canna &
Dave