Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] xfce4 "shut down" "restart" button are disabled
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2506
Location: Edmonton, AB

PostPosted: Tue Dec 13, 2011 7:49 am    Post subject: [SOLVED] xfce4 "shut down" "restart" but Reply with quote

xfce4 "shut down" "restart" button are disabled
"suspend" and "hibernate" are not even showing

consolekit - is up and running.
_________________
#Thelma


Last edited by Joseph_sys on Wed Dec 14, 2011 6:12 am; edited 1 time in total
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2887
Location: Omnipresent

PostPosted: Tue Dec 13, 2011 8:09 am    Post subject: Reply with quote

Please check the output of the following commands on your system:

Code:
$ ck-list-sessions


My output:

Code:
Session2:
   unix-user = '1000'
   realname = '(null)'
   seat = 'Seat1'
   session-type = ''
   active = TRUE
   x11-display = ':0.0'
   x11-display-device = '/dev/tty7'
   display-device = ''
   remote-host-name = ''
   is-local = TRUE
   on-since = '2011-12-05T12:10:57.843910Z'
   login-session-id = '1'
Session1:
   unix-user = '1000'
   realname = '(null)'
   seat = 'Seat2'
   session-type = ''
   active = FALSE
   x11-display = ':0.0'
   x11-display-device = ''
   display-device = ''
   remote-host-name = ''
   is-local = TRUE
   on-since = '2011-12-05T12:10:57.759156Z'
   login-session-id = '1'


Also --

Code:
$ upower -d


Excerpt of my output:

Code:
Daemon:
  daemon-version:  0.9.12
  can-suspend:     yes
  can-hibernate    yes
  on-battery:      no
  on-low-battery:  no
  lid-is-closed:   no
  lid-is-present:  yes
  is-docked:       no


The first shows that I, the user, control the present console tty7, which should allow me to control UPower. The second shows that UPower is capable of suspend and hibernate operations (shutdown and reboot capability are assumed, I believe)
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
ultraincognito
Guru
Guru


Joined: 03 Jun 2011
Posts: 346
Location: Ukraine

PostPosted: Tue Dec 13, 2011 8:25 am    Post subject: Reply with quote

I have a such problem too. I use the links on desktop instead the missing options. They execute "sudo pm-suspend", "sudo shutdown -h now" etc.
Also do want say that I don't like Consolekit and don't use it.
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2887
Location: Omnipresent

PostPosted: Tue Dec 13, 2011 8:28 am    Post subject: Reply with quote

ultraincognito,

That's an okay (if ugly) solution for a single-user system, but not for a multi-user or locked down system.

What makes this work is sys-auth/consolekit-0.4.5-r1, which provides the file

Code:
/etc/X11/xinit/xinitrc.d/90-consolekit


which wraps your X login session in a consolekit session.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
ultraincognito
Guru
Guru


Joined: 03 Jun 2011
Posts: 346
Location: Ukraine

PostPosted: Tue Dec 13, 2011 8:40 am    Post subject: Reply with quote

What are actions that don't can without Consolekit?
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2887
Location: Omnipresent

PostPosted: Tue Dec 13, 2011 9:14 am    Post subject: Reply with quote

AFAIK:

To use the xfce4 buttons for shutdown/reboot/hibernate/suspend, you need the "polkit consolekit upower" USE flags (including for PAM).

If you want Thunar to automount USB sticks, etc. you need the "polkit consolekit dbus udev" USE flags, and the users need to be in the "plugdev" group.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
ultraincognito
Guru
Guru


Joined: 03 Jun 2011
Posts: 346
Location: Ukraine

PostPosted: Tue Dec 13, 2011 9:24 am    Post subject: Reply with quote

Hypnos wrote:
If you want Thunar to automount USB sticks, etc. you need the "polkit consolekit dbus udev" USE flags, and the users need to be in the "plugdev" group.

The true users write an udev rules.
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2887
Location: Omnipresent

PostPosted: Tue Dec 13, 2011 9:38 am    Post subject: Reply with quote

ultraincognito wrote:
Hypnos wrote:
If you want Thunar to automount USB sticks, etc. you need the "polkit consolekit dbus udev" USE flags, and the users need to be in the "plugdev" group.

The true users write an udev rules.

The great thing about Gentoo is that each user can decide what is the "true" way.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2506
Location: Edmonton, AB

PostPosted: Tue Dec 13, 2011 1:56 pm    Post subject: Reply with quote

Hypnos wrote:
AFAIK:

To use the xfce4 buttons for shutdown/reboot/hibernate/suspend, you need the "polkit consolekit upower" USE flags (including for PAM).

If you want Thunar to automount USB sticks, etc. you need the "polkit consolekit dbus udev" USE flags, and the users need to be in the "plugdev" group.


Which program (flags) generate "plugdev" group?
I don't have one!

update:
Apparently "hal" generate plugdev group.
I used to have hal installed on my other system but it was removed (though I have plugdev group and and those button are there active).

