<match action="org.freedesktop.hal.power-management.*">
<return result="yes"/>
</match>
Mind you that this seems to be a very dirty fix, very insecure as anyone will be able to shutdown/reboot/mount removable but at least for a single user notebook will do the trick perfectly
If you put the expressions inside of the code:
<match user="$USER">
.......
</match>
it will be allowed only for the USER.
]]>It seems there are 2 ways to do the same, one is to write it directly in /etc/PolicyKit/PolicyKit.conf and the other is to use polkit-action that stores changes I don't know where .... I prefer the first option although xml?? Wouldn't a simple well thought plaintext file suffice?
Anyway here's the "complete" shutdown/reboot/automount usb fix I'm using now<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- --> <!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN" "http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd"> <!-- See the manual page PolicyKit.conf(5) for file format --> <config version="0.1"> <match action="org.freedesktop.hal.storage.mount-removable"> <return result="yes"/> </match> <match action="org.freedesktop.hal.power-management.shutdown"> <return result="yes"/> </match> <match action="org.freedesktop.hal.power-management.reboot"> <return result="yes"/> </match> </config>
Thank you very much, ROOKIE, this worked for me.
]]>As for
sudo shutdown -h now being better the sudo poweroff, I am not sure. I do know the shutdown command is cool in a way that you can tell your computer to shutdown in x amount of time (very handly for severs), and pass other options... -h being halt. But if the poweroff command does this, then to each his own
Thank you for the info.
]]>MattSmith wrote:an easy way around this, is not to use a login manager if you're using one. I have herd many people with kde having similar problems, however since I don't use the login manager, kde doesn't monitor shutdown or restart of my computer.
use
sudo shutdown -h now
easy.
I have been using the "sudo poweroff" command, and the "sudo reboot -n" command..... It's what I have been doing since last night. I'll use "sudo shutdown -h now" if it's better for my laptop than the "sudo poweroff" command.
.....But I just want to fix my slim and gui shutdown method because it's the "easiest way" to just press the quit button and the shutdown button.
EDIT: also thank you. I know you were just trying to help and point out the easiest and best command to use to shutdown..... I just like to have all of my apps working in the way they are meant to work..... so that is why I was hoping to fix the xfce/slim logout problem.
I understand np
As for
sudo shutdown -h now being better the sudo poweroff, I am not sure. I do know the shutdown command is cool in a way that you can tell your computer to shutdown in x amount of time (very handly for severs), and pass other options... -h being halt. But if the poweroff command does this, then to each his own
]]>I confirm that solution suggested by ROOKIE fixes bug with reboot on XFCE 4.4.3 with Slim (daemon). I did not test shutdown yet. Actually, I combine expressions from Wiki with two last expressions from ROOKIE.
I just tried it and it does work!
I sort of combined the HAL ArchWiki Policykit fix and the last 2 lines for reboot and shutdown from ROOKIE's fix like you did westend..... so my complete file looks like this:
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->
<!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN"
"http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd">
<!-- See the manual page PolicyKit.conf(5) for file format -->
<config version="0.1">
<match user="seventy3"> <!-- replace with your login or delete the line if you want to allow all users to manipulate devices (keep security issues in mind though) -->
<match action="org.freedesktop.hal.storage.*">
<return result="yes"/>
</match>
<match action="hal-storage-mount-fixed-extra-options"> <!-- for internal devices mounted with extra options like a wished mount point -->
<return result="yes" />
</match>
<match action="hal-storage-mount-removable-extra-options"> <!-- for external devices mounted with extra options like a wished mount point -->
<return result="yes" />
</match>
</match> <!-- don't forget to delete this line if you deleted the first one -->
<match action="org.freedesktop.hal.power-management.shutdown">
<return result="yes"/>
</match>
<match action="org.freedesktop.hal.power-management.reboot">
<return result="yes"/>
</match>
</config>
It works with the xfce4 quit/shutdown/reboot button now.... thank you westend and ROOKIE, and everyone else.
]]>methuselah wrote:Thank you to everyone re-posting the same Policykit fix for the mounting issue..... westend was the first to point it out with post#6 comment:
westend wrote:To fix the problem with mounting, please go to HAL page in Wiki and read Troubleshooting. Edit /etc/PolicyKit/PolicyKit.conf as described.
But there is a SECOND bug that hasn't been fixed yet. It is about the "shutdown" and "reboot" not completing. It just goes back to the login screen. (for xfce4 and slim)
It's being reported by "thatnewyorker" (post#1), westend (post#3), fantomas (post#4), and me (methuselah post#12). It also is in the the BUGS section as comment #6: http://bugs.archlinux.org/task/13162#comment39047
Comment by ugaciaka (ugaciaka) - Monday, 09 February 2009, 03:51 GMT-5
another problem, when I will shutdown pc (i'm using xfce): relogin! I'm using slim...
"failed to execute login command" and reloginAny ideas from anybody?
I confirm that solution suggested by ROOKIE fixes bug with reboot on XFCE 4.4.3 with Slim (daemon). I did not test shutdown yet. Actually, I combaine expressions from Wiki with two last expressions from ROOKIE.
I'm sorry..... I did not realize that ROOKIE's Policykit fix was different than the HAL wiki page Policykit fix..... I'm going to try it right now and see if it works for me...... sorry for mot reading more thoroughly.
]]>Thank you to everyone re-posting the same Policykit fix for the mounting issue..... westend was the first to point it out with post#6 comment:
westend wrote:fantomas wrote:same problem here after last hal upgrade, cant mount device with hal or cant shudown or reboot xfce session
To fix the problem with mounting, please go to HAL page in Wiki and read Troubleshooting. Edit /etc/PolicyKit/PolicyKit.conf as described.
But there is a SECOND bug that hasn't been fixed yet. It is about the "shutdown" and "reboot" not completing. It just goes back to the login screen. (for xfce4 and slim)
It's being reported by "thatnewyorker" (post#1), westend (post#3), fantomas (post#4), and me (methuselah post#12). It also is in the the BUGS section as comment #6: http://bugs.archlinux.org/task/13162#comment39047
Comment by ugaciaka (ugaciaka) - Monday, 09 February 2009, 03:51 GMT-5
another problem, when I will shutdown pc (i'm using xfce): relogin! I'm using slim...
"failed to execute login command" and reloginAny ideas from anybody?
I confirm that solution suggested by ROOKIE fixes bug with reboot on XFCE 4.4.3 with Slim (daemon). I did not test shutdown yet. Actually, I combine expressions from Wiki with two last expressions from ROOKIE.
]]>If you start in CLI mode are you able to issue normal shutdown commands such as the one i posted?
I use slim as my login manager. I had originally been using the wrong "shutdown" commands with: "sudo shutdown -n" and "sudo shutdown -h" (without the now)......
So I just used the "sudo poweroff" command and it worked fine. Same as "sudo reboot -n". (I always use that command when in tty1 console)
Your command: "sudo shutdown -h now" works perfectly. (I didn't know you need the "now" part)
Is it better than the "sudo poweroff" command?
Anyway, all terminal commands aside..... I would like to fix the gui way because that is the way I usually quit/shutdown.
]]>an easy way around this, is not to use a login manager if you're using one. I have herd many people with kde having similar problems, however since I don't use the login manager, kde doesn't monitor shutdown or restart of my computer.
use
sudo shutdown -h now
easy.
I have been using the "sudo poweroff" command, and the "sudo reboot -n" command..... It's what I have been doing since last night. I'll use "sudo shutdown -h now" if it's better for my laptop than the "sudo poweroff" command.
.....But I just want to fix my slim and gui shutdown method because it's the "easiest way" to just press the quit button and the shutdown button.
EDIT: also thank you. I know you were just trying to help and point out the easiest and best command to use to shutdown..... I just like to have all of my apps working in the way they are meant to work..... so that is why I was hoping to fix the xfce/slim logout problem.
]]>use
sudo shutdown -h now
easy.
]]>fantomas wrote:same problem here after last hal upgrade, cant mount device with hal or cant shudown or reboot xfce session
To fix the problem with mounting, please go to HAL page in Wiki and read Troubleshooting. Edit /etc/PolicyKit/PolicyKit.conf as described.
But there is a SECOND bug that hasn't been fixed yet. It is about the "shutdown" and "reboot" not completing. It just goes back to the login screen. (for xfce4 and slim)
It's being reported by "thatnewyorker" (post#1), westend (post#3), fantomas (post#4), and me (methuselah post#12). It also is in the the BUGS section as comment #6: http://bugs.archlinux.org/task/13162#comment39047
Comment by ugaciaka (ugaciaka) - Monday, 09 February 2009, 03:51 GMT-5
another problem, when I will shutdown pc (i'm using xfce): relogin! I'm using slim...
"failed to execute login command" and relogin
Any ideas from anybody?
]]>