Takao:
> Brian Cameron-san wrote (01/20/09 01:25 AM):
>> 1) GDM will run scripts in /etc/X11/xinit/xinitrc.d. Both GDM and CDE
>> login run scripts in /usr/dt/config/Xsession.d in Nevada.
>
> My suggestion is GDM will run scripts in /etc/X11/xinit/xinitrc.d in
> both Indiana and Nevada.
That's correct. I agree that, moving forward, we should focus on just
supporting GDM with /etc/X11/xinit/xinitrc.d. We can probably just
let the CDE team worry about maintaining the existing /usr/dt scripts.
> I figure Indiana is one of the branches from Vermillion at present. I.e,
> If GDM works fine in Nevada, I'd like to think it's also works fine in
> Indiana.
The one thing we need to be careful about is to make sure that the
scripts work when using GDM on Nevada. In this case both sets of
scripts (/etc/X11/xinit/xinitrc.d and /usr/dt/config/Xsession.d) will
be sourced. We need to make sure that, in this case, the scripts do
not conflict with each other.
One way we could address this would be to simply fix the
/usr/share/xsessions/gnome-session.desktop file so that it launches
the dtstart script on Solaris Nevada instead of running
/usr/dt/config/Xsession.jds. We currently don't ship the dtstart
script in Nevada, but we could start doing so once your new
/etc/X11/xinit/xinitrc.d scripts are integrated. This way, Nevada GDM
would work the same as it does on Indiana.
To make this change, we would need to fix the /etc/X11/init/xinitrc.d
scripts to do everything that is needed. In other words, we would
need to ensure that all the things we need from the /usr/dt scripts
are migrated to the /etc/X11/xinit/xinitrc.d directory. Though it
seems you have pretty much already done this.
If we make this change as a part of integrating your new scripts,
then this means that when CDE login is used the
/usr/dt/config/Xsession.d scripts will be sourced, and when GDM is used
the /etc/X11/xinit/xinitrc.d scripts are sourced. And there would be
no situation where both sets of scripts would be used. I think this
would greatly simplify testing.
> If we have the different configurations between Indiana and Vermillion,
> I think the maintenances will be increased.
Since different scripts are run if you use GDM versus CDE login, there
will be some increased maintenance no matter what we do. However, I
agree that we shouldn't focus so much on CDE specific issues since
it will be going away.
>> So, if you want the scripts to be sourced by CDE login in Nevada,
>> you must install to the /usr/dt/config/Xsession.d directory. If you
>> want the scripts to be sourced on Indiana, you need them in the
>> /etc/X11/xinit/xinitrc.d directory. On Nevada using GDM login, both
>> script directories get sourced. Did you intend for these scripts
>> to be installed to both locations or to just one?
>
> My suggestion is we won't change CDE.
> If we modify /usr/dt/config/Xinitrc.[t]jds so that
> /etc/X11/xinit/xinitrc.d is loaded, I think the change won't effect CDE
> packages but we can consolidate the scripts between
> /usr/dt/config/Xsession.[t]jds and /etc/X11/gdm/Xsession.
>
> This way is, other desktops can choose one of the configurations.
> 1. Keep the compatibility, Running /usr/dt/bin/Xsession stil works.
> 2. Migrate /usr/dt/config/Xsession.d to /etc/X11/xinit/xinitrc.d
>
> It means Xsession.[t]jds will run some duplicated scripts but I think
> it's not a big problem.
>
> What do you think?
I don't think this is the best approach since it assumes that GDM should
still run both sets of scripts. Note that the GDM /etc/X11/gdm/Xsession
script is what sources the scripts in /etc/X11/xinit/xinitrc.d. The
/etc/X11/gdm/Xsession script only gets called when GDM is used.
Note that when CDE is used, the /usr/dt/bin/Xsession script is used,
which will always source the /usr/dt/config/Xsession.d scripts.
The main reason why /usr/share/xsessions/gnome-session.desktop exec's
the /usr/dt/config/Xsession.jds is to ensure that we use the same
configuration when using CDE login or GDM. However, since we are
migrating the needed scripts to /etc/X11/xinit/xinitrc.d, this should
not be needed anymore, and we can simply split this up so it works as
follows:
CDE login -> runs /usr/dt/config/Xsession.jds -> sources the
/usr/dt/config/Xsession.d scripts and runs the dtstart
script as specified in the
/usr/share/xsessions/gnome-session.desktop file.
GDM -> runs /etc/X11/gdm/Xsession -> sources the
/etc/X11/xinit/xinitrc.d scripts and runs the dtstart
script as specified in the
/usr/share/xsessions/gnome-session.desktop
This is better than the current way things work. Note that currently
we end up sourcing the Xsession.jds script twice when using CDE login
because they get run once by CDE login, and then it gets run again
because it is specified in the gnome.desktop file.
I think this approach would be cleaner, easier to test, and avoids
conflicts that might happen by running both sets of scripts if GDM
is used.
>> If you want to install them to both, then it is probably necessary
>> for the scripts to check if they have already been run, and to abort
>> running themselves a second time if they get run twice.
>
> It's a good point.
> If my suggestion is token, the duplicated scripts are 0101.fonts and
> 0102.xrdb because they are copied from /usr/dt/bin/Xsession.
> I don't see any problems to run the scripts twice at the moment.
Good. I just wanted to make sure this was considered. It is good to
make the scripts smart enough so they don't get confused if sourced
multiple times.
>> 2) I note in /usr/dt/config/Xsession.d that we already do some
>> font setting up in 0015.sun.env, some IM stuff in 0020.dtims
>> scripts, etc. If we plan to install these scripts to
>> /usr/dt/config/Xsession, then we should make the new scripts we
>> write work with the old scripts.
>
> I think we also don't have to modify the CDE scripts till EOSL.
True, though if we notice bugs we should file them. It would be
good to make sure we continue enhancing the CDE scripts as needed
to ensure that GNOME works reasonably until we do switch to GDM.
But, I agree, that we shouldn't do more work than just filing bugs
we notice.
>> Note that the CDE team owns the existing /usr/dt/config/Xsession.d
>> so if we want to update them or replace them with your new scripts
>> then we can talk with them about doing so.
>>
>> 1) Look in /usr/dt/config/Xsession.d and note that the files we
>> already ship are numbered 0005, 0010, 0015, 0020, 0030, etc.
>> It isn't so good to use sequential numbers (001, 002, 003)
>> because then it isn't easy to insert new scripts in between
>> if desired later. I'd recommend using numbering that allows
>> space between the numbers.
>
> I agree with you totally. Now then I'd like to rename 0005.dbus
> I thought:
> 1 - 50: pre configurations
> 51 - 100: pre processes
> 101 - 150: post configurations
> 151 - 200: post processes
>
> My suggestion is 0010.env, 0020.pre-localization, 0060.sockets,
> 0070.dbus, 0110.fonts, 0120.xrdb, 0210.im
Sounds good.
Perhaps it would be good to do the following:
1. Add the dtstart script to Nevada.
2. Modify /usr/share/xsessions/gnome-session.desktop to run dtstart
as it does on Nevada.
3. Test to make sure that both CDE login and GDM work reasonably on
Nevada after making this change.
If so, then we should be ready to commit this work. And we probably
should also do some work upstream in GDM to remove the Solaris specific
script hacks we've added in the past since they won't be necessary any
more.
Thoughts?
Brian