You are not logged in.

#1 2012-04-17 10:26:51

gav989
Member
From: England
Registered: 2011-10-04
Posts: 54

[solved] Archiso + SLiM + openbox: failed to execute login command

Hi,

I've been playing with archiso lately, attempting to build a livecd to use in my classroom (the laptops we have take approx 10 min to load windows...).

I've managed to get x to load at boot and slim loads but won't start my openbox session, the error is

"Failed to execute login command"

My (slim.conf) login command looks like this

login_cmd           exec /bin/bash -login ~/.xinitrc %session

and my .xinitrc looks like this:

setxkbmap gb &
exec ck-launch-session dbus-launch openbox-session

I have tried putting the ck-launch-session part in the slim login_cmd line as suggested in the wiki but the same thing happened. I don't think it's a password issue because when i enter the incorrect username or password slim just ignores it and shows the login screen again without an error message.

I also tried with enlightenment (e17) and the same thing happened, so I don't think it's an openbox issue.

But I'm a bit of a newbie so I may be wrong.

rc.conf

#
# /etc/rc.conf - Main Configuration for Arch Linux

. /etc/archiso/functions

LOCALE_DEFAULT="en_GB.UTF-8"
DAEMON_LOCALE_DEFAULT="no"
CLOCK_DEFAULT="UTC"
TIMEZONE_DEFAULT="Europe/London"
KEYMAP_DEFAULT="uk"
CONSOLEFONT_DEFAULT="Lat2-Terminus16"
CONSOLEMAP_DEFAULT=
USECOLOR_DEFAULT="yes"

LOCALE="$(kernel_cmdline locale ${LOCALE_DEFAULT})"
DAEMON_LOCALE="$(kernel_cmdline daemon_locale ${DAEMON_LOCALE_DEFAULT})"
HARDWARECLOCK="$(kernel_cmdline clock ${CLOCK_DEFAULT})"
TIMEZONE="$(kernel_cmdline timezone ${TIMEZONE_DEFAULT})"
KEYMAP="$(kernel_cmdline keymap ${KEYMAP_DEFAULT})"
CONSOLEFONT="$(kernel_cmdline consolefont ${CONSOLEFONT_DEFAULT})"
CONSOLEMAP="$(kernel_cmdline consolemap ${CONSOLEMAP_DEFAULT})"
USECOLOR="$(kernel_cmdline usecolor ${USECOLOR_DEFAULT})"

MODULES=()

UDEV_TIMEOUT=30
USEDMRAID="no"
USEBTRFS="no"
USELVM="no"

HOSTNAME="livemaths"

DAEMONS=(hwclock syslog-ng crond dbus wicd slim)

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            openbox
 
# 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        student 

# 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 the packages I'm installing (in addition to the default packages)

xorg-server
xorg-xinit
xf86-video-nv
xf86-video-ati
xf86-video-intel
xf86-video-cirrus
xf86-video-fbdev
xf86-video-openchrome
xf86-video-vesa
hardinfo
jre7-openjdk
chromium
flashplugin
thunar
gvfs
gvfs-afc
thunar-volman
gnome-icon-theme
sakura
evince
eog
consolekit
wbar
wicd
wicd-gtk
ttf-liberation
dbus
slim
pyxdg
xf86-input-synaptics
openbox
obconf
obmenu
lxappearance

I also have another question about archiso that I was planning to make a thread about at some point in the future when I've got all this working; is it possible to include a package available in the AUR in my livecd? I don't think including it in the packages.i686 file would work. The package I'm interested in is GeoGebra, for now I'm including the portable version in the home directory but would prefer an installed version.

Thanks for reading

Last edited by gav989 (2012-05-13 11:07:33)


Intel i5-6500 / nvidia GTX 960 / Gigabyte GA-Z170X-Gaming 3 EU Motherboard / 8gb RAM / i3 wm

Offline

#2 2012-04-19 07:12:31

gav989
Member
From: England
Registered: 2011-10-04
Posts: 54

Re: [solved] Archiso + SLiM + openbox: failed to execute login command

bumping because i'm still stuck and it's better than reposting the problem


Intel i5-6500 / nvidia GTX 960 / Gigabyte GA-Z170X-Gaming 3 EU Motherboard / 8gb RAM / i3 wm

Offline

#3 2012-04-19 15:06:42

chamber
Member
From: ~/
Registered: 2012-03-29
Posts: 279

Re: [solved] Archiso + SLiM + openbox: failed to execute login command

Use Ctrl+Alt+F1 to put you into a shell then take a look at /var/log/slim.log

Also check that openbox is installed correctly

pacman -Q openbox

Also, did you install openbox as root or as a regular user?

