Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:general_information:tutorial:autostart [2016/02/15 14:20] – created liedmann | en:general_information:tutorial:autostart [2022/08/04 15:02] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ++++ How to autostart application |
==== Example for creating Qt application autostart on TQMa6x BSP ==== | ==== Example for creating Qt application autostart on TQMa6x BSP ==== | ||
- | 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 / | ||
+ | </ | ||
+ | ++++ |