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

Running as root breaks, working fine as normal user #31

Open
evergreenbear opened this issue Feb 4, 2022 · 10 comments
Open

Running as root breaks, working fine as normal user #31

evergreenbear opened this issue Feb 4, 2022 · 10 comments
Labels
bug Something isn't working

Comments

@evergreenbear
Copy link

Environment

  • OS: Void Linux
  • web-greeter version: 3.3.0

Bug description

Running web-greeter --debug as normal user works fine, but there is an error saying "QWidget: Must construct a QApplication before a QWidget" when running with escalated privileges. This causes LightDM to infinitely loop.

Steps to reproduce

Run "web-greeter --no-sandbox" or "web-greeter --debug" as root.

Expected behavior

web-greeter would work while running as root.

Screenshots

web-greeter

@evergreenbear evergreenbear added the bug Something isn't working label Feb 4, 2022
@evergreenbear
Copy link
Author

Reinstalled with the latest commit, I'm now getting "Could not find QtWebEngineProcess" when running as root.

@evergreenbear evergreenbear changed the title Runs without root, breaks with it Running as root breaks, working fine as normal user Feb 4, 2022
@JezerM
Copy link
Owner

JezerM commented Feb 4, 2022

How did you install web-greeter? void-packages should work.

@evergreenbear
Copy link
Author

I installed it by cloning the github repo and running sudo make install

@JezerM
Copy link
Owner

JezerM commented Feb 4, 2022

Well, I mean, which packages did you install?

The following should do it:

sudo xbps-install python3-PyQt5 python3-PyQt5-webengine python3-ruamel.yaml python3-gobject python3-xlib python3-inotify python3-PyQt5-devel-tools qt5-webengine

@evergreenbear
Copy link
Author

Looks like I was missing ruamel and inotify system-wide, but after installing them it still can't find QtWebEngineProcess

@JezerM
Copy link
Owner

JezerM commented Feb 4, 2022

Hmm, that's weird. Did you install these packages with PIP? If you did, you could try to uninstall them and just rely on void packages.

The QtWebEngineProcess should be inside /usr/lib/qt5/libexec/QtWebEngineProcess, from the qt5-webengine package; you can find it with xbps-query -f qt5-webengine | grep -i process. Maybe, try to reinstall web-greeter's packages.

@evergreenbear
Copy link
Author

After reinstalling the packages, I'm getting a new error:
/usr/lib/python3.10/site-packages/PyQt5/QtWebChannel.abi3.so: undefined symbol: _ZdlPvm, version Qt_5

@JezerM
Copy link
Owner

JezerM commented Feb 4, 2022

See the Import errors section of the README. Perhaps, you could try reinstalling qt5-webchannel and python3-PyQt5-webchannel.

@evergreenbear
Copy link
Author

Reinstalled, same issue.

@JezerM
Copy link
Owner

JezerM commented Feb 5, 2022

Well, there's no much I could do about it. Reinstalling is the only solution to this kind of problem: remove related PIP packages inside /usr/lib/python3.10/site-packages/ and ~/.local/lib/python3.10/site-packages/, and reinstall with xbps-install --force. If it doesn't work, maybe you should create an issue either in void-packages or Qt.

However, after doing a little research, seems like the problem comes from the python3 Qt libraries, with the next possibilities:

  • They weren't compiled to your current Python version.
  • You did upgrade Python, but Qt libraries weren't recompiled.
  • Root and user have different libraries or a different Python version (maybe homebrew or other services are interfering)

So, you could try to recompile your Python libraries (though I don't know how to do it), or reinstall all Python Qt related libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants