This is going to be some personal notes for memory. I tried to install the ly display manager and after about 3-hours of messing around, I have figured out how to get it to work under ubuntu seemingly properly under xorg with systemd.
This is not meant to be a real "Installation guide" of sorts, and is going to be a lot more informal than other posts.
Because ly does not have a native ubuntu package that you can just install, you need to build it from source. To do this, I specifically used build 0.14.0, 0.15.0 is a dev package at this time and does not want to compile ly. It should also be noted that any versions of zig under version 0.14.0 will be rejected from compiling as the ly project requires a minimum of 0.14.0 (so use that version exactly)
and since zig also does not have its own package on ubuntu, I downloaded version 0.14.0 in tar form for x86_64 and ran:
tar xf <the_tarfile>
from there what I did was I made a symlink from the location of the folder created from the tar archive to /usr/bin/zig
sudo ln -s ~/Downloads/zig-linux-x86_64-0.14.0/zig /usr/bin/zig
Since this is after everything is working and I don't exactly remember what I did, I would recommend making another link but putting it in /bin also
sudo ln -s ~/Downloads/zig-linux-x86_64-0.14.0/zig /bin/zig
from here you should be able to type "zig verision" in your home directory and it should show version 0.14.0.
I did not have to modify my path for this, but if you run echo $PATH and you don't see /usr/bin or /bin there (you should), then export and add them. Search up a guide to do this, should be very simple.
for ly specifically, I used the new version from codeberg, which seems to be version "1.2.0-dev.192+a8b8292" which is what ly shows in the top left when I run it.
for the clone command, I simply just did a normal git clone, if you end up getting a newer version in the future it may have different compile results.
git clone https://codeberg.org/AnErrupTion/ly
move into the ly directory and then run the zig build commands, I don't know specifically if you need both, but both is what worked for me.
zig build
because I'm using xorg, and I need the ly.service file.
sudo zig build installexe
If you haven't gotten any NoDIR or relative errors like that and it actually compiled completely, congrats, you're like 50% of the way there, and that was the easy part.
the compilation should have made a new configuration file, which is at "/etc/ly/config.ini", and a new service file for ly, "ly.service", which is located at "/lib/systemd/system/ly.service".
Additionally, there will be a PAM (Pluggable Authentication Modules) file for ly that should be made potentially after you try to start ly. it is at "/etc/pam.d/ly"
The contents of each one of these files are below as I have modified them for a working solution. (I don't know if it'll work for you, but let's hope)
# Ly supports 24-bit true color with styling, which means each color is a 32-bit value. # The format is 0xSSRRGGBB, where SS is the styling, RR is red, GG is green, and BB is blue. # Here are the possible styling options: #define TB_BOLD 0x01000000 #define TB_UNDERLINE 0x02000000 #define TB_REVERSE 0x04000000 #define TB_ITALIC 0x08000000 #define TB_BLINK 0x10000000 #define TB_HI_BLACK 0x20000000 #define TB_BRIGHT 0x40000000 #define TB_DIM 0x80000000 # Programmatically, you'd apply them using the bitwise OR operator (|), but because Ly's # configuration doesn't support using it, you have to manually compute the color value. # Note that, if you want to use the default color value of the terminal, you can use the # special value 0x00000000. This means that, if you want to use black, you *must* use # the styling option TB_HI_BLACK (the RGB values are ignored when using this option). # Allow empty password or not when authenticating allow_empty_password = false # The active animation # none -> Nothing # doom -> PSX DOOM fire # matrix -> CMatrix # colormix -> Color mixing shader animation = colormix # Stop the animation after some time # 0 -> Run forever # 1..2e12 -> Stop the animation after this many seconds animation_timeout_sec = 0 # The character used to mask the password # You can either type it directly as a UTF-8 character (like *), or use a UTF-32 # codepoint (for example 0x2022 for a bullet point) # If null, the password will be hidden # Note: you can use a # by escaping it like so: \# asterisk = * # The number of failed authentications before a special animation is played... ;) auth_fails = 10 # Background color id bg = 0x00000000 # Change the state and language of the big clock # none -> Disabled (default) # en -> English # fa -> Farsi bigclock = none # Blank main box background # Setting to false will make it transparent blank_box = true # Border foreground color id border_fg = 0x00FFFFFF # Title to show at the top of the main box # If set to null, none will be shown box_title = Login Bro! # Brightness increase command brightness_down_cmd = /usr/bin/brightnessctl -q s 10%- # Brightness decrease key, or null to disable brightness_down_key = F5 # Brightness increase command brightness_up_cmd = /usr/bin/brightnessctl -q s +10% # Brightness increase key, or null to disable brightness_up_key = F6 # Erase password input on failure clear_password = false # Format string for clock in top right corner (see strftime specification). Example: %c # If null, the clock won't be shown clock = %c # CMatrix animation foreground color id cmatrix_fg = 0x0000FF00 # CMatrix animation minimum codepoint. It uses a 16-bit integer # For Japanese characters for example, you can use 0x3000 here cmatrix_min_codepoint = 0x21 # CMatrix animation maximum codepoint. It uses a 16-bit integer # For Japanese characters for example, you can use 0x30FF here cmatrix_max_codepoint = 0x7B # Color mixing animation first color id colormix_col1 = 0x0000A300 # Color mixing animation second color id colormix_col2 = 0x00A30000 # Color mixing animation third color id colormix_col3 = 0x20000000 # Console path console_dev = /dev/console # Input box active by default on startup # Available inputs: info_line, session, login, password default_input = login # DOOM animation top color (low intensity flames) doom_top_color = 0x00FF0000 # DOOM animation middle color (medium intensity flames) doom_middle_color = 0x00FFFF00 # DOOM animation bottom color (high intensity flames) doom_bottom_color = 0x00FFFFFF # Error background color id error_bg = 0x00000000 # Error foreground color id # Default is red and bold error_fg = 0x01FF0000 # Foreground color id fg = 0x00FFFFFF # Remove main box borders hide_borders = false # Remove power management command hints hide_key_hints = false # Initial text to show on the info line # If set to null, the info line defaults to the hostname initial_info_text = null # Input boxes length input_len = 34 # Active language # Available languages are found in /etc/ly/lang/ lang = en # Load the saved desktop and username load = true # Command executed when logging in # If null, no command will be executed # Important: the code itself must end with `exec "$@"` in order to launch the session! # You can also set environment variables in there, they'll persist until logout login_cmd = null # Command executed when logging out # If null, no command will be executed # Important: the session will already be terminated when this command is executed, so # no need to add `exec "$@"` at the end logout_cmd = null # Main box horizontal margin margin_box_h = 2 # Main box vertical margin margin_box_v = 1 # Event timeout in milliseconds min_refresh_delta = 5 # Set numlock on/off at startup numlock = false # Default path # If null, ly doesn't set a path path = /sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin # Command executed when pressing restart_key restart_cmd = /sbin/shutdown -r now # Specifies the key used for restart (F1-F12) restart_key = F2 # Save the current desktop and login as defaults save = true # Service name (set to ly to use the provided pam config file) service_name = ly # Session log file path # This will contain stdout and stderr of Wayland sessions # By default it's saved in the user's home directory # Important: due to technical limitations, X11 and shell sessions aren't supported, which # means you won't get any logs from those sessions session_log = ly-session.log # Setup command setup_cmd = /etc/ly/setup.sh # Command executed when pressing shutdown_key shutdown_cmd = /sbin/shutdown -a now # Specifies the key used for shutdown (F1-F12) shutdown_key = F1 # Command executed when pressing sleep key (can be null) sleep_cmd = null # Specifies the key used for sleep (F1-F12) sleep_key = F3 # Center the session name. text_in_center = false # TTY in use tty = 1 # Default vi mode # normal -> normal mode # insert -> insert mode vi_default_mode = insert # Enable vi keybindings vi_mode = false # Wayland desktop environments # You can specify multiple directories, # e.g. /usr/share/wayland-sessions:/usr/local/share/wayland-sessions waylandsessions = /usr/share/wayland-sessions # Xorg server command x_cmd = /usr/bin/X # Xorg xauthority edition tool xauth_cmd = /usr/bin/xauth # xinitrc # If null, the xinitrc session will be hidden xinitrc = ~/.xinitrc # Xorg desktop environments # You can specify multiple directories, # e.g. /usr/share/xsessions:/usr/local/share/xsessions xsessions = /usr/share/xsessions
[Unit] Description=TUI display manager After=systemd-user-sessions.service getty.target Conflicts=getty@tty1.service [Service] Type=simple ExecStart=/usr/bin/ly StandardInput=tty StandardOutput=tty Restart=always TTYPath=/dev/tty1 TTYReset=yes TTYVHangup=yes [Install] Alias=display-manager.service
#%PAM-1.0 auth include login #-auth optional pam_gnome_keyring.so #-auth optional pam_kwallet5.so account include login password include login #-password optional pam_gnome_keyring.so use_authtok #-session optional pam_systemd.so class=greeter #-session optional pam_elogind.so session include login #-session optional pam_gnome_keyring.so auto_start #-session optional pam_kwallet5.so auto_start
If for some reason the code I put here renders out badly in HTML and it's hard to copy, I'll have these files up in my dotfiles section on my gitea.
you can clone all of my dotfiles down and go into the ly directory and you will have the files:
https://git.qwik.space/left4code/Dotfiles.git && cd Dotfiles/ly
This will be in no particular order, but these were some of the commands used, some of them may have an affect on the success of ly running. But I ran them.
sudo systemctl disable getty@tty1.service sudo systemctl mask getty@tty1.service sudo systemctl mask getty@tty2.service sudo systemctl mask getty@tty2.service sudo rm /etc/systemd/system/display-manager.service
After this, it seems to work, I think login as the default service was loading in above or there was some other display manager stealing the default output from tty1 or tty2,
you will for sure want to enable ly.service and disable whatever your current display manager's service (lightdm.service in my case)
sudo systemctl enable ly.service sudo systemctl disable lightdm.service
note that stopping lightdm (or your current display manager) with the command below will kick you out of your graphical session if you're in one and you will need to use CTRL + ALT + {F1,F2,F3,F4,F5,F6} if you want to get into a login tty to actually start ly.service
sudo systemctl stop <your_display_manager> sudo systemctl start ly.service
From here pray to the gods that you see something, if you don't then login to a tty session that is available and try just running ly from the terminal and see if you get something, if you don't the ly program might not be in your path or in the /bin or /usr/bin directories or might not be marked as executable.
If you can start it but upon rebooting you don't get put into ly, it might be the ly pam file or the ly service file make sure the service file is booting into tty1, if what I've provided above doesn't work then you might need to boot, run "sudo journalctl -u ly.service" and see the errors for the most recent ly boot attempt, if there's anything to do with gnome-keyring, it's probably the ly pam file or something else is hooking into the tty you have set for ly to start in by default, which is controlled by the ly service file.
You should probably just use Arch and use ly that way if you want to, or just stick to lightdm, having to tinker around with ly like this can be quite annoying, and not exactly knowing what you're doing can make you appreciate an out-of-the-box working solution.
To the ly dev. You're cool, I can get to my window manager a bit faster now because of your efforts. Thank you.