Commit 8868ee04 authored by Anton Midyukov's avatar Anton Midyukov

x11-autostart: enable graphical.target

If xinitrc is not installed, then you must enable graphical.target for the systemd.
parent 62f32d44
#!/bin/sh
if [ ! -x /usr/bin/X ]; then
echo "SKIP autostart: X not installed" >&2
exit 0
fi
## setup automated graphical session startup
INITTAB=/etc/inittab
if [ -f "$INITTAB" ]; then
[ -z "$runlevel" ] && runlevel=5
sed -i "s,^\(id:\)\(.*\)\(:initdefault.*\),\\1$runlevel\\3," "$INITTAB"
fi
## ...and systemd, if any
## NB: alterator-setup's backup file can present a nice catch if left around
rm -f /etc/systemd/system/default.target{,.bak}
TARGET=/lib/systemd/system/graphical.target
if [ -s "$TARGET" ]; then
rm -f /etc/systemd/system/default.target
ln -s "$TARGET" /etc/systemd/system/default.target
fi
:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment