LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 766|回复: 12

现在系统原来支持的关机重启都只能登出了,是不是hal的问题?

[复制链接]
发表于 2009-2-9 23:13:28 | 显示全部楼层 |阅读模式
我的lxde不能reboot,shutdown了,现在每次选择他,都是logout到slim下面了。我的用户在power组里面。不知道是为什么阿?
发表于 2009-2-9 23:31:12 | 显示全部楼层
贴inittab文件!让大家帮你分析一下
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-2-9 23:32:31 | 显示全部楼层
#
# /etc/inittab
#

#  Runlevels:
#    0    Halt
#    1(S)        Single-user
#    2    Not used
#    3    Multi-user
#    4    Not used
#    5    X11
#    6    Reboot

## Only one of the following two lines can be uncommented!
# Boot to console
#id:3:initdefault:
# Boot to X11
id:5:initdefault:

rc::sysinit:/etc/rc.sysinit
rs:S1:wait:/etc/rc.single
rm:2345:wait:/etc/rc.multi
rh:06:wait:/etc/rc.shutdown
su:S:wait:/sbin/sulogin -p

# -8 options fixes umlauts problem on login
c1:2345:respawn:/sbin/agetty -8 38400 vc/1 linux
c2:2345:respawn:/sbin/agetty -8 38400 vc/2 linux
c3:2345:respawn:/sbin/agetty -8 38400 vc/3 linux
c4:2345:respawn:/sbin/agetty -8 38400 vc/4 linux
c5:2345:respawn:/sbin/agetty -8 38400 vc/5 linux
c6:2345:respawn:/sbin/agetty -8 38400 vc/6 linux

ca::ctrlaltdel:/sbin/shutdown -t3 -r now

# Example lines for starting a login manager
#x:5:respawn:/usr/bin/xdm -nodaemon
#x:5:respawn:/usr/sbin/gdm -nodaemon
#x:5:respawn:/opt/kde/bin/kdm -nodaemon
x:5:respawn:/usr/bin/slim >& /dev/null

# End of file
回复 支持 反对

使用道具 举报

发表于 2009-2-9 23:36:42 | 显示全部楼层
在/etc/PolicyKit/PolicyKit.conf里面添加如下内容:
  1.     <define_admin_auth group="wheel"/>
  2.     <match user="root">
  3.         <return result="yes"/>
  4.     </match>
复制代码


你自己得在wheel组里面。试试看。如果不行就再添加:
  1.     <match action="org.freedesktop.hal.power-management.suspend">
  2.         <return result="yes"/>
  3.     </match>

  4.     <match action="org.freedesktop.hal.power-management.hibernate">
  5.         <return result="yes"/>
  6.     </match>

  7.     <match action="org.freedesktop.hal.power-management.shutdown">
  8.         <return result="yes"/>
  9.     </match>

  10.         <match action="org.freedesktop.hal.power-management.reboot">
  11.         <return result="yes"/>
  12.     </match>

  13.     <match action="org.freedesktop.hal.power-management.lcd-panel">
  14.         <return result="yes"/>
  15.     </match>

  16.     <match action="org.freedesktop.hal.storage.mount-removable">
  17.         <return result="yes"/>
  18.     </match>
  19.    
  20.     <match action="org.freedesktop.hal.storage.mount-fixed">
  21.         <return result="yes"/>
  22.     </match>

  23.     <match action="org.freedesktop.hal.storage.eject">
  24.         <return result="yes"/>
  25.     </match>
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-2-9 23:40:36 | 显示全部楼层
我现在把hal降回去了,还需要这样么?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-2-9 23:41:47 | 显示全部楼层
Post by jarryson;1945697
在/etc/PolicyKit/PolicyKit.conf里面添加如下内容:
  1.     <define_admin_auth group="wheel"/>
  2.     <match user="root">
  3.         <return result="yes"/>
  4.     </match>
复制代码


你自己得在wheel组里面。试试看。如果不行就再添加:
  1.     <match action="org.freedesktop.hal.power-management.suspend">
  2.         <return result="yes"/>
  3.     </match>

  4.     <match action="org.freedesktop.hal.power-management.hibernate">
  5.         <return result="yes"/>
  6.     </match>

  7.     <match action="org.freedesktop.hal.power-management.shutdown">
  8.         <return result="yes"/>
  9.     </match>

  10.         <match action="org.freedesktop.hal.power-management.reboot">
  11.         <return result="yes"/>
  12.     </match>

  13.     <match action="org.freedesktop.hal.power-management.lcd-panel">
  14.         <return result="yes"/>
  15.     </match>

  16.     <match action="org.freedesktop.hal.storage.mount-removable">
  17.         <return result="yes"/>
  18.     </match>
  19.    
  20.     <match action="org.freedesktop.hal.storage.mount-fixed">
  21.         <return result="yes"/>
  22.     </match>

  23.     <match action="org.freedesktop.hal.storage.eject">
  24.         <return result="yes"/>
  25.     </match>
复制代码


我现在把hal降回去了,还需要这样么?
而且我以前不在wheel组里面,但是也没有问题阿,就是现在出现的问题……
回复 支持 反对

使用道具 举报

发表于 2009-2-9 23:43:09 | 显示全部楼层
Post by oopszj;1945703
我现在把hal降回去了,还需要这样么?
而且我以前不在wheel组里面,但是也没有问题阿,就是现在出现的问题……
在不在wheel组里没关系的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-2-9 23:46:03 | 显示全部楼层
我又重启了一下,发现好了。
谢谢楼上各位了!
昨天一直以为是我的vbox加入usb支持搞的。搞到半夜。
一开始还以为不是hal升级的问题,现在发现全是他的问题。
乱升级害死人阿……
回复 支持 反对

使用道具 举报

发表于 2009-2-9 23:50:28 | 显示全部楼层
不推荐这样降级。迟早要升级的。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-2-9 23:52:58 | 显示全部楼层
Post by jarryson;1945709
不推荐这样降级。迟早要升级的。


我知道,但是这些都是临时方法啊。我想等等看有没有其他办法。
主要还是我没搞明白是怎么回事。
所以就不想这么改……
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表