40-x11-autostart 399 Bytes
#!/bin/sh
## 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

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

: