You are not logged in.

#1 2011-11-03 20:22:13

ctxfi-user
Member
Registered: 2010-10-31
Posts: 56

[SOLVED] Do it right: Start Xfce on boot without DM

Although the commit message was "Remove .pkla files; shutdown/suspend/etc should continue to work for people with correct ConsoleKit sessions." the update breaks shutdown/suspend/etc for me in Xfce. A downgrade to xfce4-session 4.8.2-1 solves the problem.

So what isn't correct with my ConsoleKit sessions?

[tux@linux ~]$ cat .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
# ...or the Window Manager of your choice

exec ck-launch-session startxfce4

[tux@linux ~]$ groups
disk wheel log video audio optical scanner camera power users vboxusers

pacman -Qk shows zero missing files...

Thx!

Last edited by ctxfi-user (2011-11-04 20:42:53)

Offline

#2 2011-11-03 20:33:32

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,937
Website

Re: [SOLVED] Do it right: Start Xfce on boot without DM

paste rc.conf and ck-list-sessions output


Give what you have. To someone, it may be better than you dare to think.

Offline

#3 2011-11-03 20:43:15

ctxfi-user
Member
Registered: 2010-10-31
Posts: 56

Re: [SOLVED] Do it right: Start Xfce on boot without DM

Hello wonder,

thanks for your reply!

[tux@linux ~]$ cat /etc/rc.conf 
#
# /etc/rc.conf - Main Configuration for Arch Linux
#

# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
#   LANG in /etc/locale.conf takes precedence
# DAEMON_LOCALE: If set to 'yes', use $LOCALE as the locale during daemon
# startup and during the boot process. If set to 'no', the C locale is used.
# HARDWARECLOCK: set to "", "UTC" or "localtime", any other value will result
#   in the hardware clock being left untouched (useful for virtualization)
#   Note: Using "localtime" is discouraged, using "" makes hwclock fall back
#   to the value in /var/lib/hwclock/adjfile
# TIMEZONE: timezones are found in /usr/share/zoneinfo
#   Note: if unset, the value in /etc/localtime is used unchanged
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="de_DE.UTF-8"
DAEMON_LOCALE="no"
HARDWARECLOCK="UTC"
TIMEZONE="Europe/Berlin"
KEYMAP="de-latin1"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MODULES: Modules to load at boot-up. Blacklisting is no longer supported.
#   Replace every !module by an entry as on the following line in a file in
#   /etc/modprobe.d:
#     blacklist module
#   See "man modprobe.conf" for details.
#
MODULES=(acpi-cpufreq fuse)

# Udev settle timeout (default to 30)
UDEV_TIMEOUT=30

# Scan for FakeRAID (dmraid) Volumes at startup
USEDMRAID="no"

# Scan for BTRFS volumes at startup
USEBTRFS="no"

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="linux"

# Use 'ip addr' or 'ls /sys/class/net/' to see all available interfaces.
#
# Wired network setup
#   - interface: name of device (required)
#   - address: IP address (leave blank for DHCP)
#   - netmask: subnet mask (ignored for DHCP) (optional, defaults to 255.255.255.0)
#   - broadcast: broadcast address (ignored for DHCP) (optional)
#   - gateway: default route (ignored for DHCP)
# 
# Static IP example
# interface=eth0
# address=192.168.0.2
# netmask=255.255.255.0
# broadcast=192.168.0.255
# gateway=192.168.0.1
#
# DHCP example
# interface=eth0
# address=
# netmask=
# gateway=

interface=
address=
netmask=
broadcast=
gateway=

# Setting this to "yes" will skip network shutdown.
# This is required if your root device is on NFS.
NETWORK_PERSIST="no"

# Enable these netcfg profiles at boot-up. These are useful if you happen to
# need more advanced network features than the simple network service
# supports, such as multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up (dialog package required)
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This requires the netcfg package
#
#NETWORKS=(main)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
# If you are sure nothing else touches your hardware clock (such as ntpd or
# a dual-boot), you might want to enable 'hwclock'. Note that this will only
# make a difference if the hwclock program has been calibrated correctly.
#
# If you use a network filesystem you should enable 'netfs'.
#
DAEMONS=(syslog-ng !network crond cpufreq wireless-regdom dbus wicd alsa lircd vdr)

[tux@linux ~]$ ck-list-sessions
Session7:
	unix-user = '1000'
	realname = ''
	seat = 'Seat8'
	session-type = ''
	active = FALSE
	x11-display = ':0'
	x11-display-device = '/dev/tty4'
	display-device = ''
	remote-host-name = ''
	is-local = FALSE
	on-since = '2011-11-03T20:06:02.359374Z'
	login-session-id = '4294967295'

