[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

gdm/desktop password protected shutdown



I am using Debian Sid and I would like to enable graphical shutdown/reboot/halt of my system using either a menu item in my desktop (KDE/Gnome) or in the display manager (gdm). I don't want to enable it for everyone, just for people who know the root password, or even nicer, accounts that are sudo enabled for the shutdown command.

I think it would be helpful if the person initiating the shutdown was given a message like 'The following users are logged in still, are you sure you want to shut down? (list)" and an option for the amount of delay for the shutdown command or to wait before suspending, but that's far from an initial requirement.

I tried adding gksu to the shutdown command in the gdm config file, and it didn't work. Shutdown disappeared from the 'system' menu in gdm. The same thing happened when I tried it with halt or suspend.

I could add gksu shutdown entries to personal menus for people I want to have access to the command, or some shell window calling sudo (or gksudo if it were available). This still wouldn't seem as optimal as a system based on sudo for shutdown. I know RH systems have shutdown in the desktop environment. Is there any disadvantage to running shutdown before logging out of your desktop session, if root shutdown privileges were available to the user (which isn't the way the RH shutdown is configured)? There must be a good reason that it's not in the Debian Gnome or KDE menus already.

I could just not have the system menu on GDM, I did that at first. I was annoyed with waiting for my display to switch modes to the Virtual Terminal so I could log in to run shutdown so I enabled the system menu. I also tried running shutdown with a conservative time parameter from an xterm then logged out of X. Both solutions seemed cludgy - at least not ones I want to explain to less technically inclined users.

It is interesting that when I choose 'configure' from the system menu I am prompted for the root password. Is there a configuration setting I have overlooked to make it do the same root password prompt for other system menu items?

I have looked into this, but it seems I haven't looked in the right places. Any pointers to projects implementing this, old discussions that have already hashed the topic to death, or insight to the best way to implement this is appreciated.

Jacob




Reply to: