Running a script at startup
I'm trying to automatically run a script at startup (preferably once at boot time, but it would suffice to be able do it each time the user logs in). This is something I've done with ease many times in Windows and even in the past with older operating systems. Why is it proving so difficult with Linux? Using Ubuntu 11.10 - have tried two approaches but so far to no avail:-
1. Using cron, but when doing a crontab edit the system is just not saving the changes.
2. Adding a call to or inclusion of the script in ~/.profile. The latter exists by default in the Ubuntu installation whilst the files ~/.bash_profile and ~/.bash_login are absent. This should mean that .profile is executed at startup time, but there is no evidence that the required script is being run.
Can anyone please help?