JezerM/web-greeter

Cannot open web-greeter

Closed this issue · 20 comments

Environment

  • OS: Fedora 35
  • web-greeter version: 3.3.0

Bug description

I cannot launch web-greeter at all in Fedora 35 after building it from source, even if using debug parameter, I get following errors:
2022-02-03 08:28:03 [ ERROR ] acpi - acpi.py:20 : init | ACPI: acpi_listen does not exists
2022-02-03 08:28:03 [ ERROR ] Greeter - Greeter.py:97 : init | lightdm_greeter_error: Unable to determine socket to daemon (1)
QWidget: Must construct a QApplication before a QWidget
Aborted (core dumped)

Steps to reproduce

Type web-greeter or web-greeter --debug in Terminal

Expected behavior

Web greeter would launch and I would be able to use my Windows XP login theme

Screenshots

Screenshot from 2022-02-03 08-31-00

You could try to add X-LightDM-Allow-Greeter=true inside your xsession (in /usr/share/xsessions/). Then, log out and log back in (with another greeter or lightdm's infinite loop will start); this should solve the Unable to determine socket to daemon error.

However, I cannot promise that it will work as there's an ongoing unknown issue with Fedora and web-greeter (#19), maybe related to some broke packages in Fedora.

Also, could you provide your Python version?

I've tried adding that line already, it did not work, here's a picture:
image and my Python version is 3.10.2.
Also, do I need to have LightDM as the active display manager or can I still use GDM as of the time span?

You don't need to have LightDM as the main display manager, buy you still need it to be installed if you're using lightdm greeters in a Desktop Environment or Window Manager.

I'll try to check about the Fedora issue, but as I said before, surely it won't work with no apparent reason.

It should be fixed now in the latest commit: a8d2bf3

You can check it out and test if it does work~

Ok, but now I have a new issue trying to compile the latest commit:
make: ./venv/bin/pyrcc5: No such file or directory
make: *** [Makefile:70: ~/Downloads/web-greeter/build/web-greeter/resources.py] Error 127

Could you provide the full log?

sudo make install
Bash completion to install at: /usr/share/bash-completion/completions
No ZSH completion
✔ Dist files copied
✔ Config copied
make: ./venv/bin/pyrcc5: No such file or directory
make: *** [Makefile:70: ~/Downloads/web-greeter/build/web-greeter/resources.py] Error 127

Hmm, do a sudo make clean and make build, and provide the log~

sudo make clean
Bash completion to install at: /usr/share/bash-completion/completions
No ZSH completion
rm -rf venv ~/Downloads/web-greeter/build/install_root ~/Downloads/web-greeter/build/dist ~/Downloads/web-greeter/build/web-greeter

Bash completion to install at: /usr/share/bash-completion/completions
No ZSH completion
python3 -m venv venv
./venv/bin/pip install -r requirements.txt
Collecting PyGObject
Using cached PyGObject-3.42.0.tar.gz (716 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting PyQt5
Using cached PyQt5-5.15.6-cp36-abi3-manylinux1_x86_64.whl (8.3 MB)
Collecting PyQtWebEngine
Using cached PyQtWebEngine-5.15.5-cp36-abi3-manylinux1_x86_64.whl (228 kB)
Collecting ruamel.yaml
Using cached ruamel.yaml-0.17.20-py3-none-any.whl (109 kB)
Collecting pyinotify
Using cached pyinotify-0.9.6.tar.gz (60 kB)
Collecting pycairo>=1.16.0
Using cached pycairo-1.20.1-cp310-cp310-linux_x86_64.whl
Collecting PyQt5-Qt5>=5.15.2
Using cached PyQt5_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl (59.9 MB)
Collecting PyQt5-sip<13,>=12.8
Using cached PyQt5_sip-12.9.1-cp310-cp310-manylinux1_x86_64.whl (351 kB)
Collecting PyQtWebEngine-Qt5>=5.15.2
Using cached PyQtWebEngine_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl (67.5 MB)
Collecting ruamel.yaml.clib>=0.2.6
Using cached ruamel.yaml.clib-0.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (519 kB)
Using legacy 'setup.py install' for pyinotify, since package 'wheel' is not installed.
Building wheels for collected packages: PyGObject
Building wheel for PyGObject (PEP 517) ... error
ERROR: Command errored out with exit status 1:

So, install cairo-devel, gobject-introspection and python3-wheel. Also, you should have gcc, pkg-config, libxcb-devel and libx11-devel.

Then, do sudo make clean and make build.

The log should be something like this:

❯ docker run -v ${PWD}:/build:rw web-greeter:latest bash -c "make build"
No Bash completion
No ZSH completion
python3 -m venv venv
./venv/bin/pip install -r requirements.txt
Collecting PyGObject
  Downloading PyGObject-3.42.0.tar.gz (716 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
Collecting PyQt5
  Downloading PyQt5-5.15.6-cp36-abi3-manylinux1_x86_64.whl (8.3 MB)
Collecting PyQtWebEngine
  Downloading PyQtWebEngine-5.15.5-cp36-abi3-manylinux1_x86_64.whl (228 kB)
Collecting ruamel.yaml
  Downloading ruamel.yaml-0.17.20-py3-none-any.whl (109 kB)
Collecting pyinotify
  Downloading pyinotify-0.9.6.tar.gz (60 kB)
Processing /root/.cache/pip/wheels/7e/ba/dc/6688e3cf50462094cd938a481411e59ae185c73474f250fbe3/pycairo-1.20.1-cp38-cp38-linux_x86_64.whl
Collecting PyQt5-Qt5>=5.15.2
  Downloading PyQt5_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl (59.9 MB)
Collecting PyQt5-sip<13,>=12.8
  Downloading PyQt5_sip-12.9.1-cp38-cp38-manylinux1_x86_64.whl (353 kB)
Collecting PyQtWebEngine-Qt5>=5.15.2
  Downloading PyQtWebEngine_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl (67.5 MB)
Collecting ruamel.yaml.clib>=0.2.6; platform_python_implementation == "CPython" and python_version < "3.11"
  Downloading ruamel.yaml.clib-0.2.6-cp38-cp38-manylinux1_x86_64.whl (570 kB)
Building wheels for collected packages: PyGObject, pyinotify
  Building wheel for PyGObject (PEP 517): started
  Building wheel for PyGObject (PEP 517): finished with status 'done'
  Created wheel for PyGObject: filename=PyGObject-3.42.0-cp38-cp38-linux_x86_64.whl size=868845 sha256=3a26bb17f8be4905287e2acf6041dcfb781df94f36b01be9cef9880795498681
  Stored in directory: /root/.cache/pip/wheels/d7/c9/c1/b1a55bb0d533707eb1f730c8d82f9ef255c167bafc7a00824a
  Building wheel for pyinotify (setup.py): started
  Building wheel for pyinotify (setup.py): finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /build/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-feb09gyf/pyinotify/setup.py'"'"'; __file__='"'"'/tmp/pip-install-feb09gyf/pyinotify/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-i53tzgqy
       cwd: /tmp/pip-install-feb09gyf/pyinotify/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help

  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for pyinotify
  Running setup.py clean for pyinotify
Successfully built PyGObject
Failed to build pyinotify
Installing collected packages: pycairo, PyGObject, PyQt5-Qt5, PyQt5-sip, PyQt5, PyQtWebEngine-Qt5, PyQtWebEngine, ruamel.yaml.clib, ruamel.yaml, pyinotify
    Running setup.py install for pyinotify: started
    Running setup.py install for pyinotify: finished with status 'done'
Successfully installed PyGObject-3.42.0 PyQt5-5.15.6 PyQt5-Qt5-5.15.2 PyQt5-sip-12.9.1 PyQtWebEngine-5.15.5 PyQtWebEngine-Qt5-5.15.2 pycairo-1.20.1 pyinotify-0.9.6 ruamel.yaml-0.17.20 ruamel.yaml.clib-0.2.6
✔ Install root created at /build/build/install_root
✔ Dist directory created at /build/build/dist
✔ Dist files copied
✔ Config copied
 Gruvbox theme copied
 Dracula theme copied
 Simple theme copied
 Theme vendors copied
✔ Build directory created at /build/build/web-greeter
✔ Resources compiled with pyrcc5
✔ Screensaver.so compiled
✔ web-greeter binary copied
✔ Build succeded

It was made with an Ubuntu dockerfile with the required dependencies. Even if pyinotify fails to build in the venv, it should work as long as you have it installed globally (with fedora packages) and pyrcc5 is available inside ./venv/bin/ (unless pyqt5 fails in venv).

Ok, build succeeded but now I got this:
web-greeter
/usr/bin/env: ‘bash\npython3 /usr/lib/web-greeter $@’: No such file or directory
/usr/bin/env: use -[v]S to pass options in shebang lines

Nice, now seems a Makefile error. Try to build with the latest commit eeebb6b: sudo make clean and make build.

The content of /usr/bin/web-greeter should be the following:

#!/usr/bin/env bash
python3 /usr/lib/web-greeter $@

Do I need to have LightDM enabled or am I missing something?
web-greeter
2022-02-09 10:03:52 [ DEBUG ] screensaver - screensaver.py:57 : set_screensaver | Screensaver timeout set
2022-02-09 10:03:52 [ DEBUG ] browser - browser.py:246 : init | Initializing Browser Window
Could not find QtWebEngineProcess
/usr/bin/web-greeter: line 2: 5609 Aborted (core dumped) python3 /usr/lib/web-greeter $@

LighDM is not needed to be enabled. Why does this happen? I don't know. web-greeter just doesn't work in Fedora for some weird reason... This may be related to #19.

Sadly, there's nothing I can do about it, though I could try more testing in the next days.

Oof, guess I'll just wait.

I managed to get nody-greeter working, but it's saying it cannot connect to socket. Also, my LightDM has error start request too quickly. How do I fix this? I'm one step closer to fixing this issue...

Create an issue in nody-greeter to track this and provide more info :D

Guess I'll mark this as solved then! :D

I'd like to think that this issue is not solved but a duplicate of #19. Anyways, thanks for putting your effort intro trying to solve this issue~

It is look like in case of "Unable to determine socket to daemon" web-greeter tries to show dialog:

dia = Dialog(

which produces the issue with Qt. As I understand QApplication is not fully created at the moment that is why it produces the sigabort.

I've commented out the dialog (99-108 lines) and web-greeter starts normally for me