Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| en:general_information:tutorial:autostart [2018/11/13 10:54] – created liedmann | en:general_information:tutorial:autostart [2025/01/28 11:17] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| - | 1.Create file /etc/ | + | 1. Create file **/ |
| - | < | + | |
| - | [UNIT] | + | |
| - | Description=Start Multitouch Qt Demo | + | |
| - | + | ||
| - | [SERVICE] | + | |
| - | + | ||
| - | [Install] | + | |
| - | WantedBy=multi-user.target | + | |
| - | </ | + | |
| - | 2.Create file lib/ | + | |
| < | < | ||
| [Unit] | [Unit] | ||
| Line 29: | Line 19: | ||
| WantedBy=multi-user.target.wants | WantedBy=multi-user.target.wants | ||
| </ | </ | ||
| - | 3. Create file / | + | 2. Create file **/ |
| < | < | ||
| #!/bin/sh | #!/bin/sh | ||
| Line 47: | Line 37: | ||
| esac | esac | ||
| </ | </ | ||
| - | 4. make system-demo executable.\\ | + | 3. make system-demo executable.\\ |
| - | 5. create symlink demo.service in / | + | 4. create symlink demo.service in **/ |
| < | < | ||
| cd / | cd / | ||
| ln -s / | ln -s / | ||
| + | </ | ||
| + | ++++ | ||
| + | ++++ How to autostart application with initd | | ||
| + | |||
| + | 1. Move to **/ | ||
| + | < | ||
| + | nano / | ||
| + | </ | ||
| + | 2. Use the following command to make the script executable. | ||
| + | < | ||
| + | chmod +x startscript | ||
| + | </ | ||
| + | 3. Create a symlink to the script in **/ | ||
| + | < | ||
| + | ln -s / | ||
| </ | </ | ||
| ++++ | ++++ | ||