You are not logged in.

#1 2012-05-08 15:58:16

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

[SOLVED] New slim, can't shutdown|reboot|suspend anymore

Hi!
I just upgraded slim, and i notice that i cannot suspend, shutdown and reboot anymore.
And to mount usb drive, i am asked for my password.
After the upgrade i changed /etc/slim.conf,pacnew to suit my needs and then sudo mv /etc/slim.conf.pacnew /etc/slim.conf .
My .xinitrc is the same, so, where is the problem?
here there are my slim.conf:

# Path, X server and arguments (if needed)
# Note: -xauth $authfile is automatically appended
default_path        /bin:/usr/bin:/usr/local/bin
default_xserver     /usr/bin/X
xserver_arguments -nolisten tcp vt07

# Commands for halt, login, etc.
halt_cmd            /sbin/shutdown -h now
reboot_cmd          /sbin/shutdown -r now
console_cmd         /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
#suspend_cmd        /usr/sbin/suspend

# Full path to the xauth binary
xauth_path         /usr/bin/xauth 

# Xauth file for server
authfile           /var/run/slim.auth


# Activate numlock when slim starts. Valid values: on|off
# numlock             on

# Hide the mouse cursor (note: does not work with some WMs).
# Valid values: true|false
# hidecursor          false

# This command is executed after a succesful login.
# you can place the %session and %theme variables
# to handle launching of specific commands in .xinitrc
# depending of chosen session and slim theme
#
# NOTE: if your system does not have bash you need
# to adjust the command according to your preferred shell,
# i.e. for freebsd use:
# login_cmd           exec /bin/sh - ~/.xinitrc %session
login_cmd           exec /bin/bash -login ~/.xinitrc %session

# Commands executed when starting and exiting a session.
# They can be used for registering a X11 session with
# sessreg. You can use the %user variable
#
# sessionstart_cmd	some command
# sessionstop_cmd	some command

# Start in daemon mode. Valid values: yes | no
# Note that this can be overriden by the command line
# options "-d" and "-nodaemon"
# daemon	yes

# Available sessions (first one is the default).
# The current chosen session name is replaced in the login_cmd
# above, so your login command can handle different sessions.
# see the xinitrc.sample file shipped with slim sources
sessions            xfce4,icewm-session,wmaker,blackbox

# Executed when pressing F11 (requires imagemagick)
screenshot_cmd      import -window root /slim.png

# welcome message. Available variables: %host, %domain
welcome_msg         Welcome to %host

# Session message. Prepended to the session name when pressing F1
# session_msg         Session: 

# shutdown / reboot messages
shutdown_msg       The system is halting...
reboot_msg         The system is rebooting...

# default user, leave blank or remove this line
# for avoid pre-loading the username.
default_user        federico

# Focus the password field on start when default_user is set
# Set to "yes" to enable this feature
#focus_password      no

# Automatically login the default user (without entering
# the password. Set to "yes" to enable this feature
auto_login          yes


# current theme, use comma separated list to specify a set to 
# randomly choose from
current_theme       default

# Lock file
lockfile            /var/lock/slim.lock

# Log file
logfile             /var/log/slim.log

and my .xinitrc:

#!/bin/bash
export BROWSER=chromium
export DE=xfce
exec ck-launch-session dbus-launch startxfce4

Thanks!

Last edited by nierro (2012-05-08 18:42:44)

Offline

#2 2012-05-08 16:45:22

Terminator
Member
From: Belgium
Registered: 2012-05-07
Posts: 265

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

Maybe the problem is that shutdown and suspend are not in your default path. Try adding /sbin and /usr/sbin to your default path in slim.conf. If that doesn't help it's probably a problem with consolekit.

Last edited by Terminator (2012-05-08 16:46:10)

Offline

#3 2012-05-08 16:52:02

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

Yeah now that you make me notice it, there was a little differences between that new line and the old one, but i tought it was something not used anymore, so i left the new one! I'll try, thanks

Offline

