How to tell GNOME menu items about environment variables?

Gernot Hassenpflug aikishugyo at gmail.com
Wed Feb 20 15:18:28 UTC 2008


On Feb 20, 2008 11:42 PM, Derek Broughton <news at pointerstop.ca> wrote:
>
> Rashkae wrote:
>
> > Gernot Hassenpflug wrote:
> >> Hello,
> >>
> >> I am trying to get a Japanese input method to work with an application
> >> launched from GNOME. This works fine from the terminal with:
> >>
> >> $ export LANGUAGE="ja_JP.UTF-8"
> >> $ export LANG="ja_JP.UTF-8"
> >> $ export LC_ALL="ja_JP.UTF-8"
> >> $ export XMODIFIERS="@im=kinput2"
> >> $ kinput2-canna &
> >> $ <execute command exactly as in GNOME menu item>
> >>
> >> However, I cannot figure out how to include the environment variable
> >> settings in the GNOME menu item command. Whatever combinations I have
> >> tried, the error is returned that the file or directory does not
> >> exist; i.e., GNOME cannot parse the combination of settings and
> >> commands.
> >>
> >
> > Put all those commands in a shell scrip.
> >
> > Create a new file:
> >
> > gedit ~/bin/runme
> >
> > #!/bin/sh
> > export LANGUAGE="ja_JP.UTF-8"
> > export LANG="ja_JP.UTF-8"
> > export LC_ALL="ja_JP.UTF-8"
> > export XMODIFIERS="@im=kinput2"
> > kinput2-canna &
> > <execute command exactly as in GNOME menu item>
> >
> >
> If all you want is to make _one_ app run with the correct settings in Gnome,
> edit the menu entry as:
>
>  LANGUAGE="ja_JP.UTF-8"  LANG="ja_JP.UTF-8" LC_ALL="ja_JP.UTF-8" \
>   XMODIFIERS="@im=kinp kinput2-canna
>
> (though I doubt you need all three methods to set the language)

Hi there, thanks, this is along the lines of what I tried. However,
the command is already in quote marks, and when I added other things
to it (without quote marks) GNOME complained about a file/directory
not found. I.e., it could not parse this properly. And doing something
like this (typos corrected I hope?):

LANGUAGE="ja_JP.UTF-8"  LANG="ja_JP.UTF-8" LC_ALL="ja_JP.UTF-8" \
 XMODIFIERS="@im=kinput2-canna" "<command for application to launch>"

did not work with just kinput. I will try kinput-canna at the machine
in question tomorrow morning. Hence my question about the correct
syntax for modifying the menu item command. BTW, the command to be
modified is the launcher for MS Word 2003 installed using Codeweavers
Crossover Linux 6.2.0.

Regards, Gernot




More information about the ubuntu-users mailing list