[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: A question about /etc/profile (was: Scim does not work with openoffice)



On Thu, Feb 5, 2009 at 8:19 PM, Rodolfo Medina <rodolfo.medina@gmail.com> wrote:
> Lisi Reisz <lisi.reisz@gmail.com> writes:
>
>>> >>>>> I added the following lines to /etc/profile:
>>> >>>>>
>>> >>>>> export XMODIFIERS=@im=SCIM
>>> >>>>> export GTK_IM_MODULE=scim
>>> >>>>> export QT_IM_MODULE=scim
>
>
>
> Rodolfo Medina wrote:
>
>>>  $ source script
>>>
>>> has the same effect than running those three commands from command line.
>>> Instead, putting them in /etc/profile is more powerful, it gets more
>>> effects. It seems there's no alternative to that?
>
>
>
> Lisi Reisz <lisi.reisz@gmail.com> writes:
>
>> The place I got that from said that you could put them in a user's own
>> profile file if you wanted them to be for one user only.  I haven't tested
>> that, and I can't remember the details.
>>
>> I'm not clear why you object to putting it in /etc/profiles?  I shan't be
>> using it myself very often - but I just wanted it to work, and by the
>> simplest (for me) method.
>
>
>
> Aneurin Price <aneurin.price@gmail.com> writes:
>
>> I'm not sure what you mean by 'more effects'. You can get the effect of
>> /etc/profile on a per user basis by adding commands to ~/.bash_profile (for
>> bash shells), ~/.profile (for most shells), ~/.xsession for X sessions - I
>> *think* this should be read by xdm/kdm/gdm and therefore work with any
>> desktop environment, but I'm not exactly sure how it's handled.  The one
>> thing you can't do (so far as I know) is set variables for your whole session
>> *after* logging in.
>
>
>
> We're talking about details, now the problem of scim working with oowriter
> seems to be solved.
>
> Anyway: putting those `export' commands in /etc/profile has the advantage that
> I can put chinese characters also in the command line, with `C-space'.  The
> disadvantage is that scim is automatically started every time I start the
> Terminal application, even if I don't want to use scim.  The Terminal is slowed
> down when starting.
>
> On the other hand, running those three commands from command line has the
> advantage that I start scim only when necessary; but then it seems that I lose
> the possibility of using scim to input characters in the shell.
>
> I don't know if it's clear...
>

I don't know anything about scim, or what terminal you're using, so I'm guessing
that it's a Gnome Terminal based on the fact that you've been talking about scim
with Gtk apps. I would imagine - and may be wrong - that the terminal uses the
environment variable to set its input method on start up, so in order to have
the ability to use those characters in the terminal, you would need to set those
variables in the parent process. One way of doing that is to put them in your
.xsessionrc (I said .xsession earlier, but I believe that was wrong). This
would, as you say, be equivalent for that user to putting them in /etc/profile,
so every Gtk application would use scim.

How are you starting your terminal? If you're using a menu entry, you could
create a duplicate entry, then edit the command from '/usr/bin/gnome-terminal' -
or whatever it is - to 'XMODIFIERS=@im=SCIM GTK_IM_MODULE=scim QT_IM_MODULE=scim
/usr/bin/gnome-terminal' and the environment variables would apply to that
terminal alone, allowing you to use Chinese characters there without using scim
everywhere. You could keep using the old menu entry when you don't need to write
in Chinese. Is that more like what you want?
(I hope that works. It should do if I've understood the situation.)

Thanks,
Nye


Reply to: