LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-09-2005, 01:29 PM   #1
athanatos
Member
 
Registered: Apr 2004
Distribution: Slackware 11.0, OpenBSD 4.0
Posts: 58

Rep: Reputation: 15
how to add 'shutdown' to fluxbox menu?


Hi!

I was wondering how I could add a 'Shutdown' menu entry to the fluxbox menu so that I just have to klick it in order to shut down my computer. I am using runnlevel 4 and kde, gnome, xfce can reboot or shutdown the computer. Does anybody know the command for this?

thx

max

Last edited by athanatos; 12-09-2005 at 01:31 PM.
 
Old 12-09-2005, 02:11 PM   #2
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
edit ~/.fluxbox/menu
add the command to shutdown or restart
 
Old 12-09-2005, 02:16 PM   #3
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
I use:

Code:
[submenu] (Shutdown)
      [exec] (Shutdown) {sudo halt}
      [exec] (Reboot) {sudo /sbin/reboot}
[end]
But I have things set up where I can just sudo any command as root
 
Old 12-09-2005, 02:25 PM   #4
athanatos
Member
 
Registered: Apr 2004
Distribution: Slackware 11.0, OpenBSD 4.0
Posts: 58

Original Poster
Rep: Reputation: 15
Thx but I am looking for a solution that does not require the root password. That should be possible, shouldn't it? I mean, I am able to log into KDE as a normal user and - I think thats because I am using runlevel 4 - restart or shutdown the computer without entering the root password. I am also able to shutdown the computer using gdm.
 
Old 12-09-2005, 03:10 PM   #5
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
edit /etc/sudoers and add a line like :
Code:
athanatos  darkstar = NOPASSWD: /sbin/shutdown -h now, /sbin/poweroff, /sbin/reboot
assuming athanatos is your username and darkstar is your hostname

Now you can use [exec] (Shutdown) {sudo /sbin/poweroff} or
[exec] (Shutdown) {sudo /sbin/reboot}, without a password
 
1 members found this post helpful.
Old 12-09-2005, 03:14 PM   #6
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
If you configure sudo correctly, you don't need to type the password.
You can use visudo to edit sudoers file which manages sudo stuff.
You should put a lines like this using visudo:
Code:
%users  localhost = NOPASSWD: /sbin/halt
%users  localhost = NOPASSWD: /sbin/reboot
That will allow any user inside the users group to execute sudo /sbin/halt and sudo /sbin/reboot without typing root's password.
Instead of %users (the % refers to a group) you can use directly the user name.

Edit: Now that this refreshed, basically what keefaz suggested :P
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add icons to FluxBox menu? MuD Linux - Newbie 5 03-20-2005 02:10 PM
add cxoffice apps to fluxbox menu? mipia Linux - Software 3 07-28-2004 04:31 AM
Add KDE menu in Gnome start menu melinda_sayang Slackware 2 03-06-2004 05:26 AM
How to add KDE menu items to Gnome menu... QtCoder Linux - General 4 10-05-2003 01:21 PM
How to add Shutdown and Restart to the menu in KDE? concoran Linux - General 16 12-02-2001 10:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration