Xue:

>> This is probably not a problem.  The purpose of the failsafe session is
>> that it avoids running as much setup as possible.  Users typically use
>> the failsafe session if they are having troubles logging in normally,
>> typically because there is a problem in the session startup.  By
>> avoiding sourcing normal configuration files (such as $HOME/.profile)
>> this helps to ensure that any errors in the startup scripts do not
>> cause the login to fail, allowing the user to try and fix the problem.
>> The failsafe session is not intended to be pretty.
>  From your explain, it seems that failsafe do not load more X fonts at 
> all. It's reasonable.
> So, xinitrc.d/0110.fonts would be a property place to add fonts path, 
> which Takao-san already
> done. I just need to do some modify.  :-)

Sounds reasonable to me.  Though it would be handy if you could share
a proposed patch for review that shows the changes you intend to make.

>> I don't think we should duplicate code.  Note that all scripts in the
>> /etc/X11/xinit/xinitrc.d directory get sourced.  They are run in numeric
>> order, so a script with the name 0100.foo gets run before 0110.fonts.
>> Couldn't you just add a new script to this directory rather than
>> changing the existing scripts?
> 
> Oh, sorry, I guess my description is not clear.  I do not want to add 
> new script beside 0110.fonts.
> I mean replace the 0110.fonts script with similar function. But it may 
> be called by different place,
> eg. called by Xsession or Init/Default.

Yes, that seems reasonable also.  Modifying the script so it is more
generally useful and can be called from other purposes seems a good
idea.

>>>  > Create a evn variable in XFONT_LOCALE to record the specific locale.
>>
>> What process or script would set this?
>>
>>>  > Let Init/Default call set_fonts_path script, and set current 
>>> locale to XFONT_LOCALE.
>>
>> Why not just edit Init/Default to set XFONT_LOCALE and run the
>> 0110.fonts script rather than duplicating code?
>>
>>>  > In xinit/xinitrc.d/0110.fonts, Check XFONT_LOCALE, if it is NULL, 
>>> or not same with current
>>>  locale value, cleanup current locale specific X fonts path. and 
>>> re-set it according to current locale.
>>
>> Couldn't you create a new script 0105.locale to cleanup locale specific
>> X fonts path and reset it to current locale?
> Could this function be done at Xsession?

There are probably many different ways we could solve this problem.
The /etc/X11/gdm/Xsession script already sources the files in
/etc/X11/xinit/xinitrc.d.  So, you could probably fix this by making
changes in the Xsession script directly.

However, note that this Xsession script is really a part of the GDM
module, while the files in /etc/X11/xinit/xinitrc.d are in a package
owned by Sun which contains Sun-specific modifications to how the
session startup should work.

Therefore, the /etc/X11/xinit/xinitrc.d scripts are a better place to
put Sun-specific configuration.  Putting distro-specific code in the
GDM Xsession script is not ideal since we then have to maintain a Sun
specific patch to make the change.  Such changes are hard to get
upstream.  So, if it is possible to address this issue in the
/etc/X11/xinit/xinitrc.d scripts, that is a better solution for making
distro-specific configuration.

Note that the scripts in the /etc/X11/xinit/xinitrc.d directory are
sourced in numeric order, so a script which starts with 0105 in the
filename is run before a script which starts with 0110 in the
filename, and so on.

Does this make sense?

Brian

Reply via email to