What program replaced "hal"?
_________________
#Thelma
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2887
Location: Omnipresent

PostPosted: Tue Dec 13, 2011 3:57 pm    Post subject: Reply with quote

hal has been replaced by udisks and upower

upower is pulled in by xfce4-session with the "udev" USE flag set (I forgot to list this one above), and udisks is pulled in by thunar via gvfs with the "dbus" USE flag set.

xfce4-power-manager pulls in both upower and udisks if you install it.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2506
Location: Edmonton, AB

PostPosted: Tue Dec 13, 2011 4:48 pm    Post subject: Reply with quote

Hypnos wrote:
hal has been replaced by udisks and upower

upower is pulled in by xfce4-session with the "udev" USE flag set (I forgot to list this one above), and udisks is pulled in by thunar via gvfs with the "dbus" USE flag set.

xfce4-power-manager pulls in both upower and udisks if you install it.


Something is not correct. I have all three installed:
xfce4-session, thunar, gvfs

my USE flags, has udev and dbus:
Code:
USE="-gnome qt4 -hal -arts -berkdb X gtk -qt3 -kde -minimal dvd alsa cdr cups apache2 ssl foomaticdb ppds mysql -acl java tiff jpeg png lock session startup-notification thunar usb udev scanner gimp gimpprint cgi fam nptl trutype kpathsea type1 spell consolekit dbus pam policykit semantic-desktop"

and yes, upower and udisks are both installed but no "plugdev" group is set

Code:
[ebuild   R    ] xfce-base/thunar-1.2.3  USE="dbus exif libnotify pcre startup-notification udev -debug -test" XFCE_PLUGINS="trash" 0 kB

[ebuild   R    ] xfce-base/xfce4-session-4.8.1  USE="consolekit policykit udev -debug -gnome -gnome-keyring" XFCE_PLUGINS="logout" 0 kB

[ebuild   R    ] gnome-base/gvfs-1.6.7-r1  USE="bluetooth cdda gdu gnome http udev -archive -avahi -bash-completion -doc -fuse -gnome-keyring -gphoto2 -ios (-prefix) -samba" 0 kB

_________________
#Thelma
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2887
Location: Omnipresent

PostPosted: Tue Dec 13, 2011 5:00 pm    Post subject: Reply with quote

What is your output for ck-list-sessions ? The session on console tty7 should have the line "active = TRUE". This should at least give your the privilege to shutdown or reboot the computer.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2506
Location: Edmonton, AB

PostPosted: Tue Dec 13, 2011 5:06 pm    Post subject: Reply with quote

Hypnos wrote:
What is your output for ck-list-sessions ? The session on console tty7 should have the line "active = TRUE". This should at least give your the privilege to shutdown or reboot the computer.


My active is FALSE.

Code:
$ ck-list-sessions
Session1:
   unix-user = '1000'
   realname = '(null)'
   seat = 'Seat2'
   session-type = ''
   active = FALSE
   x11-display = ':0.0'
   x11-display-device = '/dev/tty7'
   display-device = ''
   remote-host-name = ''
   is-local = FALSE
   on-since = '2011-12-13T17:03:32.101537Z'
   login-session-id = '11'
Session2:
   unix-user = '1000'
   realname = '(null)'
   seat = 'Seat3'
   session-type = ''
   active = FALSE
   x11-display = ''
   x11-display-device = ''
   display-device = '/dev/ssh'
   remote-host-name = '10.0.0.109'
   is-local = FALSE
   on-since = '2011-12-13T17:04:19.372828Z'
   login-session-id = '12'


Code:
$ upower -d
Daemon:
  daemon-version:  0.9.13
  can-suspend:     no
  can-hibernate    no
  on-battery:      no
  on-low-battery:  no
  lid-is-closed:   no
  lid-is-present:  no
  is-docked:       no

_________________
#Thelma
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2887
Location: Omnipresent

PostPosted: Tue Dec 13, 2011 5:41 pm    Post subject: Reply with quote

Interesting, consolekit recognizes your tty7 session as neither active nor local. Moreover your session IDs are rather high in value.

Are you launching X via a remote session? If so you won't be granted shutdown/reboot privileges. Moreover, ck-launch-session is incompatible with su/sudo (more here).
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2506
Location: Edmonton, AB

PostPosted: Tue Dec 13, 2011 5:47 pm    Post subject: Reply with quote

Hypnos wrote:
Interesting, consolekit recognizes your tty7 session as neither active nor local. Moreover your session IDs are rather high in value.

Are you launching X via a remote session? If so you won't be granted shutdown/reboot privileges. Moreover, ck-launch-session is incompatible with su/sudo (more here).


I was logged IN via ssh.
Here is the output from the machine itself:
Code:
$ ck-list-sessions
Session1:
   unix-user = '1000'
   realname = '(null)'
   seat = 'Seat2'
   session-type = ''
   active = FALSE
   x11-display = ':0.0'
   x11-display-device = '/dev/tty7'
   display-device = ''
   remote-host-name = ''
   is-local = FALSE
   on-since = '2011-12-13T17:03:32.101537Z'
   login-session-id = '11'