Offline

#4 2011-11-03 20:49:51

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,937
Website

Re: [SOLVED] Do it right: Start Xfce on boot without DM

do ls /etc/pam.d and paste the output

also try changing xinitrc with exec ck-launch-session xfce4-session or exec-launch-session dbus-launch startxfce4


Give what you have. To someone, it may be better than you dare to think.

Offline

#5 2011-11-03 22:47:50

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

Re: [SOLVED] Do it right: Start Xfce on boot without DM

Hmm... works here as expected.

You have a major problem with console-kit, probably always had. Please show "ps -e u | cat -"  after a reboot.

@wonder:
What are you looking for in pam.d? polkit-1?


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

Offline

#6 2011-11-03 22:54:14

ctxfi-user
Member
Registered: 2010-10-31
Posts: 56

Re: [SOLVED] Do it right: Start Xfce on boot without DM

I appreciate your efforts, wonder!

[tux@linux ~]$ ls -1 /etc/pam.d/
chage
chfn
chgpasswd
chpasswd
chsh
crond
cups
groupadd
groupdel
groupmems
groupmod
login
newusers
other
passwd
polkit-1
shadow
sshd
su
sudo
useradd
userdel
usermod

xfce4-session in .xinitrc changed nothing. ConsoleKit session and DBus session run correctly. The update of xfce4-session removes for me required settings in /etc/polkit-1/... Maybe a missing package or daemon which replace the function of the removed settings is the problem.

Last edited by ctxfi-user (2011-11-03 22:55:02)

Offline

#7 2011-11-03 23:13:53

ctxfi-user
Member
Registered: 2010-10-31
Posts: 56

Re: [SOLVED] Do it right: Start Xfce on boot without DM

I started X on boot with inittab without a DM. Just changed this to GDM: It is smart enough to do it right. So the update is (like I expected) no regression. For now I need a closer look on that...

Offline

#8 2011-11-03 23:28:39

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

Re: [SOLVED] Do it right: Start Xfce on boot without DM

ctxfi-user wrote:

I started X on boot with inittab without a DM. Just changed this to GDM: It is smart enough to do it right. So the update is (like I expected) no regression. For now I need a closer look on that...

Like here https://wiki.archlinux.org/index.php/St … .2Finittab? This is a BAD idea, since ck does not know who logs in, that's what the warning is all about...

You don't need GDM: simple startx from runlevel 3 would do the job.


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

Offline

#9 2011-11-04 12:57:25

OttoKrueja
Member
From: PM & CB · GER
Registered: 2011-11-04
Posts: 2

Re: [SOLVED] Do it right: Start Xfce on boot without DM

Hi, I've got the same problem – booting directly into X without an DM. Since update of xfce-session I can only logout. So I tried logout and then logged in again via tty, startx – et voilà – I am able to shut down, reboot, suspend and hibernate, but only until the next reboot.

This means, after a manual login via tty everthing works fine. Dunno, but maybe only changes in /etc/inittab are needed?

Offline

#10 2011-11-04 16:40:26

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: [SOLVED] Do it right: Start Xfce on boot without DM

I use SLiM with Xfce, but I don't think that is relevant here regarding shutdown, reboot, suspend, and hibernate from Xfce as regular user.

See if my following post is any help.
https://bbs.archlinux.org/viewtopic.php … 7#p1009987

Offline

#11 2011-11-04 20:39:59

ctxfi-user
Member
Registered: 2010-10-31
Posts: 56

Re: [SOLVED] Do it right: Start Xfce on boot without DM

Thanks to all!

@Leonid.I: Ahh. OK. I read that a while ago, but didn't understand the warning, because it works for me until now. A solution is mentioned in the same place. Thx for the hint!

@OttoKrueja: I wish only changes in /etc/inittab are needed, but it seems there is no such simple way for the issue.

@David Batson: Yeah. Such polkit-"workaround-rules" got removed with the mentioned update of xfce4-session.

Last edited by ctxfi-user (2011-11-04 20:41:20)

Offline

#12 2011-11-05 07:56:07

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 496

Re: [SOLVED] Do it right: Start Xfce on boot without DM

I'm hit by the same issue... Is there a way to login automatically without login prompt (like in the inittab method) but still being able to shutdown and reboot as user?


Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad X200 Tablet, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

#13 2011-11-05 08:56:34

ctxfi-user
Member
Registered: 2010-10-31
Posts: 56

Re: [SOLVED] Do it right: Start Xfce on boot without DM

