You are not logged in.
I find it a little odd/disturbing that while I can't turn off my PC or reboot it cleanly without using sudo or similar (and I'm okay with this), DEs like KDE or GNOME can. How are they turning off the system? They're obviously not using the traditional /usr/sbin/poweroff and reboot apps/scripts... I know I can make it so normal users can power off the system by way of sudo without ever having to explicity use sudo or type in a password again, I'm just curious as to how the DEs are doing it without all that.
Thanks!
Offline
I think that they relay on login managers for this functionality (login managers are running with root privileges). Try running Gnome without a login manager (using startx instead) and you'll notice that all the power off/reboot/etc. options disappear from the end session menu.
Offline
chmod +s /sbin/halt
this command allows running commands like halt and reboot with normal user.
Offline
@phisphere: I don't want to know how I can enable normal users to perform those operations, I want to know how Gnome, KDE, etc. are already doing it
@fwojciec: Good idea, I'll check into that. Awesome avatar, BTW.
Offline
be sure that you have hal in daemons and your username is in power group
Give what you have. To someone, it may be better than you dare to think.
Offline