Hi,
[CentOS 5]
What is the best way to remove the shutdown and suspend options from menu's for normal users?
After googling around, I added "SystemMenu=false" to the greeter section in /etc/gdm/custom.conf. After that the GDM login screen still shows the options, but 'restart' indeed doesn't work anymore. However, the gnome menu's when logged in, still have the 'suspend' options, which still leads to a hanging (unwakeble) machine.
BTW: I prefer editing config files instead of stupid gui's, as I have to change a lot of machines :-)
Regards,
On Wed, 19 Sep 2007 15:20:37 +0200 "HvL" == Henk van Lingen henkvl@cs.uu.nl wrote:
HvL> Hi,
HvL> [CentOS 5]
HvL> What is the best way to remove the shutdown and suspend HvL> options from menu's for normal users?
HvL> After googling around, I added "SystemMenu=false" to the HvL> greeter section in /etc/gdm/custom.conf. After that the GDM HvL> login screen still shows the options, but 'restart' indeed HvL> doesn't work anymore. However, the gnome menu's when logged HvL> in, still have the 'suspend' options, which still leads to a HvL> hanging (unwakeble) machine.
Just set HaltCommand to nothing:
HaltCommand=
Same for Reboot and Suspend (Havn't tried suspend yet) but my machines allow Reboot and Halt neither from the user menus nor the Login-Screen
I think in the [daemon]-section of the config-file
HvL> BTW: I prefer editing config files instead of stupid gui's, HvL> as I have to change a lot of machines :-)
Of course
On Wed, Sep 19, 2007 at 03:49:34PM +0200, Bernhard Gschaider wrote:
Just set HaltCommand to nothing:
HaltCommand=
Same for Reboot and Suspend (Havn't tried suspend yet) but my machines allow Reboot and Halt neither from the user menus nor the Login-Screen
For Reboot and Halt this works. Setting SuspendCommand= does nothing. Suspend still shows up in the menu, and hangs the machine.
regards,
For Reboot and Halt this works. Setting SuspendCommand= does nothing. Suspend still shows up in the menu, and hangs the machine.
Create your own GDM theme and customize exactly how you want it. Here's ours, users have no access to anything but logging in.
On Wed, 19 Sep 2007 16:51:42 +0200 "HvL" == Henk van Lingen henkvl@cs.uu.nl wrote:
HvL> On Wed, Sep 19, 2007 at 03:49:34PM +0200, Bernhard Gschaider HvL> wrote: >> Just set HaltCommand to nothing: >> >> HaltCommand= >> >> Same for Reboot and Suspend (Havn't tried suspend yet) but my >> machines allow Reboot and Halt neither from the user menus nor >> the Login-Screen
HvL> For Reboot and Halt this works. Setting SuspendCommand= HvL> does nothing. Suspend still shows up in the menu, and hangs HvL> the machine.
You have also tried it with a lowercase S? Stupid question, but the relevant section in /usr/share/gdm/defaults.conf says:
# Reboot, Halt and suspend commands, you can add different commands separated # by a semicolon. GDM will use the first one it can find. RebootCommand=/sbin/reboot;/sbin/shutdown -r now;/usr/sbin/shutdown -r now;/usr/bin/reboot HaltCommand=/sbin/poweroff;/sbin/shutdown -h now;/usr/sbin/shutdown -h now;/usr/bin/poweroff
It may be typo ...
Henk van Lingen wrote:
Hi,
[CentOS 5]
What is the best way to remove the shutdown and suspend options from menu's for normal users?
After googling around, I added "SystemMenu=false" to the greeter section in /etc/gdm/custom.conf. After that the GDM login screen still shows the options, but 'restart' indeed doesn't work anymore. However, the gnome menu's when logged in, still have the 'suspend' options, which still leads to a hanging (unwakeble) machine.
BTW: I prefer editing config files instead of stupid gui's, as I have to change a lot of machines :-)
To remove the reboot/shutdown options from the login screen (after setting SystemMenu=False) two small modifications are needed to: /usr/share/gdm/themes/CentOSCubes/CentOSCubes.xml
The two modifications are:
1. Change line 102 from: <show modes="console"/> to: <show type="reboot" modes="console"/>
2. Change line 118 from: <show modes="console"/> to: <show type="halt" modes="console"/>
The lines above both of these should have an item tag refering to the appropriate reboot/halt button. Then restart the gdm. The shutdown and reboot buttons should no longer appear.
I use the following command:
gconftool-2 --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory -s -t bool /apps/gnome-power-manager/can_suspend false
to remove the suspend option from the gnome system menu. Also, deleting the symbolic links for halt, poweroff, and reboot in /usr/bin appears to remove the respective options from the menu as well as from the command line.
Erik