You are not logged in.

#1 2012-05-09 03:33:09

jonnybel
Member
Registered: 2011-11-21
Posts: 20

XFCE - Can't Shutdown or Reboot by the Log Out menu

Since an update I did a while ago, every time I try to Shutdown or Reboot my computer from the Log Out menu of XFCE, the system just logs out and goes back to the login screen (Slim).

After that, I check dmesg and get the following:

[13763.730024] xfce4-session[748]: segfault at 8 ip 0000000000413a50 sp 00007fffbe25a670 error 4 in xfce4-session[400000+27000]

Everything was running fine until a while ago, when I updated my system (kernel and XFCE included) and I did not change any settings. Now I have to shutdown by the console, with sudo.

Any idea on how can I fix this? Thanks in advance.

Last edited by jonnybel (2012-05-09 03:34:01)

Offline

#2 2012-05-09 03:45:02

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

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

If

ck-list-sessions

is showing more than one session, and since you are using SLiM as your Login Manager, then this is likely part of the solution:

SLiM was updated and now has integrated console kit support.

Last edited by headkase (2012-05-09 03:45:36)


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

Offline

#3 2012-05-09 13:09:04

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 671

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

I have essentially the same problem - except I'm not using slim.  I log into the console and use "startx" to start XFCE. The logout button now also only logs me out instead of giving me the options of shutting down or rebooting.

Offline

#4 2012-05-09 13:41:46

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,830
Website

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

Phunni, that does not sound like the same problem then.  This could be related.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#5 2012-05-09 14:41:48

beta990
Member
Registered: 2011-07-10
Posts: 163

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

Did you looked at the panel options for the logout button?
There you can select different modes, and try choosing an other log out item in the menu.

Offline

#6 2012-05-09 15:50:36

MatejLach
Member
From: United Kingdom
Registered: 2011-06-22
Posts: 309
Website

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

headkase wrote:

If

ck-list-sessions

is showing more than one session, and since you are using SLiM as your Login Manager, then this is likely part of the solution:

SLiM was updated and now has integrated console kit support.

I had exactly the same problem and this worked for me.
Thanks!

P.S.

ck-list-sessions

was showing 2 active sessions for me, maybe this new slim behaviour should be announced on the mailing lists/main page?

Last edited by MatejLach (2012-05-09 15:52:28)


-
Everyone should read K&R C at least once in their lifetime.

Offline

#7 2012-05-09 19:20:52

jonnybel
Member
Registered: 2011-11-21
Posts: 20

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

headkase wrote:

If

ck-list-sessions

is showing more than one session, and since you are using SLiM as your Login Manager, then this is likely part of the solution:

SLiM was updated and now has integrated console kit support.

It actually showed 3 sessions.

I did what you mentioned about SLiM and now I "only" have two. I only updated SLiM yesterday, after I posted about my issue, so I'm back to the start.

Offline

#8 2012-05-10 04:28:44

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,830
Website

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

What's in your x:5 line of inittab?  That should be one of the last lines of /etc/inittab.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#9 2012-05-10 06:56:38

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

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

It's already solved see this thread - https://bbs.archlinux.org/viewtopic.php … 2#p1099742

Offline

#10 2012-05-10 11:56:08

jonnybel
Member
Registered: 2011-11-21
Posts: 20

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

Trilby wrote:

What's in your x:5 line of inittab?  That should be one of the last lines of /etc/inittab.

x:5:respawn:/usr/bin/slim >/dev/null 2>&1

EasySly wrote:

It's already solved see this thread - https://bbs.archlinux.org/viewtopic.php … 2#p1099742

That seems to be the solution related directly to SLiM, which I already solved, but I'll try it right away.

Offline

#11 2012-05-14 20:42:42

jonnybel
Member
Registered: 2011-11-21
Posts: 20

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

Sorry for the double post:

I did what EasySly said but as I expected, it didn't solve the problem. Apparently it's not about SLiM. Any other suggestions?

Offline

#12 2012-05-15 13:37:49

