By user12625760 on Jan 17, 2010
One more thing for the Sun Ray on build 130. Whether this is the last remains to be seen.
Now that gdm is run via smf gnome-session is now run via ctrun(1) so that it gets it's own contract and therefore any problems it has do not result in gdm being restarted.
However the Sun Ray sessions are not started that way. Hence I was seeing all users logged out if just one session had a problem:
So a rather trivial failure such as this:
Jan 16 11:10:47 pearson genunix: [ID 603404 kern.notice] NOTICE: core_log: metacity core dumped: /var/cores/core.metacity.7448
would result in gdm restarted:
[ Jan 16 00:06:08 Method "start" exited with status 0. ]
[ Jan 16 11:10:47 Stopping because process dumped core. ]
[ Jan 16 11:10:47 Executing stop method ("/lib/svc/method/svc-gdm stop"). ]
[ Jan 16 11:10:47 Method "stop" exited with status 0. ]
which in turn means all the users were logged out. Ooops.
The solution was simple but like the previous workarounds leaves your warranty in tatters!
# mv /usr/bin/gnome-session /usr/bin/gnome-session.orig # cat > /usr/bin/gnome-session << EOF > #!/bin/ksh -p > exec ctrun -l child \\$0.orig \\$@ > EOF # chmod 755 /usr/bin/gnome-session
This results in all your gnome sessions having their own contract as their parent is ctrun:
: pearson FSS 33 $; ptree $(pgrep -o -u gdm gnome-session) 22433 /usr/sbin/gdm-binary 22440 /usr/lib/gdm-simple-slave --display-id /org/gnome/DisplayManager/Displa 22965 ctrun -l child /usr/bin/gnome-session.orig --autostart=/usr/share/gdm 22967 /usr/bin/gnome-session.orig --autostart=/usr/share/gdm/autostart/Lo 23062 /usr/lib/gdm-simple-greeter 23063 gnome-power-manager : pearson FSS 34 $;
and means that any failures are now ring-fenced to just that session.