You are not logged in.

#1 2011-09-03 14:52:08

nankura
Member
Registered: 2011-08-02
Posts: 166

[SOLVED]Obshutdown error

hey guys

i just installed obshutdown and i did try following the wiki and adding the =NOPASSWD shutdown -h etc command to the sudoers file but then i recieved a sudo error on line 90

and this error happens when i execute obshutdown and select shutdown

Not Found "shutdown" command in config file. default commands haven't been implemented!

Last edited by nankura (2011-09-05 03:55:16)

Offline

#2 2011-09-03 23:04:08

chris427
Member
Registered: 2011-06-03
Posts: 18

Re: [SOLVED]Obshutdown error

Hey nankura, I think I had the same problem as this a while ago.

Have you tried adding:

 Cmnd_Alias PMUTIL = /usr/sbin/pm-suspend,/usr/sbin/pm-hibernate etc etc 
%power ALL=NOPASSWD: PMUTIL

to /etc/sudoers? I had to when installing dpm (aur) and it worked fine after adding the shutdown binaries.
Also just in case make sure you're using the visudo command tongue
Good luck.

Chris


We are all watched over by machines of loving grace.

Offline

#3 2011-09-04 02:43:28

nankura
Member
Registered: 2011-08-02
Posts: 166

Re: [SOLVED]Obshutdown error

ive gotta say that visudo confuses me sorry. i usually use nano so im unsure about visudo. and last time i tried the terminal went funky for some reason

anyway i think my main problem is were to put these commands. so ill post my sudoers here. if you could advise me were the commands would go id really appreciate it ^^

## sudoers file.
##
## This file MUST be edited with the 'visudo' command as root.
## Failure to use 'visudo' may result in syntax or file permission errors
## that prevent sudo from running.
##
## See the sudoers man page for the details on how to write a sudoers file.
##

##
## Host alias specification
##
## Groups of machines. These may include host names (optionally with wildcards),
## IP addresses, network numbers or netgroups.
# Host_Alias    WEBSERVERS = www1, www2, www3

##
## User alias specification
##
## Groups of users.  These may consist of user names, uids, Unix groups,
## or netgroups.
# User_Alias    ADMINS = millert, dowdy, mikef

##
## Cmnd alias specification
##
## Groups of commands.  Often used to group related commands together.
# Cmnd_Alias    PROCESSES = /usr/bin/nice, /bin/kill, /usr/bin/renice, \
#                           /usr/bin/pkill, /usr/bin/top

##
## Defaults specification
##
## You may wish to keep some of the following environment variables
## when running commands via sudo.
##
## Locale settings
Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"
##
## Run X applications through sudo; HOME is used to find the
## .Xauthority file.  Note that other programs use HOME to find
## configuration files and this may lead to privilege escalation!
Defaults env_keep += "HOME XAUTHORITY"
##
## X11 resource path settings
Defaults env_keep += "XAPPLRESDIR XFILESEARCHPATH XUSERFILESEARCHPATH"
##
## Desktop path settings
Defaults env_keep += "QTDIR KDEDIR"
##
## Allow sudo-run commands to inherit the callers' ConsoleKit session
Defaults env_keep += "XDG_SESSION_COOKIE"
##
## Uncomment to enable special input methods.  Care should be taken as
## this may allow users to subvert the command being run via sudo.
Defaults env_keep += "XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"
##
## Uncomment to enable logging of a command's output, except for
## sudoreplay and reboot.  Use sudoreplay to play back logged sessions.
Defaults log_output
Defaults!/usr/bin/sudoreplay !log_output
Defaults!/usr/local/bin/sudoreplay !log_output
Defaults!/sbin/reboot !log_output

##
## Runas alias specification
##

##
## User privilege specification
##
root ALL=(ALL) ALL

## Uncomment to allow members of group wheel to execute any command
%wheel ALL=(ALL) ALL

## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL

## Uncomment to allow members of group sudo to execute any command
# %sudo ALL=(ALL) ALL

## Uncomment to allow any user to run sudo if they know the password
## of the user they are running the command as (root by default).
Defaults targetpw  # Ask for the password of the target user
ALL ALL=(ALL) ALL  # WARNING: only use this together with 'Defaults targetpw'

## Read drop-in files from /etc/sudoers.d
## (the '#' here does not indicate a comment)
#includedir /etc/sudoers.d

Offline

#4 2011-09-04 03:54:51

