Ctrl K

i3 Login with ly on Arch

Configure ly as a terminal-style display manager on Arch and make it start the i3 session by default.

Configure ly as a terminal-style login manager for an i3 setup on Arch. This workflow covers installing ly, switching from a graphical display manager, enabling the correct ly systemd service, selecting the i3 session, fixing remembered Plasma sessions through dmrc and AccountsService, and switching back if needed.

Install ly

Install ly from the Arch repositories. ly provides a terminal-style display manager that can launch X11 sessions such as i3.

sudo pacman -S ly

Confirm available i3 sessions

ly reads X11 sessions from /usr/share/xsessions. Confirm that the i3 session file exists before switching display managers.

ls /usr/share/xsessions

Expected available sessions on this setup include i3, i3-with-shmlog, and plasmax11. Use i3 for normal login.

i3.desktop
i3-with-shmlog.desktop
plasmax11.desktop

Switch from LightDM to ly

Disable the current graphical display manager and enable ly on tty2. The Arch ly package uses the tty-specific ly@tty2.service style rather than ly.service.

sudo systemctl disable lightdm
sudo systemctl enable ly@tty2.service
sudo systemctl disable getty@tty2.service
sudo reboot
  • After reboot, ly should appear as a terminal-style login screen.
  • Select i3 from the session field before logging in.
  • If ly opens Plasma, change the selected session to i3 and log in again.

Check ly session configuration

Confirm ly is configured to use the standard X command and X session directory.

grep -n "xsessions\|x_cmd\|session" /etc/ly/config.ini

The important values are:

x_cmd = /usr/bin/X
xsessions = /usr/share/xsessions

Use the filename without .desktop when referring to a session name. For i3.desktop, the session name is i3.

Set dmrc session to i3

Set the user's dmrc session to i3. This helps display managers remember the intended X11 session.

nano ~/.dmrc
[Desktop]
Session=i3
cat ~/.dmrc

Fix AccountsService remembered session

If the system keeps opening Plasma even after selecting i3, check the per-user AccountsService session. In this setup, AccountsService remembered Plasma and had to be changed to i3.

sudo cat /var/lib/AccountsService/users/$USER

If the file contains XSession=plasma, edit it and change the remembered X session to i3. Replace $USER with the target username on another machine.

sudo nano /var/lib/AccountsService/users/$USER
[User]
Session=
XSession=i3
Icon=/home/$USER/.face
SystemAccount=false
  • The important value is XSession=i3.
  • If XSession=plasma is present, the login manager can keep opening Plasma.
  • After changing the file, reboot and choose i3 in ly once.

Verify active display manager and session

Use these commands after logging in to confirm that ly is active and the i3 session files are available.

systemctl status display-manager --no-pager
systemctl status ly@tty2.service --no-pager
ls /usr/share/xsessions
cat ~/.dmrc
sudo cat /var/lib/AccountsService/users/$USER

Switch back to LightDM if needed

If ly does not work as expected or a graphical login screen is preferred again, disable ly and restore LightDM.

sudo systemctl disable ly@tty2.service
sudo systemctl enable getty@tty2.service
sudo systemctl enable lightdm
sudo reboot

File locations

  • ly config: /etc/ly/config.ini
  • ly systemd service: ly@tty2.service
  • LightDM service: lightdm.service
  • User dmrc session file: ~/.dmrc
  • AccountsService user session file: /var/lib/AccountsService/users/$USER
  • X11 session files: /usr/share/xsessions