A lightweight TUI (ncurses-like) display manager for Linux and BSD (mirror of https://codeberg.org/fairyglade/ly).
Go to file
Aaron LI 4f8c2f2428 Fix ioctl issues on DragonFly BSD and FreeBSD (#78)
* Fix ioctl issues on DragonFly BSD and FreeBSD

* Include the correct headers on DragonFly BSD and FreeBSD.

* Use UTF-8 characters to draw border on Linux.

* Use ioctl 'KDGETLED' to get the keyboard LED states, which is supported
  on both Linux and BSD.

* Use macros 'LED_NUM' and 'LED_CAP' instead of hard-coded magic numbers.

NOTE:
This patch only allows 'ly' to build fine on DragonFly BSD and FreeBSD
(other *BSD not tested), and more works are needed to make 'ly' working
fine on BSD.

* Use ioctl 'KDGKBLED' on Linux

The legacy ioctl 'KDGETLED' (which also exists on BSD) is used to get the
state of keyboard LEDs, which, however, can be used to display arbitrary
information!  So the new ioctl 'KDGKBLED' should be used to get the keyboard
flags (CapsLock, NumLock, ScrollLock), and this ioctl has a separate set of
macros ('K_NUMLOCK', 'K_CAPSLOCK') to check the flags.

See the ioctl_console(2) man page for more details.
2018-10-07 14:42:56 +00:00
res added /bin and /sbin in the default PATH 2018-10-07 12:07:53 +02:00
src Fix ioctl issues on DragonFly BSD and FreeBSD (#78) 2018-10-07 14:42:56 +00:00
sub sub/termbox-next: Update to the latest version (#74) 2018-10-06 18:02:59 +00:00
.gitignore completed 2018-09-23 18:03:00 +00:00
.gitmodules completed 2018-09-23 18:03:00 +00:00
LICENSE.md completed 2018-09-23 18:03:00 +00:00
README.md syntax and typos 2018-10-06 14:28:32 +02:00
ly.service completed 2018-09-23 18:03:00 +00:00
makefile fixed linking flags 2018-10-06 12:46:44 +02:00
xsetup.sh completed 2018-09-23 18:03:00 +00:00

README.md

Ly - a TUI display manager

CodeFactor ly screenshot

Ly is a lightweight, TUI (ncurses-like) display manager for Linux.

Dependencies

Make sure all the following packages are properly installed and configured before going further:

  • a C99 compiler (tested with gcc and tcc)
  • a C standard library
  • make
  • linux-pam
  • xorg
  • xorg-xinit
  • xorg-xauth
  • mcookie
  • tput
  • shutdown

Cloning and Compiling

This repository uses submodules, to clone it properly please use

git clone --recurse-submodules https://github.com/cylgom/ly.git

To compile you just need to launch make in the created folder

make

Check if it works on the tty you configured (default is tty2). You can also run it in terminal emulators, but desktop environments won't start

sudo make run

Then, install Ly and the systemd service file

sudo make install

Now enable the systemd service to make it spawn on startup

sudo systemctl enable ly.service

If you need to switch between ttys after Ly's start you also have to disable getty on Ly's tty to prevent "login" from spawning on top of it

sudo systemctl disable getty@tty2.service

If messages from other services pop over the login prompt, edit open the configuration and make sure force_update is enabled

[box_main]
force_update=1

Configuration

All the configuration takes place in /etc/ly/config.ini. The file is commented, and includes useful defaults.

Controls

Use the up and down arrow keys to change the current field, and the left and right arrow keys to change the target desktop environment while on the desktop field (above the login field).

Tips

The numlock and capslock state is printed in the top-right corner. Use the F1 and F2 keys to respectively shutdown and reboot. Take a look at your .xsession if X doesn't start, as it can interfere (this file is launched with X to configure the display properly).

Additional Information

The name "Ly" is a tribute to the fairy from the game Rayman. Ly was tested by oxodao, who is some seriously awesome dude. I wish to thank linux-pam, X11 and systemd developers for not providing anything close to a reference or documentation.