Adding corn jobs is a way to automate launching of apps. Another approach is to make those apps launch when a user logs in. Depending on how the app must be started up, one can make the right choice.
Add a wrapper to the binary to launched in /etc/init.d
echo "/home/tester/tools/apache-httpd/bin/apachectl $1" > /etc/init.d/start-apache update-rc.d start-apache defaults 3 service start-apache start
Here is my experience: I wanted to index media on an external drive; one of the coolest indexing app I found is AutoIndex which is a PHP module (so runs under apache httpd); however this possessed a challenge. The external NTFS driver gets mounted by gvfs (fuseblk); Since I wanted to manage the drive via gvfs (and not via ntfs-3g mounting via fstab), I thought it was a good idea to leave it that way.
Now the challenge was to get apache running as a service (launched by user “daemon”) to access the gvfs mounted drive. The permissions cannot be changed (at least I have not found a resolution there).
Then, what’s the solution?
Install apache and php modules in a user account (user: tester) Make the tester auto-login on boot Add apache (user installed) to launch on login: (GNOME: System -> Preferences -> Startup Applications") Add "gnome-screensaver-command -l" (Lock the screen): (GNOME: System -> Preferences -> Startup Applications")
You’ll have the user installed apache running on boot and have the screen locked for security purposes.
This is a hack I did at home to get media streaming work with drives mounted by gvfs.