Dick:
On Solaris, there are two ways that the desktop integrates with shutting
down and rebooting the system.
One way is to use GDM. Using this method, you need to disable CDE login
as your login program and enable GDM. You can do this by running these
commands;
svcadm disable cde-login
svcadm enable gdm
Note that disabling cde-login will cause any running sessions to exit
immediately and drop you to console login, so don't do this if you
have any unsaved data on the desktop. It is cleaner to run these
commands from console login, or at least a Failsafe session.
Note you have to edit your GDM configuration and modify the
greeter/SystemMenu key to be "true" to see the Shutdown, Reboot,
and Suspend options. Note that the commands for shutting down
and rebooting are in the GDM configuration also and by default these
commands are /sbin/init 6 for reboot and /sbin/init 5 for shutdown.
If you are using the latest vermillion 2.19 builds, then GDM has
been further enhanced to use RBAC, so the Reboot and Shutdown options
will only show up for users which have been assigned the
solaris.system.shutdown key. You can also edit the GDM configuration
to set the daemon/RBACSystemCommandKeys to nothing to disable this
and turn on these options for all users regardless of RBAC settings.
If you aren't using GDM, or if GDM isn't configured to support
Shutdown, then the panel uses gnome-sys-suspend. This is a GUI
for the sys-suspend tool. You can refer to the man pages for
sys-suspend and gnome-sys-suspend to see how they work and how to
configure them.
As pointed out, sys-suspend uses uadmin to shut down the system.
It probably should be changed to use /sbin/init 5.
There has been some talk that GNOME Power Manager may replace
gnome-sys-suspend/sys-suspend in the future, so I'm not sure if
we really should invest time improving sys-suspend or if we should
just move towards using GNOME Power Manager and make sure it works
properly.
Brian
> Alan Coopersmith <alan.coopersmith at sun.com> writes:
>
>> Dick Hoogendijk wrote:
>
>>> Reading this back I find this sounds too harsh. I don't mean to say
>>> you don't know what you're talking about. You don't work at sun for
>>> nothing, I guess ;-) But I do like to know what happens under the
>>> hood. What's the shutdown process for sys-suspend compared to init
>>> 5?
>> For power off it appears to do:
>> /*
>> * Send SIGPWR signal to the init process to shut down the system.
>> */
>> if (kill (1, SIGPWR) == -1)
>> uadmin(A_SHUTDOWN, AD_POWEROFF, 0);
>>
>> I don't see shutdown other than power off in there.
>
>>From man uadmin:
>
> WARNINGS
> On x86 systems, shutting down the system by means of uadmin
> does not update the boot archive. Avoid using this command
> after manual editing of files such as /etc/system or
> driver.conf(4).
>
> So I guess, init 5 _is_ safer.
>