codekasten/knoppix-remastering/local.conf.d/chroot_scripts.d/startup_prog.sh

36 lines
789 B
Bash
Executable file

# run a program as soon, as the window manager is ready
# AND do not open the knoppix info page with a browser
STARTUP_PROG=/cdrom/silicann/start.sh
BASH_HEADER='#!/bin/sh'
# first: turn off info page autostart
sed -i '/^ln .*Autostart/showindex.desktop/s/^/#/' /etc/X11/Xsession.d/45xsession
# now select "our" autostart program
# do it for different window managers
################ icewm ###################
# does not really work
FILE=/etc/X11/icewm/startup
(
echo "$BASH_HEADER"
echo "$STARTUP_PROG"
) >"$FILE"
chmod +x "$FILE"
################ kde ###################
# works
FILE=/usr/share/autostart/sili9.desktop
(
echo "[Desktop Entry]"
echo "Name=Silimann9 - Demo"
echo "Exec=$STARTUP_PROG"
echo "Type=Application"
echo "Icon=html"
echo "Terminal=0"
) >"$FILE"