Hello PhotonX,

sorry, when I didn't make it clear: What you are looking for is in the wiki: https://wiki.archlinux.org/index.php/St … sh_profile

Offline

#14 2011-11-05 09:19:29

Padfoot
Member
Registered: 2010-09-03
Posts: 381

Re: [SOLVED] Do it right: Start Xfce on boot without DM

Have you tried not using ck-launch or dbus in you xfce startup? I believe xfce4-session automatically handles this, so including them in your startup script can cause problems.

I too had issues with shutdown/reboot until I removed dbus etc from my startup scripts. Without them, everything is fine, and I have confirmed from checking processes that Xfce does indeed launch console kit and dbus.

Cheers.

Offline

#15 2011-11-05 11:51:04

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: [SOLVED] Do it right: Start Xfce on boot without DM

ctxfi-user wrote:

@David Batson: Yeah. Such polkit-"workaround-rules" got removed with the mentioned update of xfce4-session.

Yeah, turns out I wasn't fully up to date.  Updating today created the same problem for me.

What happened though is that pacman rename the polkit-1 files.  You just need to rename the files back to what they were by removing the added extension.

Offline

#16 2011-11-05 13:00:38

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 496

Re: [SOLVED] Do it right: Start Xfce on boot without DM

@ctxfi-user: That's what I tried (thanks for the hint!), but with the ~/.bash_profile way you have to login manually (after the login X is started automatically) while I'd like to achieve a behaviour like before the update: After the boot there is no login prompt, the login is done automatically (and X starts also automatically) via inittab, the permissions are managed via consolekit. But this way seems to be broken after the update...


Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad X200 Tablet, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

#17 2011-11-05 16:34:58

ctxfi-user
Member
Registered: 2010-10-31
Posts: 56

Re: [SOLVED] Do it right: Start Xfce on boot without DM

@David Batson: No, the only remaining "polkit-rule" here is /etc/polkit-1/localauthority/50-local.d/org.freedesktop.udisks.pkla (comes with thunar). So, pacman renames the files in your case as you edited them manually?!

@PhotonX: Please keep your eyes open. There is also a note on that wiki page to combine that with automatic login to virtual console.

Offline

#18 2011-11-05 16:43:01

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: [SOLVED] Do it right: Start Xfce on boot without DM

ctxfi-user wrote:

@David Batson: No, the only remaining "polkit-rule" here is /etc/polkit-1/localauthority/50-local.d/org.freedesktop.udisks.pkla (comes with thunar). So, pacman renames the files in your case as you edited them manually?!

I guess that makes sense since normally there would be the old and new files AFAIK.  In this case the old files were renamed and no new files were created.

It would seem that one could add them back if they new what to put in them and what to name them...

I am curious why those files are being done away with.  Is polkit-1 going the way of the dinosaur?

Offline

#19 2011-11-06 09:48:16

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 496

Re: [SOLVED] Do it right: Start Xfce on boot without DM

ctxfi-user: Thanks! I think, those colourful boxes had the opposite effect in my case, I read everything besides of them... sad


Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad X200 Tablet, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

#20 2011-11-06 17:30:13

cgarcia
Member
Registered: 2010-08-09
Posts: 37

Re: [SOLVED] Do it right: Start Xfce on boot without DM

In case someone is interested, this is the way I now do autologin in XFCE in polkit-compatible way. Edit /etc/inittab and modify an agetty line, for example:

c6:2345:once:/sbin/agetty -n -o "-f username AUTOSTARTX=1" -8 -s 38400 tty6 linux

(Replace 'username' by your user name).  Instead of 2345 I only use runlevel 4 for the autologin (I reserve 5 for xdm). Then, add a few lines at the top of your .bashrc to automatically launch the X the first time:

if [ "${AUTOSTARTX}" = "1" ]; then
    unset AUTOSTARTX
    exec startx
fi

And make sure that xfce DO IS started using ck-launch-session. For example, my $HOME/.xsession allows to run xfce both from xmd (ck-launch-session must not be used from lastest xdm) and from autologin:

if [ "$(ps -efl |grep '[x]'dm)" = "" ]; then
  exec ck-launch-session startxfce4
else
  exec startxfce4
fi

On this way, XFCE4 is automatically started. There are two sessions reported by ck-list-sessions, one of them is the XFCE session which is active and logged in. It seems that nowadays it is recomendable to be compatible with console kit. I previously started XFCE using "su" from inittab and adding the user to the power group to at least allow shutdowns (functionality now removed from xfce4-session since its last update).

Offline

Board footer

Powered by FluxBB