Hi Brian, Thanks for your feedback! Please see inline. >> How to do it? >> There are tow optional script to add fonts path according locale: >> /etc/X11/gdm/Init/Default >> /etc/X11/xinit/xinitrc.d/0110.fonts >> >> I tested these two script for several login situation. From the result, >> I found the issue for each of above two script. >> >> /etc/X11/xinit/xinitrc.d/0110.fonts can not run in case : >> Choose failsafe terminal, when you login and launch xterm. xinitrc.d >> have not run. > > 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. :-)
> >> /etc/X11/gdm/Init/Default >can not run in case: If you user choose a >> new language, but do not restart greeter, login to desktop directly. >> >If you set a language which is not system default language as user >> default language. It could run, but get wrong >> locale value. for example: system default language is English >> (greeter display in English), but user set Chinese >> as user desktop default locale. When user start PC, the Init/Default >> will get system default locale English, but >> actually when user login to desktop, it is in Chinese locale. >> >> Suggest solution: >> > Create a X fonts path locale script like 0110.fonts, it could get >> locale and set locale specific X fonts path. > > 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. > >> > 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? Thanks! Regards, William > > Brian
