Matti wrote:I have created the /etc/init.d/local file with this:
Code: Select all
# Wait 20 seconds
and in /etc/rc.local the same thing. Still it doesn't work (even GNOME Terminal doesn't start).
1. It is not enough to create /etc/init.d/local, you have to execute a secret esoteric command
Code: Select all
sudo update-rc.d local defaults 80
As I remember, a similar command did work on Ubuntu 9.04. This is how you install Zfone daemon on Ubuntu http://en.wikipedia.org/wiki/Zfone
More exactly (Ubuntu 9.04):
Code: Select all
$ sudo update-rc.d zfone defaults
[sudo] password for igor:
Adding system startup for /etc/init.d/zfone ...
/etc/rc0.d/K20zfone -> ../init.d/zfone
/etc/rc1.d/K20zfone -> ../init.d/zfone
/etc/rc6.d/K20zfone -> ../init.d/zfone
/etc/rc2.d/S20zfone -> ../init.d/zfone
/etc/rc3.d/S20zfone -> ../init.d/zfone
/etc/rc4.d/S20zfone -> ../init.d/zfone
/etc/rc5.d/S20zfone -> ../init.d/zfone
However, it may not work on Ubuntu 11.04. It is very probable that they change everything in each new version of Ubuntu to make it more obscure.
In a word, Ubuntu 9.04 had /etc/init.d/rc.local script (with a certain content).
Upstart was implemented in Ubuntu in 2006, and it seems to be constantly changing.
Your /etc/init.d/local should be executable, of course.
2. It seems that gnome-terminal could not start before X.
You may better try a simple command instead. Try to copy a file with cp command, for example.
See: https://wiki.archlinux.org/index.php/Rc ... 2Frc.local
EDIT: More exactly, Ubuntu 9.04 had this script
Code: Select all
$ cat /etc/init.d/rc.local
### BEGIN INIT INFO
# Provides: rc.local
# Required-Start: $remote_fs
# Default-Start: 2 3 4 5
# Short-Description: Run /etc/rc.local if it exist
### END INIT INFO
if [ -x /etc/rc.local ]; then
[ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)"
[ "$VERBOSE" != no ] && log_end_msg $ES
case "$1" in
echo "Error: argument '$1' not supported" >&2
echo "Usage: $0 start|stop" >&2
/etc/init.d/rc.local script starts /etc/rc.local script if it exists and it is executable (on Ubuntu 9.04).
EDIT: It should work on Ubuntu 11.04:
Ubuntu Manpage: update-rc.d - install and remove System-V style (Ubuntu 11.04 "Naughty Nutgoblin")
http://manpages.ubuntu.com/manpages/nat ... c.d.8.html
If it does not work, you may file a bug. The manual is here:
http://linuxhaters.blogspot.com/2008/08 ... m-all.html
How-To: Managing services with update-rc.d
http://www.debuntu.org/how-to-manage-se ... pdate-rc.d
Update-rc.d - LQWiki
Adding a startup script to be run at bootup
http://embraceubuntu.com/2005/09/07/add ... at-bootup/
11.6 It looks as if Debian does not use rc.local to customize the boot process; what facilities are provided?
Suppose a system needs to execute script foo on start-up, or on entry to a particular (System V) runlevel. Then the system administrator should:
Enter the script foo into the directory /etc/init.d/.
Run the Debian command update-rc.d with appropriate arguments, to specify which runlevels should start the service, and which runlevels should stop the service.
Consider rebooting the system to check that the service starts correctly (assuming that you've asked for it to be started in the default runlevel). Otherwise, manually start it by running `/etc/init.d/foo start'.
One might, for example, cause the script foo to execute at boot-up, by putting it in /etc/init.d/ and running update-rc.d foo defaults 19. The argument `defaults' refers to the default runlevels, which means (at least in absence of any LSB comment block to the contrary) to start the service in runlevels 2 through 5, and to stop the service in runlevels 0, 1 and 6. (Any LSB Default-Start and Default-Stop directives in foo take precedence when using the sysv-rc version of update-rc.d, but are ignored by the current (v0.8.10) file-rc version of update-rc.d.) The argument `19' ensures that foo is called after all scripts whose number is less than 19 have completed, and before all scripts whose number is 20 or greater. http://www.debian.org/doc/FAQ/ch-customizing.en.html
Debian Administration: Making scripts run at boot time with Debian (with examples)
UbuntuBootupHowto - Community Ubuntu Documentation (with examples)
Ubuntu's Upstart seems to be a buggy thing:
http://www.google.com/search?hl=en-US&q ... pdate-rc.d
There is apparently some magic in update-rc.d that attempts to prevent...
read more: http://serverfault.com/questions/113032 ... b-standard
To make it work, you have to perform a kind of magic rituals. However, ceremonial magic and occult practices necessitate a certain amount of exercise and discipline to achieve a perfect exactitude, because mistakes in ritual performances may render them ineffective, and the expected miracles may never happen. What is more, the exact performance of magic rituals requires a secret esoteric knowledge. The problem is that such esoteric knowledge can hardly be explained in plain words, and, therefore, it is never documented. The same is true for Cargo Cults:
When a European attempts to explain to a Kanaka the 'truth about cargo' he is merely explaining to himself how he thinks European goods are made; and the Kanaka is satisfied that the European has a special technique whereby he gains access to cargo... The more administrative officers tried to explain to Yali the 'truth about cargo' the more he would feel... that white men had a 'secret' which they were holding back from Kanakas.
Kenelm Burridge, Mambu. A Melanesian Millennium. 1960
http://www.amazon.com/Mambu-Kenelm-Burr ... 213&sr=8-2
If you do not know the true secret of Cargo, it does not make much sense to practice magic rituals.
In any case, you may try the ancient method of "trial and error". Although it was invented in the Stone Age, it is still flexible, modern and advanced, and, therefore, it is still in use as "a general method of problem solving, fixing things, or for obtaining knowledge" http://en.wikipedia.org/wiki/Trial_and_error