Re: System freeze at bootup, previous solution not working
Reply #21 –
The manpage for xinit(1) states:
The file /etc/X11/xinit/xinitrc, as well as ~/.xinitrc, is just an ordinary shell script. If there is no ~/.xinitrc, the one in /etc gets executed by X when it starts without a display manager. The default contents of a /etc/X11/xinit/xinitrc is this:
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
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
twm &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login
As you can see, there is a number of lines near the bottom which call programs which might not be installed in your system. Those are:
- twm window manager
- xclock application
- xterm terminal emulator
What to do? You either have your own ~/.xinitrc, which conveniently just overrides all this nonsense from /etc, or simply comment out those lines calling the nonexistant programs and put some Xorg program as the last line, preceeded by exec. Alternatively, you could also install xorg-twm, xorg-xclock and xterm packages to get no error, but start those programs by xinitrc when you run startx. I also use dwm globally on my system, so I have exec dwm as the last line there. I haven't used lxde yet as my "daily driver", nor feel the need to in the future, so I'm afraid I can't help you with specifically setting it up to start without a DM. It could be as simple as putting exec lxde (or whatever the program to start lxde is called) to the end of xinitrc.
This reminded me, I might take the time and write a guide on how to set up Xorg to start dwm without a display manager.
I actually use XFCE, I was only using lxdm as a display manager because it was the only one I could get to work, but it was pretty easy to find the equivalent command.
So, after having commented out those lines from the /etc file and adding a .xinitrc to my home directory, I could finally log in from the tty without any issues. It didn't start x automatically, but creating a .zlogin file and adding this helped a ton:
# this should run startx
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
exec startxfce4
# # Could use xinit instead of startx
# #exec xinit -- /usr/bin/X -nolisten tcp vt7
fi
Now every issue is resolved, besides the fact that I need to press enter once on the login screen before typing in my info since it gives me some message about a wpa supplicant, but that's small potatoes. I declare this issue solved at this point now that I'm finally free from lxdm. Thank you!