#4 2012-05-08 16:54:32

headkase
Member
From: Canada
Registered: 2011-12-06
Posts: 1,476
Website

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

From later in this thread:

Solution

Ok, do:

ck-list-sessions

There were two sessions for myself.  So, the new slim is starting your exec line already with a console kit session.  This is new behavior.  It didn't before.

So, I modified my exec line to remove "ck-launch-session" in .xinitrc to:

exec dbus-launch --exit-with-session startxfce4

Reverted the changes I made to the shutdown/restart policy and rebooted.  Shutdown, restart, mounting USB drive: they all work again now.

Edit: from even later on in this thread, just:

exec startxfce4

As your .xinitrc exec line should be sufficient for practically anyone.  "startxfce4" does the dbus-launch itself.

--

Original post here:


Changed in my /etc/slim.conf:
default_path        /bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin

Same issue, in Action buttons Shutdown and Restart grayed out.

in .xinitrc, launch line:
exec ck-launch-session startxfce4

Launch line was:
exec ck-launch-session dbus-launch --exit-with-session startxfce4
But, same issue with that launch line.  Was googling and I found results saying dbus-launch is contained within startxfce4.

Last edited by headkase (2012-05-09 02:23:48)


We all make choices, but in the end, our choices make us.

Online

#5 2012-05-08 16:57:49

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

Yeah, adding /sbin and /usr/sbin doesn't fix the issue!
I just checked and path are correct (/sbin/shutdown and the others are ok), so i don't know, any help is really appreciate!

Last edited by nierro (2012-05-08 17:03:33)

Offline

#6 2012-05-08 17:11:34

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

it is an error related to consolekit, cecause if i close my netbook, i expect it to suspend, but when i open the lid again, xfce-power-manager tells me i'm not authorized and it won't suspend.

Offline

#7 2012-05-08 17:37:22

headkase
Member
From: Canada
Registered: 2011-12-06
Posts: 1,476
Website

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

Ok, here's a "hackish" way to re-enable Shutdown and Restart.  I don't use suspend or hibernate so you may have to do similar instructions for those.

In

/usr/share/polkit-1/actions/org.freedesktop.consolekit.policy

Edit the following sections:

<action id="org.freedesktop.consolekit.system.stop">

so it's allow inactive member says:

<allow_inactive>yes</allow_inactive>

And,

<action id="org.freedesktop.consolekit.system.restart">

so it's allow inactive member says:

<allow_inactive>yes</allow_inactive>

And this will enable shutdown and restart, look for other sections that may apply to you.

The question is however: why is my session suddenly "inactive" whereas before it was "active"?

Edit: logout and back in to take effect.

Last edited by headkase (2012-05-08 17:38:39)


We all make choices, but in the end, our choices make us.

Online

#8 2012-05-08 17:41:51

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

Ok this is a workaround, but sorry for the question, i did not understand why this problem has came out. I could not find a changelog for new slim, but i want to know what changed!
Thank you anyway for the solution!

Offline

#9 2012-05-08 17:45:09

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

Yeah i know understand what do you mean...
for suspend and hibernation i must edit org.freedesktop.upower.policy, the same way as above.
But why current logged in user is inactive????

Offline

#10 2012-05-08 17:50:30

headkase
Member
From: Canada
Registered: 2011-12-06
Posts: 1,476
Website

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

nierro wrote:

Thank you anyway for the solution!

You're welcome, it works but like yourself I'm waiting for a better explanation/solution.  But, yeah, works for interim.


We all make choices, but in the end, our choices make us.

Online

#11 2012-05-08 17:52:08

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

What version of slim is it really? svn version 1.3.3 has new support for console-kit and works fine here.

Offline

#12 2012-05-08 17:54:15

headkase
Member
From: Canada
Registered: 2011-12-06
Posts: 1,476
Website

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

swanson wrote:

What version of slim is it really? svn version 1.3.3 has new support for console-kit and works fine here.

I get:

$ pacman -Ss slim

