Brian Cameron-san wrote (01/20/09 11:41 PM):
> 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.
I think it's a good idea since Indiana live session uses dtstart.
>
> 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.
>
>
> 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.
I meant dtlogin gnome-session instead of GDM here.
>
> 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:
Yes, it's better for GDM to use dtstart instead of Xsession.[t]jds.
>
> 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.
I guess the gnome-session.desktop is your typo.
Probably I think we don't have to modify Xinitrc.[t]jds to replace
gnome-session with dtstart.
I meant to modify Xinitrc.[t]jds so that /etc/X11/xinit/xinitrc.d is loaded.
I.e.
/usr/dt/config/Xsession.jds
-> /usr/dt/bin/Xsession
-> Load /usr/dt/config/Xsession.d
-> /usr/dt/config/Xinitrc.jds
-> Load /etc/X11/xinit/xinitrc.d
Currently the scripts in xinitrc.d have the duplicated contents of Xinitrc.jds.
So if we clean up Xinitrc.jds and the contents are moved to xinitrc.d
scripts, we can maintain xinitrc.d scripts only.
It means other sessions from dtlogin loads /usr/dt/config/Xsession.d only and
GNOME session loads both /usr/dt/config/Xsession.d and
/etc/X11/xinit/xinitrc.d.
Otherwise, in case Xinitrc.[t]jds don't load /etc/X11/xinit/xinitrc.d (as the
current implementation), we need to think when we update the scripts in
/etc/X11/xinit/xinitrc.d.
e.g.
If we add a script in xinitrc.d, do we also copy the contents into
Xinitrc.[t]jds ?
>
> 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
In this case, which /etc/X11/gdm/Xsession or dtstart loads
/etc/X11/xinit/xinitrc.d ?
The possible problem is the Indiana Live session with the bootable CD.
My understanding is the first session doesn't run /etc/X11/gdm/Xsession but run
dtstart directly.
If dtstart doesn't load /etc/X11/xinit/xinitrc.d, the behavior is different
between the first session and the second session from GDM.
GDM login prompt is launched after you log out the first session with jack
account and the second session starts from GDM.
>
> 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.
I agreed with this part.
> 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.
I agree to remove the Solaris specific scripts in GDM trunk.
I guess it's better that SUNWgnome-display-manager includes dtstart because
dtstart is not included in nevada.
You may like to rename dtstart likes sun-desktop.
What do you think?
fujiwara