-
Notifications
You must be signed in to change notification settings - Fork 3
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
Describe installation as root; systemd service? #3
Comments
Hello, thanks for your interest. Having an option to install as a systemd service is a nice idea, I'll add it soon! Here's an explaination about permissions. So, as for the root permissions. There are a two of ways I see you can organize this:
As for the location of configuration files: even for root it's as the readme says. You can see the location via
|
Also instead of using a systemd service, I recommend you use your DE's autostart. For most environments it's as simple as putting
into |
Thank you for the verbose description of how the permissions work! A few comments: I was particularly interested in using it as a systemd service so that Wzmach can be installed from the AUR and other package repositories, most only provide install scripts or definitions for root installs. I have a hidden agenda: I want to maintain the AUR package(s) and bring you some more stars; visibility encourages software stability. Is there a specific reason you recommend using the distribution's autostart feature, other than the fact that it's popular (read: more correct) to run things as unprivileged users now?
Is this why touchegg often seems to have a bad issue with latency? I find it to be weirdly unreliable, and I wonder if the added complexity with having a dispatcher service and a message handler causes undefined behavior. For example, one longstanding issue with it is that it seems to behave differently after waking up from sleep. It doesn't stop working (anymore, I did report that issue to Jose and he fixed it), but it seems like the gestures are super insensitive. I have to me more "emphatic" with my fingers, if that makes any sense. I think that may be an issue with libinput though, because I notice that two-finger scrolling is buttery smooth after a fresh boot, but after going into hibernate, I have to touch both fingers down at exactly the same time or it doesn't register as a two-finger swipe. I'm partly asking because I'm considering a form of IPC for my own project but it seems like keeping a reliable connection alive can be a real challenge.
I wasn't sure if the XDG Base Directories Specification applied to I'm going to make a draft PR for handling behavior specific to user configs, when the Wzmach is running as root. I have a feeling that this is going to be a fun, complicated little task that should help me be a little more familiar with writing platform-(Linux)-specific Rust. I thought of closing with this comment, but maybe you want to keep it open as a tracking issue for your "option to install as a systemd service". My original question has been effectively answered, thank you. |
Also, is there a reason that you don't have the new GitHub Discussions feature enabled for this repository? I find it quite handy, a nice little forum that can also track progress for the repo. It's good for threads like this, just in case you're unfamiliar. |
Haha, I would love it if your would create a package for repositories! I just don't know how building the distributable packages like deb and rpm works, I had scheduled a figuring it out session for next weekend. I don't advise against global install, I just think that user-local installs are sufficient in most cases. We as a linux community are kind of too fixed on global installations, and I try to lead by example in the opposite direction. Regarding touchegg's latency: I don't think it's caused by RPC. Unix sockets on linux are very fast. Some milliseconds of latency might be caused by how touchegg re-parses config values for each libinput event, but it's shouldn't be that noticable. All the latency stuff is caused by libinput and hardware drivers. On my own notebook (lenovo extreme x1 gen 2) after sleep all touchpad interactions becomes sluggish after waking up: cursor movements, scrolling, but it's not so noticable for gestures since they don't have animations. Also it's less noticable on wayland for some reason. Re: github discussions. I've never used them personally, but I can create them, won't hurt. I plan on leaving github in favour of self-hosted solution, since after some recent events I don't trust big corporations even more. Right now this repo is already a mirror, it's just that the original still doesn't have a website. And yes, I will keep the issue open to track the addition of a systemd unit and a global install script. |
I noticed that this |
Oh yeah, I decided not to search them. =) Initially I though about cascading configs, like how you first load a "config.ron" and then "x11.ron" or "wayland.ron", and then something from the command line, but that did more harm than good: the combinig logic was weird and the error messages became worse. So i moved x11 and wayland sections to the main config. I also thought about how someone would want to run this as a global service, and they would expect a config to go into "/etc/wzmach/config.ron" or something. I don't know, it looks more reasonable than the stupid Maybe the middle ground is for the systemd service to be tied to the user session and run as user? Something like those "wildcard" services: Also a service running as root is harder to restart after a config change. I did want it to auto-reload the config on changes, but with rust it's a lot harder to do than in haskell, and I wanted to finish the 1.0 as soon as possible. |
So anyway, I think that installing in a global location is ok, but running as a global service with global config is not the best way, that DE-local autoloads would work better. |
I misunderstood what the comment meant. I assumed that everything was staying in one config, sorta thought you intended something like described below. I was trying to think of a way to handle searching configs in the following order: Environment variables not used for readability reasons.
When running as a user:
When running as root:
I'm not sure how to determine |
So this thread has grown kind of big and focused on too many things. Let me address them and close this thread.
|
That tracking issue is #10 |
Hello!
I want to replace Touchegg because it's buggy and I like Rust.
Goal: run Wzmach as root, allowing it to be used as a systemd service.
I have a few questions:
sudo chown "$USER:input" wzmach
root:input
or isroot:root
fine?sudo chmod g+s wzmach
g
necessary if the user isroot
?setuid
?2754
. The letter flags have always confused me.wzmach
going to read the configuration file from if it is run by the userroot
? Can I have a default config, and then a config per-user?I'm having a hard time making these decisions myself. I see how services are usually set up, but I've never seen some of this prerequisite setup, and
touchegg
doesn't use theinput
group.I've recently moved from Windows, and I'm still learning the intricacies of Linux. Thanks!
The text was updated successfully, but these errors were encountered: