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.
]]>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
]]>It would be better to open a thread just for this?
]]>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.
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.
]]>@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:
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?
]]>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
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?
]]>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.
]]>exec ck-launch-session dbus-launch startxfce4
That works for me.
]]>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 = ''
I did what EasySly said but as I expected, it didn't solve the problem. Apparently it's not about SLiM. Any other suggestions?
]]>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
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.
]]>