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

Error out when starting the program in EGLFS mode, if the user can't access the input files #1124

Open
Lokito23 opened this issue Jun 28, 2024 · 4 comments
Labels
bug-qt A bug or issue in Qt os-linux Linux specific issue

Comments

@Lokito23
Copy link

The problem

If you start Pegasus using EGLFS on Linux, but don't have access to the input files (/dev/input/), all input stops working.

The program still runs, but you lost the control over the whole computer, with the only way to stop it being to shutdown.

A solution

Detect if the user is on Linux, and if he is, detect if he has access to /dev/input/ directory, if not, crash the program and throw an error that recommends the user to either modify the permissions on the input files, or to add themselves to the input group.

@mmatyas
Copy link
Owner

mmatyas commented Jun 30, 2024

I believe this might be a Qt issue; Pegasus itself doesn't do anything platform-specific as accessing /dev/input/, it receives input through Qt and/or SDL2. It seems on EGLFS, Qt processes input depending on the input plugin you use/built Qt with, see https://doc.qt.io/qt-5/inputs-linux-device.html. If you can reproduce this with other Qt apps (eg. Qt's own demos), you could report it to the Qt devs here: https://bugreports.qt.io/browse/QTBUG

@mmatyas mmatyas added bug-qt A bug or issue in Qt and removed feature labels Jun 30, 2024
@Lokito23
Copy link
Author

Understood, I'll test soon

@Lokito23
Copy link
Author

It happens in Dolphin (the file explorer), and Kate too, so it seems to be QT related, however I am not sure about it being a bug.

From what I have seen, they want the user to have access to the input files, which, unless you are inside the input group, or have changed the permissions of them, you do not have it. My guess is that it's security related.

As for asking QT to add a crash handler for this, I doubt it could work. You can still use EGLFS without input, for example on a billboard, so I think they will just say it's intended, or that it should be done application side.

@Lokito23
Copy link
Author

Lokito23 commented Jun 30, 2024

But if needed, I can still file the bug, just that the odds are that it's intended for security reasons.

EDIT: Decided to open an issue anyways.

@mmatyas mmatyas added the os-linux Linux specific issue label Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-qt A bug or issue in Qt os-linux Linux specific issue
Projects
None yet
Development

No branches or pull requests

2 participants