You are not logged in.
Hey there everyone!
Ubu 14.04 minimal
Openbox
No GDM
I'm goofing around with duplicating the graphical enviroment of Wally in Ubu 14.04. I've managed to get it pretty close to OOtB usability, but am foiled by reboot/poweroff.
I've tried using cb-exit, but that didn't go far due to errors galore. I've edited the sudoers file to allow reboot, poweroff and shutdown without a password. I've confirmed it by making sure a password isn't required when running the commands in terminal. All was good to go.
The issue, however is that if I place sudo reboot/poweroff/shutdown -r(-h) now into OB's menu , when I execute the menu entry, the machine freezes, requiring a hard restart.
I'm not seeing anything in /var/log, I think it's freezing before anything can be written. The commands don't cause any issue in terminal so I'm not sure where to go from here.
Any thoughts on getting a poweroff and reboot option in the menu?
Thanks for your consideration!
Last edited by schwim (2014-10-28 18:25:05)
Offline
Edit the sudoers file:
sudo /usr/sbin/visudo
Add these lines (the last two you see here):
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
ALL ALL=NOPASSWD:/sbin/reboot
ALL ALL=NOPASSWD:/sbin/poweroff
Now in Openbox menu.xml - or use the GUI menu editor:
<item label="Punch Out">
<action name="Execute">
<command>terminator -e "kill -9 -1"</command>
</action>
</item>
<item label="Re-Boot">
<action name="Execute">
<command>sudo /sbin/reboot</command>
</action>
</item>
<item label="Power Down">
<action name="Execute">
<command>sudo /sbin/poweroff</command>
</action>
</item>
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Thanks a bunch for your help, s11!
Your other thread concerning this is what got me this far. Thanks very much for documenting your progress. The issue I'm having is that although these commands work in the terminal(without need of password), when added to my OB menu, it freezes the computer upon execution.
I'll continue goofing with it. It's pretty much the last thing I need before I've got a good base install.
Thanks again for your help!
Offline
Forgot all about that thread
Sounds like Ubuntu is playing mind games with you.
How about three no nonsense bash files?
pwrdn
#!/bin/bash
sudo /sbin/poweroff
pout
#!/bin/bash
kill -9 -1
rboot
#!/bin/bash
sudo /sbin/reboot
If you can run those from [Alt-F2] or [Alt+F3] it should work in the OB Menu as well.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Same issue with the bash files. A couple things I'm finding out though. First, my sudoers doesn't seem to be sticking between reboots.
ALL ALL=NOPASSWD:/sbin/poweroff, /sbin/shutdown, /sbin/halt, /sbin/reboot
After rebooting successfully without password, I'm finding that it's asking me for me the password this time. Second, it's not freezing the whole machine, just the graphical environment. I can alt-ctrl-F1 and Ctrl+C to restart x. I looked in dmesg and Xorg.0.log.old but I'm not finding anything that looks like a related error. I'll comb over it more closely as I'm probably missing something.
Offline
Well, it's Official.
I'm at a loss. if editing the sudoers file didn't do it ... Ubuntu is out to get us!
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Do you see anything wrong with how I entered the line into sudoers? "sudo /sbin/reboot" is asking me for a password in spite of the entry(added via visudo).
I'm at a loss as well and haven't figured out anything more in spite of continuing to screw with it.
Offline
Try separate lines as I did in Post #2 ... I am no expert by any means. I know this works with #!.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Still not working. For some reason, it's not registering my additions. Does placement in the file matter? I'm placing right below the root entry.
Offline
I don't think so ... here's my complete file:
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
ALL ALL=NOPASSWD:/sbin/reboot
ALL ALL=NOPASSWD:/sbin/poweroff
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
How about trying a workaround by putting the shutdown/reboot commands in scripts, and calling the script from an OB menu item?
BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator
Offline
^ Tried that in post #4.
Gotta be an Ubuntu thing.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Solved!
While penning my plea to the Ubu forum-goers, I found this helpful wiki entry, which explained that my commands were being overwritten by the admin and sudo entries below it. Moving it to the bottom of the file got me a passwordless poweroff and reboot and subsequently, a working menu entry! Hooray!
Thanks a bunch for all your help, sector
Offline
Interestingly enough the #! sudoers fiile doesn't have:
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
Does placement in the file matter? I'm placing right below the root entry.
I said I didn't think so, mine like yours was right after root entry. Mine is the last entries, unlike yours that has that extra UBU admin group stuff.
scheech ... at least it's fixed ... finally.
And how do you spell: relief? --> *I*t*w*o*r*k*s*!*
help? what help, you found the solution ... I had ya running in circles after nailing your left foot to the floor.
OK ... you're welcome.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
help? what help, you found the solution ... I had ya running in circles after nailing your left foot to the floor.
That's where you went wrong. You should have searched the forums first - you would have found the answer is to nail the right foot to the floor ]:D
BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator
Offline
:8 :8 I stand humbled and shamed. :8 :8
The difference between right and right is the same as the difference between left and wrong.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Wow, damo, you've created some fantastic themes! I'm worryingly attached to the color orange, so might have to grab the autumn theme
Offline
Glad you like it - maybe you could have a go at tweaking it and show us what you come up with
That 4Seasons group of themes are a bit playful, but are a little too bright and dramatic for my current tastes!
Last edited by damo (2014-10-28 23:25:47)
BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat