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

Can't connect to display ":0": b'Authorization required, but no authorization protocol specified #877

Closed
dacrhu opened this issue Nov 20, 2022 · 10 comments · Fixed by #880
Closed

Comments

@dacrhu
Copy link

dacrhu commented Nov 20, 2022

Hi,

OS: Fedora 37
Kernel: Linux fedora 6.0.8-300.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC
Window manager: Wayland
Graphics (dual): NVIDIA GeForce RTX™ 3050 Ti Laptop GPU / AMD Radeon™ Graphics

Nagstamon version:
nagstamon.noarch 3.10.1.fedora37-1 @nagstamon

Console out:

[berci@fedora ~]$ nagstamon
QSocketNotifier: Can only be used with threads started with QThread
Traceback (most recent call last):
File "/usr/bin/nagstamon", line 42, in
from Nagstamon.QUI import (APP,
File "/usr/lib/python3.11/site-packages/Nagstamon/QUI/init.py", line 7058, in
statuswindow = StatusWindow()
^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/Nagstamon/QUI/init.py", line 955, in init
self.ewmh = EWMH()
^^^^^^
File "/usr/lib/python3.11/site-packages/Nagstamon/thirdparty/ewmh.py", line 50, in init
self.display = _display or display.Display()
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/Nagstamon/thirdparty/Xlib/display.py", line 80, in init
self.display = _BaseDisplay(display)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/Nagstamon/thirdparty/Xlib/display.py", line 62, in init
display.Display.init(*(self, ) + args, **keys)
File "/usr/lib/python3.11/site-packages/Nagstamon/thirdparty/Xlib/protocol/display.py", line 129, in init
raise error.DisplayConnectionError(self.display_name, r.reason)
Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'Authorization required, but no authorization protocol specified\n'

Thank you for help!
David

@HenriWahl
Copy link
Owner

@dacrhu did it work before? Anything changed like Fedora upgrade from 36 to 37?

@HenriWahl
Copy link
Owner

A short local fix is installing the package python3-pyqt6. Nagstamon needs this for running on Wayland but apparently the dependency in the RPM-File is still on Qt5 - will fix this ASAP.

@dacrhu
Copy link
Author

dacrhu commented Nov 20, 2022

It worked before, yes. I upgraded to 37, and worked fine. But yesterday I shutted down my notebook, and it runned auto upgrade. In this morning nagstamon not runned again. I think yesterday nagstamon upgraded.

I've installed python3-pyqt6 now but result is same.

@dacrhu
Copy link
Author

dacrhu commented Nov 20, 2022

Sorry, result is little bit different:

Traceback (most recent call last):
File "/usr/bin/nagstamon", line 42, in
from Nagstamon.QUI import (APP,
File "/usr/lib/python3.11/site-packages/Nagstamon/QUI/init.py", line 7058, in
statuswindow = StatusWindow()
^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/Nagstamon/QUI/init.py", line 955, in init
self.ewmh = EWMH()
^^^^^^
File "/usr/lib/python3.11/site-packages/Nagstamon/thirdparty/ewmh.py", line 50, in init
self.display = _display or display.Display()
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/Nagstamon/thirdparty/Xlib/display.py", line 80, in init
self.display = _BaseDisplay(display)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/Nagstamon/thirdparty/Xlib/display.py", line 62, in init
display.Display.init(*(self, ) + args, **keys)
File "/usr/lib/python3.11/site-packages/Nagstamon/thirdparty/Xlib/protocol/display.py", line 129, in init
raise error.DisplayConnectionError(self.display_name, r.reason)
Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'Authorization required, but no authorization protocol specified\n'

@HenriWahl
Copy link
Owner

@dacrhu what happens if you use Xorg instead of Wayland?

@dacrhu
Copy link
Author

dacrhu commented Nov 21, 2022

With Xorg working fine.

@HenriWahl
Copy link
Owner

Wayland support by Qt got better with Qt6 but there are still issues for Nagstamon, because it partly does not behave like a normally windowed application. This is still under construction.

So if you could use Xorg as well this might be no fix but a workaround. By the way Nagstamon is the only reason why I still use Xorg.

@dacrhu
Copy link
Author

dacrhu commented Nov 22, 2022

Then I'll wait patiently.

@fluffysatoshi
Copy link
Contributor

#880

Fixed the the issue for me. EWMH Hints are not awailable under Wayland.

xdg-shell might be used to get the EWMH functionality under Wayland.

@HenriWahl
Copy link
Owner

How do you use xdg-shell in this context?

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

Successfully merging a pull request may close this issue.

3 participants