fairyglade / ly

display manager with console UI
Do What The F*ck You Want To Public License
5.33k stars 306 forks source link

Ly doesn't start Xorg #573

Closed paulohcardoson closed 6 months ago

paulohcardoson commented 8 months ago

I'm currently on Arch Linux, I installed Ly via cmake and configured everything, but when I choose to start with my .xinitrc file, it shows some logs very fast and then loop back to the ly login screen.

Is .xinitrc an executable? Yes: -rwxr-xr-x 1 paulo paulo 210 Jan 21 11:49 .xinitrc

Does it have a shebang? Yes:

#!/bin/sh

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
    for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
        [ -x "$f" ] && . "$f"
    done
    unset f
fi

nitrogen --restore &
xbindkeys &
exec xmonad

Do you have .xsession? No: ls: cannot access '.xsession': No such file or directory

When I run as shell, it works just fine and then I can startx and it works just fine too.

JuanR4140 commented 7 months ago

Hey! I had this exact same issue, I'm using dwm. Choosing xinitrc would appear to log in, but display /usr/bin/xauth: error in locking authority file /run/user/1000/lyxauth (and x server logs) quickly before looping back to the ly login screen. shell and then startx works just fine.

I used a workaround to get it working (which requires you to choose shell instead of xinitrc on ly). At the end of .bashrc, I wrote:

# .....

if tty | grep -q tty; then
    startx
fi

Which checks if the current terminal is running in a tty, and if so, executes startx. This works well for me personally, and doesn't conflict if you exit x or open a terminal or anything. Perhaps you'll find it solves your issue as well?

paulohcardoson commented 6 months ago

I actually don't know what happened, but it just works now. I don't know if I needed to restart the system after some configuration or something like that, I can't reproduce the error again, so I'm closing the issue as solved.