Brian Cameron wrote: > Ghee: > >> In my previous attempt to launch dbus session in >> /usr/dt/config/Xsession.[jds|tjds] >> which is a ksh syntax file. >> I use the line >> dbus-launch --exit-with-session -auto-syntax >> >> which works when the use's SHELL is not csh. However, when the user has >> csh as his default shell, dbus-launch returns the environment >> variables in csh syntax >> hence it is ignored by ksh scripts. Consequently, user can't login >> because no dbus session >> to communicate with. >> >> My fix now is to save the user's SHELL value in ksh syntax, get the >> dbus dession info >> in ksh format, export it. Restore the SHELL value to the user's >> environment. So it works >> regardless of what shell the user is defaulted to. > > Looking at the dbus-launch code I see that when you use "-auto-syntax" > that all this does is check the users SHELL variable and determine > whether to use csh or sh syntax based on that variable. A better fix > seems to be to not use this argument and instead use --sh-syntax if you > want to force dbus-launch to run with sh syntax. > > Why not fix the problem this way? This seems more straightforward. I am. I used --auto-syntax in my initial fix. Now, I use --sh-syntax.
-Ghee > >> Does gdm uses the Xsession.jds files to start up dbus in the community? > > No, only on Solaris. > >> If it does, I believe you can pick up the scripts and let it upstream. >> As far as I know though dtlogin actually own /usr/dt/config/Xsession.jds >> so there is no upstream to go to. > > This isn't a good option since each distro has their own mechanisms for > starting the session. As I say above, dbus-launch already provides > arguments to specify the shell to use, and it seems you are using the > wrong one. > > Brian >
