JezerM / web-greeter

A modern, visually appealing greeter for LightDM.
https://web-greeter-page.vercel.app
GNU General Public License v3.0
211 stars 12 forks source link

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

Open evergreenbear opened 2 years ago

evergreenbear commented 2 years ago

Environment

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 commented 2 years ago

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

JezerM commented 2 years ago

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

evergreenbear commented 2 years ago

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

JezerM commented 2 years ago

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 commented 2 years ago

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

JezerM commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

evergreenbear commented 2 years ago

Reinstalled, same issue.

JezerM commented 2 years ago

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:

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.