You are not logged in.
I have a .xinitrc file located at ~/.xinitrc, with the following contents:
#!/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
/usr/bin/i3 &
#xclock -geometry 50x50-1+1 &
#xterm -geometry 80x50+494+51 &
#xterm -geometry 80x20+494-0 &
#exec xterm -geometry 80x66+0+0 -name loginWhen I run startx (as the same user which the file is located in), x just exits without any erros., when I want it to start i3. It starts fine with startx /usr/bin/i3.
Last edited by Celsiuss (2020-11-05 22:16:44)
Offline
The problem is that it is running that xinitrc - and the xinitrc is broken. X exits successfully as it has completed everything you asked it to do. Do not background your window manager.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Haha, thank you!
Then may I ask why the default configuration file (/etc/X11/xinit/xinitrc) has the line 'twm &' ?
Offline
The default xinitrc is controlled by an xterm instance which is not backgrounded. When that xterm exits, X shuts down.
Technically you can background a window manager, but you need some primary process that runs in the foreground from xinitrc.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
The default xinitrc is controlled by an xterm instance which is not backgrounded. When that xterm exits, X shuts down.
Technically you can background a window manager, but you need some primary process that runs in the foreground from xinitrc.
Oh well that makes sense. Thank you again!
Offline