-
Notifications
You must be signed in to change notification settings - Fork 7
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
systemd support for wayland systems #148
Comments
@Kommynct the shared upstream library is xslendix/libvinput that is used to do input capture, you should file this issue there instead. |
@Raymo111 it is on Nexus to create such systemd service. It makes literally no sense for a library to run as a daemon. You could have a systemd user service though that starts with a desktop target. |
Yes which is literally the whole point of Nexus. You can have a systemd service that just executes Nexus. That's literally all there is to it. [Unit]
Description=Nexus
[Service]
ExecStart=/path/to/nexus
Restart=always
RestartSec=3
[Install]
WantedBy=graphical-session.target |
it's incorrect that that's all there is to it, really. Nexus is meant to be used to log character entry to find lists of most commonly used words, as the note in the readme says, it lacks wayland compatibility, the workaround is to enable xwayland and enable a setting that is a massive security risk, and doesn't exist as a result on most compositors. The only way to get full wayland compatibility (no xwayland) working properly is a system service, I want this working on all wayland systems instead of just kde with a major security risk enabled. |
Can you elaborate on this? |
https://github.com/jtroo/kanata https://github.com/rvaiya/keyd ^^these work independently of X and wayland, they allow remapping your keyboards by creating a virtual input device, something very similar could be used here to get rid of the dependency on X. They even work without a GUI at all in the tty. You have two options here, you either use root and launch them every time that way, or you create a systemd service, which avoids the necessity of calling sudo/whatever every time. considering X.org is actively being phased out, for linux support on most desktops these days, there is no alternative to doing it this way. as for why this is necessary, wayland doesn't allow programs to snoop on keyboard inputs, to avoid keyloggers running unpriviledged clients, the workaround listed on your page opens up a major security flaw, it makes it so that any xwayland client can read whatever you're typing, this would be much much more secure and work absolutely everywhere instead of only kde (and who knows if kde will even keep this horrible workaround). I do use kanata currently, and would like this to be compatible with it, however. I don't know if that's doable, no idea if this would interfere. |
@Raymo111 From what I understand, this would require reworking how the structure of the application works, having it run as some sort of server that continuously runs in the background. The GUI can stay there as it is currently, but instead of working with logic it interfaces with the server's API. For example you could have an HTTP server that has a /log/begin or /log/status or /log/words?page=1 etc |
I don't think this has anything to do with the GUI, since there's a fully featured CLI. Didn't you tell me at one point that with the uinput rewrite, libvinput can be used in TTYs? |
This is still true.
It does, those need to be switched from calling the logger logic directly to using the API of a new Nexus daemon. You could have the server start and have the lifetime of the interface though and it would be the same as it is now. This ensures keys are captured if you want even at boot time, where the rest of services are started. I think this is what OP wants. |
To be clear, I do want that, but I also want to ensure there's no xwayland dependency whatsoever, due to, again, the massive security implications. |
xwayland is just a way to interface with X11 applications on Wayland compositors. |
there being no xwayland dependency doesn't mean remove support for x11, it just means on wayland, if there is no xwayland at all, it should still work. However, i'm fairly certain they actually do not need to support x11, for the same reason keyd and kanata do not need to support x11, they use lower-level interception than either wayland or x11 and as a result do not depend on them at all. Again, doing things this way is more secure and will work on everything, even like, arcan. |
Currently on Wayland, nexus works out of the box, with no need for XWayland. I don't think anything else is needed. |
The only good way to log characters on linux wayland systems is by using systemd in the same way as kanata/keyd and others do.
This would also work for x11 so it's just a better way of doing things all around linux-side.
The text was updated successfully, but these errors were encountered: