• \[SOLVED\] run program on startup


    I want to use a program to control my fan speed ([https://github.com/blan4/lenovo-yoga-fan-control][0]">[https://github.com/blan4/lenovo-yoga-fan-control][1]) but the script to add the program to the init queue is written for ubuntu.

    I tried running the programm on startup by putting following in a file called yoga_fan.service in /etc/systemd/system:
    [Unit]
    Description=Yoga Fan Control

    [Service]
    ExecStart=/usr/bin/yoga_fan

    [Install]
    WantedBy=multi-user.target

    I then enabled the unit with ‘sudo systemctl enable yoga_fan.service’

    However this didn’t work.
    If I just start the program in the command line with ‘sudo yoga_fan’ it works and the fan spins when needed.
    I just need a way to autostart it without the need to enter the root password …

    Any advice on how to achieve that?

    [0]: <a href=
    [1]: https://github.com/blan4/lenovo-yoga-fan-control

  • I want to use a program to control my fan speed ([https://github.com/blan4/lenovo-yoga-fan-control][0]">[https://github.com/blan4/lenovo-yoga-fan-control][1]) but the script to add the program to the init queue is written for ubuntu.

    I tried running the programm on startup by putting following in a file called yoga_fan.service in /etc/systemd/system:
    [Unit]
    Description=Yoga Fan Control

    [Service]
    ExecStart=/usr/bin/yoga_fan

    [Install]
    WantedBy=multi-user.target

    I then enabled the unit with ‘sudo systemctl enable yoga_fan.service’

    However this didn’t work.
    If I just start the program in the command line with ‘sudo yoga_fan’ it works and the fan spins when needed.
    I just need a way to autostart it without the need to enter the root password …

    Any advice on how to achieve that?

    [0]: <a href=
    [1]: https://github.com/blan4/lenovo-yoga-fan-control

  • Problem solved.
    I was missing ‘Type=forking’

Posts 3Views 1058
Log in to reply