OpenRGB startup options

This interests me as well, so I'll ask here.

I use OpenRGB to manage the lighting. It comes as an .appimage and I have to run it as root because the udev rules don't have some devices.

I can sudo the appimage in terminal and it all works.

I know it's not generally recommended but is there are way to have it run as root automatically?

It has to be running for the lighting to work - eventually, I'll probably replace all the rgb with non lighted stuff, fans, cooler, ram, keyboard and mouse so the problem will eventually go away.

Conversely, any advice on adding things to the udev rules?

1 Like

You can use
pkexec /path/to/your/executable
in the .desktop file of your app.
Then it shows a GUI prompt for your sudo password.

If you do not want the password prompt, you can create as system-policy:

sudo nano /etc/polkit-1/rules.d/50-myapp.rules

Add

polkit.addRule(function(action, subject) {
    if (
        action.id === "org.freedesktop.policykit.exec" &&
        subject.user === "your_username" &&
        action.lookup("program") === "/path/to/your/app"
    ) {
        return polkit.Result.YES;
    }
});

If you then call your app with pkexec, the prompt is bypassed.

1 Like

I got a QT Error

Connection attempt failed
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

Aborted

This is distinct enough from the other thread, that each will have separate solutions.

So I split this topic.

OpenRGB is a QT app, which tries to load xcb, which pkexec will reject since it requires the X server.

But, an important point is that the GUI does not need elevated privileges, only the underlying program that accesses the hardware.

You do not need pkexev, only to add udev rule for the hardware access.

@BazzFreeman I always felt that lighting is a waste of resources, after all you are meant to focus on the monitor not the innards of the PC. My motherboard has lighting but I turn that off in the BIOS. Don't think I can turn off the LED in the TT PSU I had to buy during lockdown when my Cooler Master PSU failed. If you are going to get a new CPU fan I highly racommend the best you can buy if you can afford it, Noctua.

Yeah, I kinda have lost interest in RGB lighting. Might make the rig look pretty but does nothing else, and, if you're on Windows there's 6 differnt apps to make it work.

AMD CPUs run a fair bit cooler than the equivalent Intel ones as well, so I might pull out my old U12S. I do like the quiet with the AIO cooler though.

For the moment, I'll just sudo the appimage until I no longer need it.

1 Like

You could use the .deb Version.

I'm not sure it's available any more. Only the Flatpak version is on the Software app. And they only list the appimage on their site.

There is also a .deb package

You can find it here:

https://codeberg.org/OpenRGB/OpenRGB/releases/download/release_candidate_1.0rc2/openrgb_1.0rc2_amd64_bookworm_0fca93e.deb

2 Likes

I'll give it a shot, thanks.

1 Like

Yay, that is much better. It actually read the udev rules properly. Starting to hate appimages. And flatpak. And Snap.

3 Likes