fredo1664
Member
From: Ireland (but I'm French)
Registered: 2011-08-09
Posts: 29

Re: [SOLVED]Obshutdown error

Not sure at all, but maybe check  Add /sbin and /usr/sbin to root's PATH in the wiki?
Also, the wiki explains how to use another editor with visudo if you are not familiar with, or don't want to use VI. Always use visudo to edit the sudoers file!

Last edited by fredo1664 (2011-09-04 04:18:58)


I'm French and French people can't speak English, so please please please excuse the terrible English!

Offline

#5 2011-09-04 15:49:09

nankura
Member
Registered: 2011-08-02
Posts: 166

Re: [SOLVED]Obshutdown error

ok after using visudo the sudo commands from the wiki and all that went in fine but it still wont shutdown, says the config file command line is missing or something, same error

also now for some reason skype and KMess which are in my autostart.sh arent starting up anymore

Last edited by nankura (2011-09-04 15:53:38)

Offline

#6 2011-09-04 16:07:22

fredo1664
Member
From: Ireland (but I'm French)
Registered: 2011-08-09
Posts: 29

Re: [SOLVED]Obshutdown error

I can't really help you since I don't use obshutdown, but I have quickly read a tutorial -unfortunately in French- and they say you have to copy

/usr/local/share/obshutdown/example.rc

into your home directory as

~/.obshutdown.rc

I suppose you then have to change this file to match your needs.
I don't know if you have already done that, but that's the only thing I can think of.
I've downloaded the archive from their site and there is a little README, maybe it can help.
Or you could paste the content of your .obshutdown.rc and maybe someone who is using obshutdown could help you...

Last edited by fredo1664 (2011-09-04 16:16:22)


I'm French and French people can't speak English, so please please please excuse the terrible English!

Offline

#7 2011-09-05 01:59:44

chris427
Member
Registered: 2011-06-03
Posts: 18

Re: [SOLVED]Obshutdown error

you might need to post another topic if skype and Kmess continue to not work.
like fredo1664 said it sounds like it wont find the shutdown command because its not in root's PATH
If it isn't you should add it. You can check if /sbin or /bin is in root's PATH like this:

# echo $PATH 

otherwise just add the full path of shudown (/sbin/shutdown) to the sudoers file like you would have before
Good luck and let us know how you get on.

Chris


We are all watched over by machines of loving grace.

Offline

#8 2011-09-05 03:46:30

nankura
Member
Registered: 2011-08-02
Posts: 166

Re: [SOLVED]Obshutdown error

Ok after moving the file example.rc to my home directory and renaming it to .obshutdown.rc the shutdown doesnt give an error  message. and logout works, but the shutdown and reboot options both go straight back to the desktop

also i located the example.rc in /usr/share/obshutdown

heres the example.rc

#
# Openbox shutdown dialog
# This is example obshutdown rc file
# Copy this file to ~/.obshutdown.rc and customise
#

[general]
version =        0.1-beta2
verbose =        false
default_action = shutdown
composite =      true
theme =          foom
buttons =        cancel logout shutdown restart

[actions]
logout =         openbox --exit
shutdown =       dbus-send --print-reply --system --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Shutdown
restart =        dbus-send --print-reply --system --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Reboot
lock = 
switch = 
suspend = 
hibernate = 
custom = 

[shortcuts]
logout =         l
shutdown =       s
restart =        r
lock = 
switch = 
suspend = 
hibernate = 
custom = 

[labels]
cancel =         CANCEL
logout =         LOGOUT
restart =        RESTART
shutdown =       SHUTDOWN
lock =           LOCK
switch =         SWITCH USER
suspend =        SUSPEND
hibernate =      HIBERNATE

and heres the echo $PATH , i checked the sbin folder and there is no shutdown script nor folder

echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl

Offline

#9 2011-09-05 03:54:58

nankura
Member
Registered: 2011-08-02
Posts: 166

Re: [SOLVED]Obshutdown error

Ok after changing the obshutdown config to use ConsoleKit instead of Hal it all works fine. problem solved!! big_smile thanks for the help, onto a new post about my apps

Offline

#10 2011-09-05 12:59:34

chris427
Member
Registered: 2011-06-03
Posts: 18

Re: [SOLVED]Obshutdown error

Glad you got it sorted smile
It's very strange that you don't have a shutdown script in /sbin. Might want to look into that.
All the best,
Chris


We are all watched over by machines of loving grace.

Offline

#11 2011-09-05 17:31:25

fredo1664
Member
From: Ireland (but I'm French)
Registered: 2011-08-09
Posts: 29

Re: [SOLVED]Obshutdown error

pacman -Qo /sbin/shutdown

tells me that /sbin/shutdown belongs to the package sysvinit, so I'm a bit surprise if you don't have it.

Nankura, now that you are an expert in installing and configuring obshutdown, maybe you'd like to write a little wiki article about it, and maybe link it to the Openbox wiki? big_smile


I'm French and French people can't speak English, so please please please excuse the terrible English!

Offline

Board footer

Powered by FluxBB