wassup
Member
Registered: 2010-03-16
Posts: 12

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

Hiya.

I've got the same problem as phunni has. Yet, I don't want to try the autologin from .bash_profile. I don't use Slim or anythin else, I just type 'startx' into the console. Within xfce itself, I can logout, but cannot reboot or shutdown. My .xinitrc would be at the moment:

#!/bin/sh

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    # Do not launch dbus before ConsoleKit (FS#25031)
    #[ -x "$f" ] && . "$f"
    [ "$f" -ne "/etc/X11/xinit/xinitrc.d/30-dbus" ] && [ -x "$f" ] && . "$f"
  done
  unset f
fi

exec startxfce4 --with-ck-launch

The output of ck-list-sessions is as follows:

Session11:
	unix-user = '1000'
	realname = '(null)'
	seat = 'Seat1'
	session-type = ''
	active = FALSE
	x11-display = ''
	x11-display-device = ''
	display-device = '/dev/tty1'
	remote-host-name = ''
	is-local = TRUE
	on-since = '2012-05-15T13:23:57.065467Z'
	login-session-id = ''
	idle-since-hint = '2012-05-15T13:24:28.580177Z'
Session12:
	unix-user = '1000'
	realname = '(null)'
	seat = 'Seat8'
	session-type = ''
	active = FALSE
	x11-display = ':0'
	x11-display-device = '/dev/tty7'
	display-device = '/dev/tty1'
	remote-host-name = ''
	is-local = FALSE
	on-since = '2012-05-15T13:24:00.803507Z'
	login-session-id = ''

Offline

#13 2012-05-16 00:26:48

Ranmaru
Member
From: Japan
Registered: 2011-11-20
Posts: 59

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

Try the following in your .xinitrc:

exec ck-launch-session dbus-launch startxfce4

That works for me.

Offline

#14 2012-05-17 17:55:18

wassup
Member
Registered: 2010-03-16
Posts: 12

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

Ranmaru wrote:

Try the following in your .xinitrc:

exec ck-launch-session dbus-launch startxfce4

That works for me.

I had it before in my .xinitrc with no luck.

Offline

#15 2012-05-26 16:26:34

jonnybel
Member
Registered: 2011-11-21
Posts: 20

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

I did some of the suggestions mentioned in this topic but I'm still having the same problem from the start...

Here is the output of ck-list-sessions:

Session2:
	unix-user = '1000'
	realname = '-----'
	seat = 'Seat1'
	session-type = 'x11'
	active = TRUE
	x11-display = ':0.0'
	x11-display-device = '/dev/tty7'
	display-device = ''
	remote-host-name = ''
	is-local = TRUE
	on-since = '2012-05-26T16:22:02.895985Z'
	login-session-id = '4'

and my .xinitrc:

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#
if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

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

Does anyone have a clue?

Last edited by jonnybel (2012-05-26 16:28:49)

Offline

#16 2012-05-26 18:41:39

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 948

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

@jonnybel:
Your problem is not CK, but a segfault in xfce-session. You should update your system and see if that helps. Otherwise, you need to debug this issue. I would start by disabling slim and using startx.

On a side note, your .xinitrc is ... excessive because dbus session is spawned automatically by startxfce4. Also, arch default .xinitrc (in skel) is broken. Here is a minimal working .xinitrc:

#!/bin/bash
# XFCE 4.10
exec startxfce4 --with-ck-launch

or

#!/bin/bash
# XFCE 4.8
exec ck-launch-session startxfce4

Arch Linux is more than just GNU/Linux -- it's an adventure

Offline

#17 2012-05-27 15:08:30

jonnybel
Member
Registered: 2011-11-21
Posts: 20

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

Leonid.I wrote:

@jonnybel:
Your problem is not CK, but a segfault in xfce-session. You should update your system and see if that helps. Otherwise, you need to debug this issue. I would start by disabling slim and using startx.

On a side note, your .xinitrc is ... excessive because dbus session is spawned automatically by startxfce4. Also, arch default .xinitrc (in skel) is broken. Here is a minimal working .xinitrc:

#!/bin/bash
# XFCE 4.10
exec startxfce4 --with-ck-launch

or

#!/bin/bash
# XFCE 4.8
exec ck-launch-session startxfce4

This problem appeared a while ago and I have updated my system several times since then, without any fix.

As for my .xinitrc, without "dbus-launch", all the buttons of the "Log Out..." menu, except for the Log Out option, appear greyed out and can't even be selected.
Also, placing "ck-launch-session" is wrong because of this:

headkase wrote:

If

ck-list-sessions

is showing more than one session, and since you are using SLiM as your Login Manager, then this is likely part of the solution:

SLiM was updated and now has integrated console kit support.

Causing me to have 2 active sessions.


Any better ideas?

Last edited by jonnybel (2012-05-27 15:31:05)

Offline

#18 2012-05-27 17:29:44

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 948

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

jonnybel wrote:
Leonid.I wrote:

@jonnybel:
Your problem is not CK, but a segfault in xfce-session. You should update your system and see if that helps. Otherwise, you need to debug this issue. I would start by disabling slim and using startx.

On a side note, your .xinitrc is ... excessive because dbus session is spawned automatically by startxfce4. Also, arch default .xinitrc (in skel) is broken. Here is a minimal working .xinitrc:

#!/bin/bash
# XFCE 4.10
exec startxfce4 --with-ck-launch

or

#!/bin/bash
# XFCE 4.8
exec ck-launch-session startxfce4

This problem appeared a while ago and I have updated my system several times since then, without any fix.

As for my .xinitrc, without "dbus-launch", all the buttons of the "Log Out..." menu, except for the Log Out option, appear greyed out and can't even be selected.
Also, placing "ck-launch-session" is wrong because of this:

Any better ideas?

I know there are all those discussions "I can't mount/logout in xfce4 so lets blame *kit, install polkit-gnome and hack everything" in the forums. The truth is that those people have no clue what they are doing. So I suggest  you think for yourself and learn how xfce is actually started.

For simplicity disable SLIM -- when things work w/o it, put it back.

For 4.10: startxfce4 --with-ck-launch -> /etc/xdg/xfce4/xinitrc -> dbus-launch. All the commands are scripts which you can read. Also

$ grep dbus /etc/xdg/xfce4/xinitrc
# Use dbus-launch if installed.
  if which dbus-launch >/dev/null 2>&1; then
    eval `dbus-launch --sh-syntax --exit-with-session`
    # some older versions of dbus don't export the var properly
    echo "Could not find dbus-launch; Xfce will not work properly" >&2
$ grep ck-launch /usr/bin/startxfce4 
      echo "  --with-ck-launch         Start xfce4-session inside a"
    elif test "x$OPT" == "x--with-ck-launch"
      # try to launch xfce4-session with ck-launch-session in xinitrc

So in yout .xinitrc you need only two (2) lines: shebang and exec ... If basic things don't work from there you have a misconfig.

Does your xfce4-session segfault reproducibly? IT MUST NOT SEGFAULT. ANY SEGFAULT IS A PROBLEM. Unless you get rid of this problem, you are on a wild goose chase.


Arch Linux is more than just GNU/Linux -- it's an adventure

Offline

#19 2012-05-27 18:45:45

jere2001
Member
From: Brasil
Registered: 2011-04-24
Posts: 6

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

I can not automount flashdrive.

I formatted my PC yesterday (Saturday) I was in front of him until 3 am and could not automatic mounting of USB drives and even the cd / dvd. I can only ride them through the terminal or gnome-disk-utility ...

As I installed Arch today, I'm using the latest versions of all packages needed.

Here my  rc.conf:

#
# /etc/rc.conf - Main Configuration for Arch Linux
#
# See 'man 5 rc.conf' for more details
#

# LOCALIZATION
# ------------
HARDWARECLOCK="UTC"
TIMEZONE="America/Sao_Paulo"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
LOCALE=pt_BR.UTF-8
DAEMON_LOCALE="yes"
USECOLOR="yes"

