[PC-BSD Testing] ja-ibus-anthy missing and cannot install

Kris Moore kris at pcbsd.org
Mon Jan 27 12:14:08 PST 2014


On 01/27/2014 15:06, Yamashiro, Jun wrote:
> On Mon, 27 Jan 2014 13:19:40 -0500
> Ken Moore <ken at pcbsd.org> wrote:
>
>> As you mentioned, I don't think that hard-coding this type of thing into 
>> PCDM is the answer....
>>
>> Did you also fix the /usr/local/share/pcbsd/enable-ibus.sh script so 
>> that "GDM_LANG" (near the top of the script) is now just "LANG"? That 
>> was another fix that I put in last Friday.
>> That script looks like it is supposed to be setting those environment 
>> variables, so the problem might just lie there.
> Yes.  I fixed variable name into "LANG".  But, cannot work properly.
>
> Please check PCDM code.
> https://github.com/pcbsd/pcbsd/blob/master/src-qt4/PCDM/src/pcdm-xprocess.cpp#L145
> | this->start("sh "+xhome+"/.xprofile");
>
> This line show .xprofile run as "program".  This is cause of luck of variables.
>  
> This chart shows cause of luck of variable.
>
> PCDM: Start login
> |
> ($QT_IM_MODULE is not set)
> |
> +------- sh .xprofile -------+ fork() and exec()
> |                            |
> |                            . /path/to/enable-ibus.sh
> |                            |
> |                            export QT_IM_MODULE=ibus
> |                            |
> |($QT_IM_MODULE is not set)  |($QT_IM_MODULE=ibus)
> |                            |
> |                            (end of .xprofile)
> |
> |($QT_IM_MODULE is not set)
> |
> | <- My patch is defined here.
> |
> Start X session
>
> see also:
> https://developer.apple.com/library/mac/documentation/opensource/conceptual/shellscripting/SubroutinesandScoping/SubroutinesandScoping.html#//apple_ref/doc/uid/TP40004268-TP40003513-SW5
>

Ahh yes, this makes sense. Ken, you will need to adjust your code to not
just "sh .xprofile" but rather to "source" it ". .xprofile". There are
multiple ways to do this, but here's one:

When starting the DE, create a script or a single command-chain that
looks like this:

( ". .xprofile ; /usr/local/bin/startDE" )

This will ensure that the variables in .xprofile get set and stay set
when the actual DE begins to run. Right now the QProcess is running and
finishing and those new variables get lost when the DE starts up later.

So you may want to do this:

cmd = ". "+xhome+"/.xprofile ; ";
cmd.append("dbus-launch --exit-with-session" + xcmd);

(The first DOT does the sourcing)

-- 
Kris Moore
PC-BSD Software
iXsystems



More information about the Testing mailing list