1
0
mirror of https://github.com/lukaszlach/kali-desktop synced 2026-08-05 16:12:41 +02:00
Files
kali-desktop/etc/services.d/gui/run
T
2018-08-15 13:57:32 +02:00

9 lines
258 B
Plaintext
Executable File

#!/usr/bin/with-contenv bash
set -ex
USER=${USER:-root}
GUI_COMMAND=$( ( which startlxde || which startkde || which startxfce4 || which gdm3 )2>/dev/null )
if [[ "$USER" != "root" ]]; then
exec su -c "$GUI_COMMAND" "$USER"
else
exec "$GUI_COMMAND"
fi