Last edited by chamber (2012-04-20 09:26:19)


meh

Offline

#4 2012-04-20 10:06:32

gav989
Member
From: England
Registered: 2011-10-04
Posts: 54

Re: [solved] Archiso + SLiM + openbox: failed to execute login command

Thanks for the reply, I'll try that when I get home from work.

I installed it by adding

openbox
obconf
obmenu
lxappearance

to the packages.i686 file when building the iso using archiso, which I assume means I have done it as root.

I've also tried using e17 instead to see if it was an openbox issue and the same error occurred, so I assumed it wasn't


Intel i5-6500 / nvidia GTX 960 / Gigabyte GA-Z170X-Gaming 3 EU Motherboard / 8gb RAM / i3 wm

Offline

#5 2012-04-20 11:10:42

chamber
Member
From: ~/
Registered: 2012-03-29
Posts: 279

Re: [solved] Archiso + SLiM + openbox: failed to execute login command

did you install openbox as root or as a normal user though?


meh

Offline

#6 2012-04-20 12:43:23

gav989
Member
From: England
Registered: 2011-10-04
Posts: 54

Re: [solved] Archiso + SLiM + openbox: failed to execute login command

I think it's safe to assume I installed it as root because I ran the

/path/to/build.sh build single netinstall

command as root on my host system when I built the iso

What difference is made by whether I installed it as root or user?


Intel i5-6500 / nvidia GTX 960 / Gigabyte GA-Z170X-Gaming 3 EU Motherboard / 8gb RAM / i3 wm

Offline

#7 2012-04-20 12:52:34

chamber
Member
From: ~/
Registered: 2012-03-29
Posts: 279

Re: [solved] Archiso + SLiM + openbox: failed to execute login command

Was just wondering what the permission, I actually just set up arch in a VM earlier and had the same issue.  Am reinstalling now.


meh

Offline

#8 2012-04-20 12:56:17

magicalChicken
Member
From: in the sky
Registered: 2012-03-03
Posts: 73
Website

Re: [solved] Archiso + SLiM + openbox: failed to execute login command

 what difference 

If installed as user than the program is in the user's /home dir, so the program is only avaliable to them and may not function as all. It is difficult to install a program as non root, so I doubt that this happened. Try booting to runlevel 3, then running the .xinitrc file from the command line to see the more specific error. I think that this will help diagnose the problem.

Offline

#9 2012-04-22 15:34:09

gav989
Member
From: England
Registered: 2011-10-04
Posts: 54

Re: [solved] Archiso + SLiM + openbox: failed to execute login command

ok i tried the pacman -Q openbox and it said it was installed

i also looked at the slim.log and there were no error messages

anything else i should look at?


edit: sorry just seen your suggestion magicalchicken, will try that one tomorrow

Last edited by gav989 (2012-04-22 22:29:02)


Intel i5-6500 / nvidia GTX 960 / Gigabyte GA-Z170X-Gaming 3 EU Motherboard / 8gb RAM / i3 wm

Offline

#10 2012-05-04 00:51:19

Divinorum72
Member
Registered: 2012-05-04
Posts: 4

Re: [solved] Archiso + SLiM + openbox: failed to execute login command

I am experiencing the same problem and been cross referencing with other posts.

My slim.conf and rc.conf are the same as yours gav in the relevant lines, pacman -Q openbox yields a proper install, and the perms and ownership for ~/.xinitrc are -rw-r--r-- 1 root root 318 May 3 20:27 /root/.xinitrc

After going back to shell from slim i run startx and I get this error:

/root/.xinitrc: line 14: exec: ck-launch-session: not found

..but my .xinitrc reads: exec ck-launch-session dbus-launch openbox-session. Even logging in as root in slim yields the same "failed to execute login command" output.

Offline

#11 2012-05-04 02:22:49

ratcheer
Member
Registered: 2011-10-09
Posts: 924

Re: [solved] Archiso + SLiM + openbox: failed to execute login command

Divinorum72 wrote:

I am experiencing the same problem and been cross referencing with other posts.

My slim.conf and rc.conf are the same as yours gav in the relevant lines, pacman -Q openbox yields a proper install, and the perms and ownership for ~/.xinitrc are -rw-r--r-- 1 root root 318 May 3 20:27 /root/.xinitrc

After going back to shell from slim i run startx and I get this error:

/root/.xinitrc: line 14: exec: ck-launch-session: not found

..but my .xinitrc reads: exec ck-launch-session dbus-launch openbox-session. Even logging in as root in slim yields the same "failed to execute login command" output.

Have you installed consolekit? That is where ck-launch-session comes from.

Tim

Offline

#12 2012-05-06 19:18:31

