Dan McGhee wrote:
In my mission to make my LFS distro "seamless" for the other, less
'computer/Linux' savvy <BBG,LOL> members of my family, I've been
experimenting with various window and session managers. I'm most
familiar with Window Maker and ROX-Session. Each of these has an "Exit"
menu on which one can select "Logout, Shutdown or Restart"--or other
words that convey the same concepts. ROX uses the commands 'halt' and
'reboot,' both of which reside in /sbin. However, one needs to be root
to use them. Aside from building 'sudo,' I'm wondering how I could get
the init system to listen/look for the button selection and then run
'init 0' or 'init 6.' This is, in fact how I shutdown now--> su to root
and then run the command I want.
I know that bash scripting will not change to root, so I think I must
put something in the init scripts. I just don't know where to start.
If sudo is the way to go, please let me know. Otherwise, I'd love to
hear some ideas.
For me what works is to
chmod +s /sbin/{halt,shutdown}
Then I can add /sbin/halt and /sbin/reboot to Fluxbox's right click menu. Gnome
notices the change automatically and allows users to shutdown. I've not figured
out how to get Xfce to allow users to shutdown, but I don't use Xfce much. I've
not tried Window Maker or the full Rox desktop, I just use the Rox file manager
on Fluxbox.
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page