Re: reboot/shutdown menu entries for non-GNOME/KDE users



Am Dienstag, den 27.10.2009, 10:05 +0800 schrieb Wang Diancheng:
> Hi,
> 
> On my system, I use following commands, it needn't root privilege:
> 
> shutdown:
> 
> dbus-send --system --dest=org.freedesktop.Hal  \
> /org/freedesktop/Hal/devices/computer  \
> org.freedesktop.Hal.Device.SystemPowerManagement.Shutdown
> 
> reboot:
> 
> dbus-send --system --dest=org.freedesktop.Hal  \
> /org/freedesktop/Hal/devices/computer  \
> org.freedesktop.Hal.Device.SystemPowerManagement.Reboot
> 
> I think other system (eg. Fedora, Ubuntu), should be OK.

Thanks, I'll try it now, and use that ones, if it works.

Every actual distro has DBus for a long time now, so that shouldn't
hurt, and even if it does (on ancient systems), it's not difficult to
change the entries.

Chris

> >>>>> Christopher Roy Bratusek <zanghar freenet de> writes:
> 
>     > Hi all, I just added reboot/shutdown menu entries for non
>     > GNOME/KDE users
> 
>     > root-menu -> session -> [here]
> 
>     > here are the instructions how to setup sudo to let non-root users
>     > be able to call `shutdown' (only applies to `shutdown' binary, no
>     > other one):
> 
>     > (also in README.IMPORTANT)
> 
>     > reboot/shutdown from root-menu ******************************
> 
>     > The sawfish root-menu has a session sub-menu which allows you to
>     > reboot and/or shutdown your machine. If you use GNOME or KDE, no
>     > additional work by you is required. But if you use sawfish
>     > standalone, you have to make sure that you're allowed to execute
>     > `shutdown', there are several ways to achieve that, the suggested
>     > approach is to use sudo combined with a group called shutdown:
> 
>     > ;; add a new group called `shutdown' groupadd shutdown
> 
>     > ;; add user to the `shutdown' group adduser misterx shutdown
> 
>     > ;; add the group `shutdown' to sudoers visudo
>   
>     >   ;; add the following: %shutdown ALL=(root) NOPASSWD:
>     > /sbin/shutdown
> 
>     > That's it, now everyone in the shutdown group can do it!
> 
>     > Chris
> 

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil



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