i3 Login with ly on Arch
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
Section titled “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 lyConfirm available i3 sessions
Section titled “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/xsessionsExpected available sessions on this setup include i3, i3-with-shmlog, and plasmax11. Use i3 for normal login.
i3.desktopi3-with-shmlog.desktopplasmax11.desktopSwitch from LightDM to ly
Section titled “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 lightdmsudo systemctl enable ly@tty2.servicesudo systemctl disable getty@tty2.servicesudo 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
Section titled “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.iniThe important values are:
x_cmd = /usr/bin/Xxsessions = /usr/share/xsessionsUse the filename without .desktop when referring to a session name. For i3.desktop, the session name is i3.
Set dmrc session to i3
Section titled “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=i3cat ~/.dmrcFix AccountsService remembered session
Section titled “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/$USERIf 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=i3Icon=/home/$USER/.faceSystemAccount=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
Section titled “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-pagersystemctl status ly@tty2.service --no-pagerls /usr/share/xsessionscat ~/.dmrcsudo cat /var/lib/AccountsService/users/$USERSwitch back to LightDM if needed
Section titled “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.servicesudo systemctl enable getty@tty2.servicesudo systemctl enable lightdmsudo rebootFile locations
Section titled “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