Showing posts with label lxdm. Show all posts
Showing posts with label lxdm. Show all posts

Thursday, August 2, 2018

When you're login is borked

Using lxdm as login manager for entering an openbox desktop environment, I was rather surprised I suddenly experienced a halt halfway starting up.
This was years ago something like that happened.
First I checked if the hard drive by entering another installation on that particular hard drive; that was OK so HD was not damaged.

Another boot into Archbang led to the same failure to get to see lxdm doing, what it is suppose to do.

Using ctl+alt+f2 I was able to start another terminal session, tty2.
Loging  in as user and giving password  I was able to start openbox by using:
startx

I couldn't discover what was wrong with lxdm and decided to check .xinitrc in /user/home/
Was OK with rule
exec openbox-session
Now checking ~/.bash_profile 
making sure following rule was active:
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx 

As alternative to lxdm I decided to choose to autologin using systemd

Commands:

cp /usr/lib/systemd/system/getty@.service /etc/systemd/system/autologin@.service

Symbolic linking:
ln -s /etc/systemd/system/autologin@.service /etc/systemd/system/getty.target.wants/getty@tty1.service

If the link is already active you can edit getty@tty1.service in /etc/systemd/system/getty.target.wants
by changing
ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear %I $TERM
to in my case
ExecStart=-/sbin/agetty -a paul %I 38400

Reload daemon:
systemctl daemon-reload

And restart service:
systemctl start getty@tty1.service

Friday, February 10, 2012

replacing slim by lxdm as login manager

This is copied from a post by shin
It is a complicated method and only use it if the following doesn't work for you:
#pacman -S lxdm
then

sudo systemctl disable slim.service,

then

sudo systemctl enable lxdm.service,

and reboot.

Complicated approach

What I did to replace slim with lxdm:
pacman -S lxdm

replaced the /etc/inittab line for slim with lxdm
x:5:respawn:/usr/sbin/lxdm >/dev/null 2>&1

apparently lxdm doesn't invoke ~/.xinitrc, I guess xdm,gdm and kdm do, as stated in ~/.xsession

so added this line to /etc/lxdm/Xsession:
[ -f ~/.xinitrc ] && . ~/.xinitrc

in /usr/share/xsessions/openbox.desktop replaced the Exec line with:
Exec="ck-launch-session dbus-launch /usr/bin/openbox-session"

commented out the exec line in ~/.xinitrc
#exec ck-launch-session dbus-launch /usr/bin/openbox-session

on first login with lxdm select the openbox session from the drop down menu,
to make openbox default in lxdm change default session in /etc/lxdm/lxdm.conf
session="ck-launch-session dbus-launch /usr/bin/openbox-session" (this works but I'm not sure if its better to launch openbox like that or by selecting openbox in lxdm drop down menu that actually invokes /usr/share/xsessions/openbox.desktop)

With this setup everything works for me, mounts and everything I added to ~/.xinitrc.

To switch between the two is a matter of replacing the /etc/inittab line and uncommenting the exec line in ~/.xinitrc.

To try it out:

sudo systemctl disable slim.service,

sudo systemctl enable lxdm.service,

and reboot.

Blog Archive