From 176b361595b5ec6e95c768e77e8e2eb54d4db720 Mon Sep 17 00:00:00 2001 From: Ryan Leavengood Date: Wed, 19 Aug 2009 21:26:36 +0000 Subject: [PATCH] Add an Autostart directory as an easy way to start applications at boot up. The dead simple Bash code was just copied from Humdinger's patch on #1202. He also suggested having a link on the Deskbar for this folder, but I don't know if that is needed. We just need to document it, which I may do next. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32527 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- build/jam/HaikuImage | 3 +++ data/system/boot/Bootscript | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/build/jam/HaikuImage b/build/jam/HaikuImage index 3e1f02061f..afac21fdbe 100644 --- a/build/jam/HaikuImage +++ b/build/jam/HaikuImage @@ -341,6 +341,9 @@ local userBootScripts = UserBootscript.sample UserSetupEnvironment.sample ; SEARCH on $(userBootScripts) = [ FDirName $(HAIKU_TOP) data config boot ] ; AddFilesToHaikuImage home config boot : $(userBootScripts) ; +# Add Autostart directory +AddDirectoryToHaikuImage home config boot Autostart ; + local logoArtwork = "HAIKU logo - white on blue - big.png" "HAIKU logo - white on blue - normal.png" ; SEARCH on $(logoArtwork) = [ FDirName $(HAIKU_TOP) data artwork ] ; diff --git a/data/system/boot/Bootscript b/data/system/boot/Bootscript index 5540020f2f..6951171d25 100644 --- a/data/system/boot/Bootscript +++ b/data/system/boot/Bootscript @@ -152,6 +152,14 @@ if [ "$SAFEMODE" != "yes" ]; then fi fi +# Start all programs in the Autostart folder +if [ "$SAFEMODE" != "yes" ]; then + for program in $HOME/config/boot/Autostart/* + do + "$program" & + done +fi + # Check for fresh install and run post install scripts. postInstallDir=/boot/common/boot/post_install freshInstallIndicator=/boot/common/settings/fresh_install