Takao:

>> 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.

Yes, I mean gnome.desktop.  Sorry.

> 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

I don't recommend doing this.  Note if you want to change the way
the /usr/dt scripts work, then you need to coordinate this change with
the CDE team.  It is very hard to get changes upstream into CDE, and
they tend to push back changes that are not the highest priority.

> 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.

I think managing duplicated contents is easier than trying to get
the CDE team to accept any changes to their scripts, actually.

> 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 ?

I would install the scripts to both locations.  Each login program
should use its own separate directory.

>> 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 ?

/etc/X11/gdm/Xsession is the only script that sources the scripts
in /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.

I think the best way to address this would be to fix the first-session
login script to also source the /etc/X11/xinit/xinitrc.d scripts before
it runs dtstart.

It doesn't make sense to move the sourcing of the
/etc/X11/xinit/xinitrc.d scripts into the dtstart script, because this
would introduce two problems:

1) We'd need to patch GDM to not source the scripts in the Xsession
    script, and I'm not sure it is good to deviate from the community
    here.
2) When using CDE login, the scripts would get run twice.

So, it seems better to just make the first-session login script do
the same code.  Note it only takes 7 lines of code in the
/etc/X11/gdm/Xsession script to source these files, so it should not
be a big deal to add the same code to another script.

>> 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.

It probably would be better to add the dtstart script to the
SUNWgnome-session package since the /usr/share/xsessions/gnome.desktop
file is owned by SUNWgnome-session and it is calling the dtstart script.
Right?

I don't see the need to rename dtstart to sun-desktop.  Since we're
already using the name dtstart in Indiana, why not keep things
consistent?

Brian

Reply via email to