# HARDWARE
# --------
MODULES=()
USEDMRAID="no"
USEBTRFS="no"
USELVM="no"

# NETWORKING
# ----------
HOSTNAME=JereDesktop

interface=
address=
netmask=
broadcast=
gateway=

NETWORK_PERSIST="no"

# DAEMONS
# -------
#
DAEMONS=(syslog-ng dbus networkmanager crond @ntpd @alsa @mono)

Here 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        simone

# 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          no


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

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

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

Here my  inittab:

#
# /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 -s 38400 tty1 linux
c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux
c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux
c4:2345:respawn:/sbin/agetty -8 -s 38400 tty4 linux
c5:2345:respawn:/sbin/agetty -8 -s 38400 tty5 linux
c6:2345:respawn:/sbin/agetty -8 -s 38400 tty6 linux

# Serial Virtual Console for KVM and others VMs
#s0:2345:respawn:/sbin/agetty -8 -s 9600 ttyS0 linux

# Hypervisor Virtual Console for Xen and KVM
#h0:2345:respawn:/sbin/agetty -8 -s 38400 hvc0 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:/usr/bin/kdm -nodaemon
x:5:respawn:/usr/bin/slim >/dev/null 2>&1

# End of file

Here my  .xinitrc:

!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

# exec gnome-session
# exec startkde
# exec startxfce4 --with-ck-launch
#exec ck-launch-session dbus-launch startxfce4
#exec dbus-launch --exit-with-session startxfce4
exec startxfce4
# ...or the Window Manager of your choice 

As you guys can see I tried using dbus-launch and ck-launch-session, but as stated in the Wiki the new version of Slim. Xinitrc should not use ck-launch-session because the buttons off and tals would be disabled .

I thank any help. Sorry for my English ... by Google
Unfortunately I do not speak English.

Last edited by jere2001 (2012-05-28 13:24:42)

Offline

#20 2012-05-28 13:23:25

jere2001
Member
From: Brasil
Registered: 2011-04-24
Posts: 6

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

Does anyone have an idea?

It would be better to open a thread just for this?

Offline

#21 2012-05-28 14:42:12

MadTux
Member
Registered: 2009-09-20
Posts: 553

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

Do you have thunar-volman, gamin, gvfs and gvfs-afc installed?

Offline

#22 2012-06-11 21:02:27

Wilco
Member
Registered: 2008-11-09
Posts: 431

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

The only way to get mounting to work in filemanagers like thunar these days is by following these steps:
1. Install gvfs, polkit-gnome, mingetty
2. Make sure you are a member of the storage group

For autologin:
3. If you want autologin: automatic login through /etc/rc.local does not work anymore. You need autologin through inittab, like this (replace wilco with your username):

c1:2345:respawn:/sbin/mingetty --autologin wilco tty1 linux

4. Add the following to .bash_profile:

if [[ ! -f /tmp/.X0-lock ]]; then
  exec startx > .xsession-errors 2>&1
fi

5. Start your window manager like this from .xinitrc(replace icewm with your choice)

exec ck-launch-session dbus-launch icewm

6. ck-list-sessions will report two sessions, one should be both local and active

Offline

#23 2012-09-26 04:17:03

thestinger
Trusted User (TU)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

This isn't going to work for you anymore once the latest polkit moves from [testing], which drops consolekit support.

Consolekit is no longer maintained, you absolutely do not need it for gvfs/thunar/nautilus to be able to mount drives, or to use reboot/poweroff or systemctl suspend as a regular user.

You simply need to start X on the same tty as you logged in at (a display manager will do it for you) and a regular pam-based login is enough - logind registers the session.

Instead of startx, you can use startx -- vt$(fgconsole) which will start it on the same tty.

Last edited by thestinger (2012-09-26 04:23:23)

Offline

#24 2012-09-26 04:38:19

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: XFCE - Can't Shutdown or Reboot by the Log Out menu

Offline

Board footer

Powered by FluxBB