Solved Slim - failed to execute login command

k.jacker

Aspiring Daemon

Reaction score: 442
Messages: 739

I have read some other threads here on the forums and it looks like it is easy to solve,
but sadly nothing worked for me.

I have tried a lot of different configurations and ended up with the following as of now:

/boot/loader.conf
Code:
kernel.vty="vt"
/etc/rc.conf
Code:
hald_enable="YES"
dbus_enable="YES"
slim_enable="YES"
~/.xinitrc
Code:
exec mate-session
the Login command in /usr/local/etc/slim.conf is
Code:
login_cmd       exec /bin/sh - ~/.xinitrc %session
I can type startx and the mate session starts fine, but booting into
slim gives me "failed to execute Login command"
(there also Comes up a Little window with a dbus error which says:
"Could not connect to session bus" and "could not acquire name on session bus")

I usually use /bin/tcsh as my shell and had that changed earlier in the /usr/local/etc/slim.conf but to make the tcsh a login shell the syntax is different from sh and the tcsh(1) manpage says that the -l Option must be the only Option.
Since this is not the case because it is followed by ~/.xinitrc %session i dropped that i also tried to Change my Shell to /bin/sh and left the login_cmd as ist was. That made no difference.

I also tried to start slim from /etc/ttys like this
Code:
ttyv8 "/usr/local/bin/slim" xterm on secure
That makes the Little Windows with the dbus error dissapear but the
"failed to execute Login command" remains the same.

I'm on FreeBSD 10.2
 
Last edited by a moderator:

ILUXA

Aspiring Daemon

Reaction score: 479
Messages: 727

~/.xinitrc
Code:
exec mate-session
Delete this entry from ~/.xinitrc,
x11/slim read session exec from
/usr/local/etc/slim.conf
Code:
# Directory of session files.
# They should be xdg-style .desktop files.
# The "Name" entry in the session file would be used as session name.
# The "Exec" entry would replace %session in login_cmd.
sessiondir        /usr/local/share/xsessions
So your ~/.xinitrc can be even empty and you'll be able to start your mate-session.
Also you can easily switch between sessions which are located at /usr/local/share/xsessions with F1 hotkey.
Check this dir and you'll see /usr/local/share/xsessions/mate.desktop.
Снимок экрана от 2016-05-28 09-08-55.png

So you don't need to edit anything, x11/slim is ready to use "out of the box".

But if you want to start your session with ~/.xinitrc,
then comment this line in /usr/local/etc/slim.conf:
Code:
#sessiondir        /usr/local/share/xsessions
 
OP
k.jacker

k.jacker

Aspiring Daemon

Reaction score: 442
Messages: 739

Thanks so much for clearing things up, I have now understood how the config-files work together and got it running!
Just removed
Code:
exec mate-session
from ~/.xinitrc
 
Top