biltong
Member
From: South Africa
Registered: 2011-09-01
Posts: 118

Re: [solved] Archiso + SLiM + openbox: failed to execute login command

You can install AUR packages, but you have to make your own local repository.
Basically it works like this:

mkdir /home/repo
cp <AUR packages> /home/repo
cd /home/repo
repo-add <repo-name>.db.tar.gz *.pkg.tar.xz

That will create the local repository, but you have to add this to /etc/pacman.conf to use it:

[<repo-name>]
Server = file:///home/repo

<repo-name> can be anything you like, so long as they're the same in the repo-add command and the name in /etc/pacman.conf.
Then you can add your AUR packages into packages.i686/x86_64 and they will work as any other package, but you must make sure that you also include any AUR dependencies in the repo as well. You don't need to add the dependencies to the packages file though, it handles that automatically.

Please do me a favour, though: post the output of

ls -l /

from within your livecd. I myself am having a consolekit issue because all my permissions are wrong, and that's causing consolekit and dbus to break. Also, are you using the chroot method?

Offline

#13 2012-05-06 23:14:11

frette
Member
Registered: 2012-05-04
Posts: 35

Re: [solved] Archiso + SLiM + openbox: failed to execute login command

---

Last edited by frette (2025-04-08 16:02:12)

Offline

#14 2012-05-07 02:18:52

baronmax
Member
From: Missouri, USA
Registered: 2012-04-22
Posts: 37

Re: [solved] Archiso + SLiM + openbox: failed to execute login command

I had this same problem once with an install using the Archbang ISO and it turned out that somehow my UUID had changed between the time I wrote the /etc/fstab and the first boot (don't ask me how, because I have no clue).  Anyway, the issue was that my /home partition wasn't being mounted, so I got that exact error (failed to execute login command).  The way I finally figured it out was logging in as root, which worked flawlessly, since /root is part of my / partition, whereas /home is on a different partition.  I did a blkid and compared that against /etc/fstab and my /home partition was different than what was listed, therefore slim wasn't seeing any .xinitrc to load.  I don't think that is your specific problem, but I figured I'd mention it just in case.


Intel 980x| 24GB RAM| Arch + Cinnamon/i3
Intel 2600K| 8GB RAM| Arch + Awesome/XFCE
Intel Q740| 6GB RAM| Arch + XFCE/Cinnamon
AMD Phenom x6 1090T| Ubuntu/Winblowz (gaming)

Offline

#15 2012-05-07 02:21:48

baronmax
Member
From: Missouri, USA
Registered: 2012-04-22
Posts: 37

Re: [solved] Archiso + SLiM + openbox: failed to execute login command

frette wrote:

Why would one need a local repo for AUR Packages? You'd still have to get and compile the packages. Yaourt would do all that hassle for you, including retrieving dependencies available by pacman.
An alternative would also be pacman -U
Anything beats a local repo imho, I don't see that saving time or effort.

And back to topic:

/root/.xinitrc: line 14: exec: ck-launch-session: not found

indeed means consolekit is missing.

It's actually not needed btw, it just enables you to call reboot, suspend, halt etc. as normal user.
Just remove it from the .xinitrc exec line if you don't need it, or actually install it before using it wink.

The reason I use a local repo is because I have three computers running arch (soon to be 4), and I generally use the same basic packages on all of them.  It's easier for me to pull down the packages ONCE than do it three times (it also saves bandwidth for repo maintainers who use their own bandwidth or something like a dropbox account to host their packages).  Mind you, it's not that big of a deal these days, with faster broadband, but I guess old habits die hard.  I did the same thing with debian for a long time.


Intel 980x| 24GB RAM| Arch + Cinnamon/i3
Intel 2600K| 8GB RAM| Arch + Awesome/XFCE
Intel Q740| 6GB RAM| Arch + XFCE/Cinnamon
AMD Phenom x6 1090T| Ubuntu/Winblowz (gaming)

Offline

#16 2012-05-07 12:01:21

frette
Member
Registered: 2012-05-04
Posts: 35

Re: [solved] Archiso + SLiM + openbox: failed to execute login command

---

Last edited by frette (2025-04-08 16:02:23)

Offline

#17 2012-05-10 07:12:26

gav989
Member
From: England
Registered: 2011-10-04
Posts: 54

Re: [solved] Archiso + SLiM + openbox: failed to execute login command

woah the topic is active again

What I've done now is reinstalled arch on my host system and set it up the way I want the livecd to be (same users, openbox etc.) so I can just copy the config files across. Not quite finished tinkering with configs yet. When I finally get this thing working I plan to write a howto and include all my config files, mostly for my own reference but also in case anyone else wants to see them.

bilton: thanks, i'll give that a go, sounds like it should work. I'll post the ls -l / output when I build it next (i binned my failing cds in a sulk). should be this weekend. I am not using the chroot method, I tried it before and could never get it working, I've had more success with the non-chroot method

frette: that's what I would normally do on an arch install (except I prefer packer to yaourt) but I can't see a way to do it with archiso when making a livecd because I want the aur packages installed when I run the build script

baronmax: thanks for that, but I don't think it's the same issue I'm having because I also can't use slim to login as root, but I can login to both root and user accounts when I switch to text console (I did this to make sure I had added the user successfully)


Intel i5-6500 / nvidia GTX 960 / Gigabyte GA-Z170X-Gaming 3 EU Motherboard / 8gb RAM / i3 wm

Offline

#18 2012-05-10 16:59:37

biltong
Member
From: South Africa
Registered: 2011-09-01
Posts: 118

Re: [solved] Archiso + SLiM + openbox: failed to execute login command

frette wrote:

Why would one need a local repo for AUR Packages? You'd still have to get and compile the packages. Yaourt would do all that hassle for you, including retrieving dependencies available by pacman.
An alternative would also be pacman -U
Anything beats a local repo imho, I don't see that saving time or effort.

And back to topic:

/root/.xinitrc: line 14: exec: ck-launch-session: not found

indeed means consolekit is missing.

It's actually not needed btw, it just enables you to call reboot, suspend, halt etc. as normal user.
Just remove it from the .xinitrc exec line if you don't need it, or actually install it before using it wink.

You don't really need a repo for AUR packages on your host machine but to have AUR packages on your livecd when you build it with archiso there is no other way to do it, otherwise when it gets to the installing packages bit in the process pacman can't find the AUR targets.

I was answering this bit:

I also have another question about archiso that I was planning to make a thread about at some point in the future when I've got all this working; is it possible to include a package available in the AUR in my livecd? I don't think including it in the packages.i686 file would work. The package I'm interested in is GeoGebra, for now I'm including the portable version in the home directory but would prefer an installed version.

gav don't worry about running ls -l anymore, I figured out my problem. Protip: don't build archiso on an NTFS partition unless you want everything to break, ESPECIALLY if you use X.

Offline

#19 2012-05-12 19:51:44

gav989
Member
From: England
Registered: 2011-10-04
Posts: 54

Re: [solved] Archiso + SLiM + openbox: failed to execute login command

ok, so after a lot of fiddling about with permissions and stuff and finding out the hard way that slim loads consolekit without being told to, it works. posting from within it in qemu now

no idea what i did differently this time, must have been a silly mistake in the first place

that aur local repo thing worked really well, geogebra is installed nicely and the whole image came out at 458mb, which leaves me a lot of room to play with. i'm by no means finished (i ruined the openbox menu etc) but i think i know how to fix that

marking as solved, still planning to put together that howto, not tonight though

biltong: i know you fixed it but just in case

[student@livemaths ~]$ ls -l /
total 72
drwxr-xr-x   2 root users  4096 May 11 19:58 arch
drwxr-xr-x   2 root root   4096 May 12 12:56 bin
drwxr-xr-x   5 root root   4096 May 12 14:03 boot
drwxr-xr-x  13 root root   5200 May 12 20:43 dev
drwxr-xr-x  70 root users  4096 May 12 20:43 etc
drwxr-xr-x   4 root root   4096 May 12 20:43 home
drwxr-xr-x   4 root root   4096 May 12 20:43 lib
drwx------   2 root root  16384 May 12 14:03 lost+found
drwxr-xr-x   2 root root   4096 May  2 12:49 media
drwxr-xr-x   2 root root   4096 May  2 12:49 mnt
drwxr-xr-x   2 root root   4096 May  2 12:49 opt
dr-xr-xr-x 104 root root      0 May 12 20:43 proc
drwxr-x---   2 root root   4096 May  2 12:49 root
drwxr-xr-x  14 root root    440 May 12 20:43 run
drwxr-xr-x   2 root root   4096 May 12 12:56 sbin
drwxr-xr-x   4 root root   4096 May  2 12:49 srv
drwxr-xr-x  12 root root      0 May 12 20:43 sys
drwxrwxrwt   9 root root    220 May 12 20:45 tmp
drwxr-xr-x   9 root users  4096 May 12 20:43 usr
drwxr-xr-x  13 root root   4096 May 12 20:43 var

thanks for the help everyone


Intel i5-6500 / nvidia GTX 960 / Gigabyte GA-Z170X-Gaming 3 EU Motherboard / 8gb RAM / i3 wm

Offline

Board footer

Powered by FluxBB