Find the answer to your Linux question:
Results 1 to 9 of 9
Hello How do I shut down the computer from within fluxbox? Right now, when I hit "exit" in the menu it get's me to gdm, where I need my root ...
  1. #1
    Just Joined!
    Join Date
    Dec 2005
    Posts
    25

    fluxbox - shutdown problem

    Hello
    How do I shut down the computer from within fluxbox? Right now, when I hit "exit" in the menu it get's me to gdm, where I need my root password to turn off the computer.
    How do I make things work just like in gnome?
    Thank you very much in advance

  2. #2
    Banned
    Join Date
    Jul 2004
    Posts
    947
    you go to a terminal and type either
    as root
    Code:
    init 0
    or
    shutdown -h now

    you could also take a look at the menu conf file, not sure exactly
    think it is
    ~/.fluxbox/menu.conf
    and where you see exit fluxbox, instead of the current comand you could do

    Code:
    sudo shutdown -h now

  3. #3
    Just Joined!
    Join Date
    Dec 2005
    Posts
    25
    Thank you, but I've already tried that
    I edited my menu, but than when I clicked the new "power off" button, nothing happened.
    I've read that with xfce you have to edit some permissions in order to enable a common user to poweroff. Perhaps it's the same here? I don't know

  4. #4
    Banned
    Join Date
    Jul 2004
    Posts
    947
    Quote Originally Posted by gabriel_007
    Thank you, but I've already tried that
    I edited my menu, but than when I clicked the new "power off" button, nothing happened.
    I've read that with xfce you have to edit some permissions in order to enable a common user to poweroff. Perhaps it's the same here? I don't know
    if you give me the link to where it says it i will tell you if it is the same, and it most prob is

  5. #5
    Just Joined!
    Join Date
    Dec 2005
    Posts
    25
    http://www.loculus.nl/xfce/documenta...4-session.html
    Here, it's under Shutdown/reboot options.

  6. #6
    Linux Guru antidrugue's Avatar
    Join Date
    Oct 2005
    Location
    Montreal, Canada
    Posts
    3,212
    As far as I understand this:
    http://www.loculus.nl/xfce/documenta...#xfsm-shutdown

    ... it's pretty straith-forward. Just put yourself in the sudoers file.

    First install sudo (if not already installed), so as root:
    Code:
    apt-get install sudo
    Then, as root,
    Code:
    visudo
    You will see at the end of the file a line like that:
    Code:
    root    ALL=(ALL) ALL
    Just add a line after that one with your name:
    Code:
    gabriel_007   ALL=(ALL) ALL
    Or, as they mention in the text, if you want to have just the permission to shutdown, nothing else:
    Code:
    gabriel_007 nameofyourcomputer=/usr/local/libexec/xfsm-shutdown-helper
    "To express yourself in freedom, you must die to everything of yesterday. From the 'old', you derive security; from the 'new', you gain the flow."

    -Bruce Lee

  7. #7
    Linux User
    Join Date
    Sep 2003
    Posts
    254
    Quote Originally Posted by gabriel_007
    I've read that with xfce you have to edit some permissions in order to enable a common user to poweroff. Perhaps it's the same here? I don't know
    Yes, the shutdown command is usually reserved to the root. So u need to make shutdown suid root that is to say that shutdown will continue to use some processes that can be only launched by the root but a user lambda could use it.
    So:
    Code:
    chmod u+s /sbin/shutdown
    that quite dangerous (anyone could switch off the computer) so usually we had a group only for the users suid root (like wheel under FreeBSD).
    You have sudo too but I've always think it was more dangerous than this method....

  8. #8
    Just Joined!
    Join Date
    Dec 2005
    Posts
    25
    Thank you very much for your attention and help

    First I tried the "sudo" method - editing the sudoers with visudo, but I encountered problems: in manual it's stated, that q should quit the program - but it didn't. I simply couldn't write the file - as there was no way I could exit visudo. Oh, well stupid me.

    Then I used Gnux method, which enabled me to switch off my computer.
    I have only one remaining question --->
    When exitting gnome, or kde, the system displayed, that all processes one by one are killed/stopped.
    Right now, it just exits fluxbox and waits. Than it just powers off.

    Thank you

  9. #9
    Linux Newbie eerok's Avatar
    Join Date
    Feb 2005
    Location
    Canada
    Posts
    153
    Quote Originally Posted by gabriel_007
    First I tried the "sudo" method - editing the sudoers with visudo, but I encountered problems: in manual it's stated, that q should quit the program - but it didn't. I simply couldn't write the file - as there was no way I could exit visudo. Oh, well stupid me.
    Just for your info: debian uses vim for the visudo editor, so to save and exit you'd do <Esc>:wq<Enter>

    Too late now, though ... glad you sorted it out anyway
    noobus in perpetuum

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •