Skip to main content
Topic: Coolercontrol App (Read 346 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Coolercontrol App

Hello everyone in the community.
I've been using Debian for 1 month, and I immediately decided to switch to Artix (linux without systemd), so I'm a Linux newbie.

Hardware:
1) NVIDIA GeForce RTX 3090
2) 12th Gen Intel i9-12900K
3) ROG STRIX Z790-A GAMING WIFI D4

Artix Linux - OpenRC - XFCE
OS: Artix Linux x86_64
Kernel: 6.10.0-artix1-2
Packages: 1073 (pacman)
Shell: bash 5.2.26
DE: Xfce 4.18
WM: Xfwm4
WM Theme: Default
Theme: Artix-dark [GTK2/3]
Icons: matefaenzadark [GTK2/3]
Terminal: xfce4-terminal

I'm trying to install the coolercontrol program. I'd like you to help me find out which libraries are needed first?
Then, how to start the services, and how to start them when the system starts.
I leave you a screenshot of the error that I get when starting the application.
I installed the application from "yay coolercontrol".
I was seeing a post that said to do the following:

Code: [Select]
coolercontrol-liquidctl:
#!/sbin/openrc-run
name=$RC_SVCNAME
description="CoolerControl Liquidctl Daemon"
supervisor="supervise-daemon" command="/usr/bin/coolercontrol-liqctld"
command_args="--daemon"
supervise_daemon_args=" -e "COOLERCONTROL_LOG= \"INFO"\""

coolercontrolled
#!/sbin/openrc-run
name=$RC_SVCNAME
description="CoolerControl Daemon"
supervisor="supervise-daemon"
command="/usr/bin/coolercontrold"
supervise_daemon_args=" -e "COOLERCONTROL_LOG=\"INFO"\""
depend() {
    after net coolercontrol-liqctld
    use coolercontrol-liqctld
}

The problem is that I don't know the location where these files should be created. I don't know what extension they have, and how to start them. As I said, I'm trying to learn as much as possible, but it takes some time, and knowing how to find this information.

I appreciate any help. Regards Leopoldo.

 

Re: Coolercontrol App

Reply #1
In OpenRC, services are located in the /etc/init.d/ directory. So, you will have to create /etc/init.d/coolercontrol-liquidctl and /etc/init.d/coolercontrold with the respective contents that you already mentioned (though there seems to be a typo: replace every "coolercontrolled" with "coolercontrold"). Then, you need to run
Code: [Select]
sudo chmod +x /etc/init.d/coolercontrol*
in order to set the correct permissions,
Code: [Select]
sudo rc-service coolercontrol-liquidctl start
sudo rc-service coolercontrold start
in order to start them, and
Code: [Select]
sudo rc-update add coolercontrol-liquidctl default
sudo rc-update add coolercontrold default
if you want them to start on boot.
You can find out more about OpenRC on the wiki.

Though here's a bit of advice: please be careful when installing packages like these from the AUR. When testing this in a virtual machine, yay -S coolercontrol compiled 580 (!) packages from source, including downloading stuff from npm. Most of these are user-generated packages that are not checked, and there have been incidents when malicious code was distributed this way. For your own sake, please reconsider if you really need this program. I'm not saying that it's bad, but it does introduce a lot of attack surface. An alternative would be downloading their AppImage since, IIRC, it's already compiled for you. Though you'll have to update manually and that's still a binary that you can't check, so bad stuff can also happen here.

Re: Coolercontrol App

Reply #2
One note, since coolercontrol-liqctld is a dependency of coolercontrold, it's not necessary to be added to a runlevel, OpenRC will start it before the latter.

Re: Coolercontrol App

Reply #3
MaxLPM:
First I want to thank you very much for taking the time to answer me, I really appreciate it.
Then, I want to tell you that thanks to your guide, I was able to get the application working, the steps you indicated were very clear.
Regarding security, I was not aware of what you indicated, so I have a question, are only official applications or packages (sudo pacman -S appname) safe?
That is, are those we install from the AUR repositories not necessarily safe?
Another question, are the applications we compile from source code not safe either?
What does the number 580 mean in the test you performed from yay?

Thank you very much again. I send you a big hug, Leopoldo.

Re: Coolercontrol App

Reply #4
You see, packages that come from the official repositories (the ones from pacman -S) are packaged by package maintainers (name speaks for itself). These are trusted people that put together scripts (PKGBUILDs on Arch/Artix) and other stuff that makes the package installable/workable on the target OS. Packages from the AUR include scripts that are created by random people and therefore might have malicious code smuggled in (first example that I could find, but the consequences may be more serious)

Even the Arch wiki says that
Quote
Warning: AUR packages are user-produced content. These PKGBUILDs are completely unofficial and have not been thoroughly vetted. Any use of the provided files is at your own risk.

yay is just a wrapper that makes installing from the AUR simpler. The coolercontrol's PKGBUILD downloads its source code and compiles it, though in order to do that it needs dependencies, which it gets from npm. npm is also a repository for user-produced content, but it's used for javascript packages.

Now, nothing is 100% safe, but official packages that you get from "pacman -S" are probably much safer than the ones you can get from any third party. And if you have to install from the AUR, for packages that have a lot of dependencies or take a long time to compile I would recommend choosing the ones that have a -bin prefix (already compiled binary), though coolercontrol doesn't have that. So, 580 is the number of packages that got installed from npm as dependencies. For comparison, my current laptop has 996 packages in total from pacman. That's why 580 is a big number, you can't possibly check all of that code. Now, this doesn't mean that you should abandon everything, I use the AUR too, but it is preferable to keep it to a minimum. So, after evaluating everything yourself, you should make the choice of what software to install/keep/delete etc.

Recommended reading:
https://wiki.archlinux.org/title/Aur
https://wiki.archlinux.org/title/Creating_packages
https://unixdigest.com/articles/the-heavy-responsibility-of-the-package-maintainer.html
https://unixdigest.com/articles/no-you-cannot-trust-third-party-code-without-reading-it-first.html

PS to the knowledgeable guys: I tried making the explanation as simple as possible. If I'm wrong, please correct me, but please put your pitchforks down ;)

Re: Coolercontrol App

Reply #5
Hello,

Coolercontrol (already compiled binary) is also available on:
https://aur.chaotic.cx/

Code: [Select]
yay coolercontrol
2 chaotic-aur/coolercontrol 1.4.0-2 (8.4 MiB 29.0 MiB)
    A program to monitor and control your cooling devices
1 aur/coolercontrol 1.4.0-2 (+24 4.55)
    A program to monitor and control your cooling devices

However, you will need to create the two openrc scripts as MaxLPM explained to you.