extra/slim 1.3.3-2 [installed]
    Desktop-independent graphical login manager for X11

It was just updated and pacman -Syu brought it in for myself.


We all make choices, but in the end, our choices make us.

Online

#13 2012-05-08 17:59:30

EasySly
Member
Registered: 2012-03-25
Posts: 35

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

I have the same version 1.3.3-2 and have the same issue. I cannot suspend, restart sad

Offline

#14 2012-05-08 18:00:40

EasySly
Member
Registered: 2012-03-25
Posts: 35

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

consolekit 0.4.6-3 is installed

Last edited by EasySly (2012-05-08 18:01:04)

Offline

#15 2012-05-08 18:01:12

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

@swanson
can you please link us the changelog? i could not find it!

svn version 1.3.3 has new support for console-kit and works fine here.

This would explain everything but why it is working for you and not for us smile
can you check #7 and give a look to that file, and tell us if allow inactive is set to "yes" or "no"?
thanks!

EDIT: found it : http://developer.berlios.de/project/sho … e_id=18914

Last edited by nierro (2012-05-08 18:05:43)

Offline

#16 2012-05-08 18:02:08

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

Easysly look at post  #7 and next to read a workaround!

Offline

#17 2012-05-08 18:02:13

headkase
Member
From: Canada
Registered: 2011-12-06
Posts: 1,476
Website

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

The problem goes deeper too: I'm trying to mount a USB stick.  Not authorized whereas before it worked fine.  I'm not going to go in and edit the two udisks policies, instead I'm going to hope a "console kit" solution itself gets presented here.


We all make choices, but in the end, our choices make us.

Online

#18 2012-05-08 18:06:27

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

yes, this is what i'm thinking.
I'm going to rollback those files and wait.

Offline

#19 2012-05-08 18:11:44

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

Slim source; http://developer.berlios.de/project/sho … e_id=18914
I'm using a self compiled svn version. Revision log: http://svn.berlios.de/viewvc/slim/trunk/

Offline

#20 2012-05-08 18:16:39

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

Can you please have a look at /usr/share/polkit-1/actions/org.freedesktop.consolekit.policy and tell us what's your "allow_inactive" value? Thanks!

Offline

#21 2012-05-08 18:38:44

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

Uhm another release of slim, may be this problem get fixed?
EDIT: not fixed big_smile

Last edited by nierro (2012-05-08 18:40:27)

Offline

#22 2012-05-08 18:40:31

headkase
Member
From: Canada
Registered: 2011-12-06
Posts: 1,476
Website

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

Solution

Ok, do:

ck-list-sessions

There were two sessions for myself.  So, the new slim is starting your exec line already with a console kit session.  This is new behavior.  It didn't before.

So, I modified my exec line to remove "ck-launch-session" in .xinitrc to:

exec dbus-launch --exit-with-session startxfce4

Reverted the changes I made to the shutdown/restart policy and rebooted.  Shutdown, restart, mounting USB drive: they all work again now.

Last edited by headkase (2012-05-09 00:53:09)


We all make choices, but in the end, our choices make us.

Online

#23 2012-05-08 18:42:22

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 809

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

You're my hero! big_smile
Thanks a lot!

Offline

#24 2012-05-08 18:45:01

headkase
Member
From: Canada
Registered: 2011-12-06
Posts: 1,476
Website

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

You're welcome! wink  I think I leveled-up.. big_smile


We all make choices, but in the end, our choices make us.

Online

#25 2012-05-08 19:00:21

tr0nic
Member
From: Europe
Registered: 2005-05-02
Posts: 15

Re: [SOLVED] New slim, can't shutdown|reboot|suspend anymore

I also have two sessions.
My .xinitrc has already had a simple "exec startxfce4", there was no ck-launch-session in it before, so I cannot apply your fix unfortunately.
My slim.conf "login_cmd":  exec ck-launch-session /bin/bash -login ~/.xinitrc %session

Offline

Board footer

Powered by FluxBB