# Custom display manager - Ly on FreeBSD



## drozdowsky (Jul 15, 2019)

I want to use https://github.com/cylgom/ly as my display manager.
I have compiled it successfully with gmake + gcc but I do not know how to tell my FreeBSD 12.0 to run it.
/etc/ttys

```
ttyv2 "/usr/local/bin/ly" xterm n secure
```
Doesn't work. Can't even change to tty2/3. 
There is some error that getty refreshes too quickly and it restarts in 30s (I get ly.core dump but (see next post))
Running /usr/local/bin/ly manually - works just fine.

Also does anyone have infinite black screen on `doas reboot`?

Best Regards!


----------



## tingo (Jul 17, 2019)

Don't use reboot. Use `# shutdown -r now` instead.


----------



## drozdowsky (Jul 18, 2019)

tingo said:


> Don't use reboot. Use `# shutdown -r now` instead.


Same, black screen on reboot


About Ly DM, I have seen in /var/log/messages

```
Jul 18 16:16:56 luv kernel: pid 1428 (ly), uid 0: exited on signal 11 (core dumped)
```
I checked the backtrace of dump and I am pretty sure that I can not run Ly like this:

```
ttyv2 "/usr/local/bin/ly" xterm on secure
```
I have had the same backtrace in Void Linux and with help of other user I run Ly successfully (in Linux) like this:
_void linux runit (init) service_

```
exec setsid ${GETTY} ${GETTY_ARGS} -nl /usr/bin/ly tty2 "${BAUD_RATE}" "${TERM_NAME}"
```

How do I run Ly in getty like in Linux?

@edit
I have managed to run Ly in getty. I will add instructions when I manage to start X session from Ly tho


----------



## drozdowsky (Jul 19, 2019)

Ok I have one last problem with Ly. XORG from Ly starts just fine but keyboard does not work, mouse work just fine. (typing xinit/startx manually works just fine too).

How I got it "running":
0. https://github.com/cylgom/ly/issues/113 (replace default tty to next empty tty, in my case vt4)
1. compile with gmake and gcc
2. add to /etc/ly/config.ini:

```
x_cmd=/usr/local/bin/X
tty=3
```
2. add to /etc/gettytab

```
Ly:\
    :lo=/usr/local/bin/ly:\
    :al=root
```
3. change in /etc/ttys

```
ttyv2 "/usr/libexec/getty Ly" xterm on secure
```

But like I said I do not know why keyboard is not working, I don't see anything suspicious in Xorg.0.log
https://pastebin.com/dgUr8e38Any ideas how to debug?

current workaroud: run Ly and run shell from it and then run 
	
	



```
exec startx
```


@edit
Issue is resolved now, Ly is working fine.
Check added 0. (point) above.


----------



## 0mp (Nov 18, 2019)

Thanks a lot, drozdowsky. Thanks to your instructions I was able to add Ly to ports. It is now available to everyone as x11/ly.


----------

