Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to init randr! #9

Closed
jerzybrzoska opened this issue Feb 27, 2023 · 9 comments
Closed

Failed to init randr! #9

jerzybrzoska opened this issue Feb 27, 2023 · 9 comments

Comments

@jerzybrzoska
Copy link
Contributor

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.

@tronje
Copy link
Owner

tronje commented Mar 11, 2023

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?

@jerzybrzoska
Copy link
Contributor Author

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

@tronje
Copy link
Owner

tronje commented Mar 12, 2023

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?

@jerzybrzoska
Copy link
Contributor Author

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

@tronje
Copy link
Owner

tronje commented Mar 12, 2023

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

@jerzybrzoska
Copy link
Contributor Author

jerzybrzoska commented Mar 12, 2023

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?

@tronje
Copy link
Owner

tronje commented Mar 12, 2023

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 :)

@jerzybrzoska
Copy link
Contributor Author

jerzybrzoska commented Mar 12, 2023

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...

@tronje
Copy link
Owner

tronje commented Mar 12, 2023

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.

@tronje tronje closed this as completed Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants