This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ++++ How to autostart application with systemd | ==== Example for creating Qt application autostart on TQMa6x BSP ==== 1. Create file **/lib/systemd/system/demo.service** with following content : <code> [Unit] After=multi-user.target Description=start Qt demo [Service] Type=forking RemainAfterExit=no ExecStart=/lib/systemd/systemd-demo start ExecStop=/lib/systemd/systemd-demo stop [Install] WantedBy=multi-user.target.wants </code> 2. Create file **/lib/systemd/systemd-demo** with following content : <code> #!/bin/sh case "$1" in start) echo 0 > /sys/class/graphics/fbcon/cursor_blink /usr/bin/qt5-examples/quick/touchinteraction/touchinteraction ;; stop) killall touchinteraction ;; *) echo "usage: $0 [start|stop]" exit 1 ;; esac </code> 3. make system-demo executable.\\ 4. create symlink demo.service in **/etc/system/system/multi-user.target.wants** that points to the file **/lib/systemd/system/demo.service** : <code> cd /etc/systemd/system/multi-user.target.wants/ ln -s /lib/systemd/system/demo.service demo.service </code> ++++ ++++ How to autostart application with initd | 1. Move to **/etc/init.d** and create the startscript that you want to autorun on system boot. <code> nano /etc/init.d/startscript </code> 2. Use the following command to make the script executable. <code> chmod +x startscript </code> 3. Create a symlink to the script in **/etc/rc.d** <code> ln -s /etc/init.d/startscript /etc/rc.d </code> ++++ Last modified: 2022/08/04 15:02