Session2:
   unix-user = '1000'
   realname = '(null)'
   seat = 'Seat3'
   session-type = ''
   active = FALSE
   x11-display = ''
   x11-display-device = ''
   display-device = '/dev/ssh'
   remote-host-name = '10.0.0.109'
   is-local = FALSE
   on-since = '2011-12-13T17:04:19.372828Z'
   login-session-id = '12'


$ upower -d
Daemon:
  daemon-version:  0.9.13
  can-suspend:     no
  can-hibernate    no
  on-battery:      no
  on-low-battery:  no
  lid-is-closed:   no
  lid-is-present:  no
  is-docked:       no

Even if I close all the terminal session except 1 my session ID is still 11
_________________
#Thelma
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 5963
Location: Saint Amant, Acadiana

PostPosted: Tue Dec 13, 2011 5:59 pm    Post subject: Reply with quote

How do you start Xfce?
_________________
Please learn how to denote units correctly!

Political Correctness is all about replacing imaginary injustice with real injustice.
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2506
Location: Edmonton, AB

PostPosted: Tue Dec 13, 2011 6:02 pm    Post subject: Reply with quote

Jaglover wrote:
How do you start Xfce?


Code:
.xinitrc
#exec startxfce4
exec ck-launch-session dbus-launch --sh-syntax --exit-with-session xfce4-session


If I use the first line. Log-OUT/IN my session ID = 14
_________________
#Thelma
Back to top
View user's profile Send private message
ultraincognito
Guru
Guru


Joined: 03 Jun 2011
Posts: 346
Location: Ukraine

PostPosted: Tue Dec 13, 2011 6:34 pm    Post subject: Reply with quote

Joseph_sys, do you fear use Thunar without Gvfs and Udisks but with theUdev rules for automounting devices? If fear then why?
I do want help you.
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2506
Location: Edmonton, AB

PostPosted: Tue Dec 13, 2011 6:44 pm    Post subject: Reply with quote

ultraincognito wrote:
Joseph_sys, do you fear use Thunar without Gvfs and Udisks but with theUdev rules for automounting devices? If fear then why?
I do want help you.


I'm not sure what are you trying to say, but thanks for trying.
Yes, I do have gvfs installed:
gnome-base/gvfs-1.6.7-r1
_________________
#Thelma
Back to top
View user's profile Send private message
ultraincognito
Guru
Guru


Joined: 03 Jun 2011
Posts: 346
Location: Ukraine

PostPosted: Tue Dec 13, 2011 8:09 pm    Post subject: Reply with quote

Joseph_sys wrote:
I'm not sure what are you trying to say, but thanks for trying.

I shall improve my English.
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2506
Location: Edmonton, AB

PostPosted: Tue Dec 13, 2011 11:36 pm    Post subject: Reply with quote

How xfce4 is starting on my computer when I log IN?

I've commented out from:
/etc/env.d/90xsession #XSESSION="Xfce4"
~$.xinitrc #exec startxfce4

and xfce4 still starts when I login? Maybe this has something to do with button disparaging?
Though, this is not only Getnoo related some other users on other distros reporting the same behaviour.
_________________
#Thelma
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 5963
Location: Saint Amant, Acadiana

PostPosted: Wed Dec 14, 2011 12:06 am    Post subject: Reply with quote

It has to be started like this
Code:
ck-launch-session startxfce4
In your case it seems to be started from somewhere else, that's why you get active = FALSE and buttons do not work.
_________________
Please learn how to denote units correctly!

Political Correctness is all about replacing imaginary injustice with real injustice.
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2506
Location: Edmonton, AB

PostPosted: Wed Dec 14, 2011 12:38 am    Post subject: Reply with quote

Jaglover wrote:
It has to be started like this
Code:
ck-launch-session startxfce4
In your case it seems to be started from somewhere else, that's why you get active = FALSE and buttons do not work.

I'm using 'slim' and I've noticed that that slim is starting xfce4
by pressing "F1" it toggle between "Xsession" and "Xfce4"
Yes, it could be the reason. But where is setting in Slim to set " ck-launch-session startxfce4"
_________________
#Thelma
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2506
Location: Edmonton, AB

PostPosted: Wed Dec 14, 2011 1:36 am    Post subject: Reply with quote

I've sued xdm instead of slim, it make no difference.

/etc/env.d/90xsession
XSESSION="Xfce4"

/etc/X11/Sessions/Xfce4
ck-launch-session startxfce4

$ .xinitrc
is not used.
_________________
#Thelma
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 5963
Location: Saint Amant, Acadiana

PostPosted: Wed Dec 14, 2011 1:45 am    Post subject: Reply with quote

Can't tell, I do not use any login managers. However, if you choose Xsession, will it source .xinitrc?
_________________
Please learn how to denote units correctly!

Political Correctness is all about replacing imaginary injustice with real injustice.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum