tronje/radshift

Failed to init randr!

jerzybrzoska opened this issue · 9 comments

doas radshift 3000K returns

Authorization required, but no authorization protocol specified
`RANDR Query Version' returned error -1
Failed to init randr!

I use Ubuntu 22.04LTS Desktop and doas instead of sudo.

Is there a specific reason you're trying to run radshift as root? Does it not work when you run it as your normal user?

Is there a specific reason you're trying to run radshift as root? Does it not work when you run it as your normal user?

No specific reason but I have to do it because when I don't do it I get from Bash:

/usr/bin/radshift: Permission denied

Ah, perhaps the permissions on the file are incorrect. What does ls -lh /usr/bin/radshift output?

Did you use sudo make install to install it?

I did use sudo because it was advised so in your README.

Yeah, to install to a system path like /usr/bin you usually need root permissions. What does ls -lh /usr/bin/radshift say?

Yeah, to install to a system path like /usr/bin you usually need root permissions. What does ls -lh /usr/bin/radshift say?

-rwx------ 1 root root 22K Feb 27 14:19 /usr/bin/radshift - that's permissions. Without sudo or doas I get install: cannot create regular file '/usr/bin/radshift': Permission denied make: *** [Makefile:70: install] Error 1 But what about RANDR Query Version' returned error -1? Is it an independent issue?

Yeah so with sudo or doas you'll be getting weird issues because you really shouldn't be interacting with an X session as root. I think the following should fix it:

sudo chmod 0755 /usr/bin/radshift

(or you can use doas instead of sudo, I think either should work)

Then, just run radshift as your regular user, without doas or sudo. Let me know if that works :)

Yeah so with sudo or doas you'll be getting weird issues because you really shouldn't be interacting with an X session as root. I think the following should fix it:

sudo chmod 0755 /usr/bin/radshift

(or you can use doas instead of sudo, I think either should work)

Then, just run radshift as your regular user, without doas or sudo. Let me know if that works :)

Yeah, it works fine when I run it as a normal user.
P.S. I'm concerned because 2000K does nor seem warm at all. I don't even see any difference. And I remember that 2000K seemed quite red and warm with redshift. But that is another issue perhaps...

I wrote this thing ages ago, so I'm not sure about that. I do remember that color conversion was taken mostly from redshift itself, so weird...

But yeah, that might be another issue. I'm closing this for now.