Running using systemd doesn't see the configuration
hoshsadiq opened this issue · 6 comments
So after I raised #21 I realised that when I run gebaard using systemd it doesn't pick up any gestures, so after debugging, I tried realised the reason is that systemd runs the binary as root, ergo it's probably reading the gestures config from root as well. I'm guessing there is currently no functionality to get this corrected. Any chance we can get it to look for the current logged in user's config file?
Make it a user level systemd unit ;)
Cool, would you be up for allowing this functionality? Reason is that I am planning to install this on multi-user desktops, and while I will have root access, it's just simpler and easier to not let user's have access over it.
You do not need root access for that at all, you should read https://wiki.archlinux.org/index.php/Systemd/User for the proper way of letting users start systemd services for themselfes.
I'm trying to take the control away from users so they don't have to do it. Also, I'm running into a problem where the unit just isn't starting up when the computer starts unless I manually run systemctl --user start gebaard
. Any ideas why that might be?
You have probably forgotten to enable the service.
Also I think that automatically enabling it for every user is not the right choice. It is common practise to vendor disable the services for such programs, then users can enable them themself.
What should probably be done, that in the packaging process, the existing desktop file is installed system wide, such that users can enable Autostart in their desktop environment with a graphical menu, like this: https://camo.githubusercontent.com/638b3ec563d8b1e0a05a04610c889facb43b7f64/68747470733a2f2f692e696d6775722e636f6d2f4f7849654c376c2e706e67
You have probably forgotten to enable the service.
I have enabled it, but still when I get logged in, it won't start up without me manually starting it.
$ systemctl --user status gebaard
● gebaard.service - Gebaar Daemon
Loaded: loaded (/home/hosh/.config/systemd/user/gebaard.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2019-04-06 23:55:15 BST; 3 days ago
Docs: https://github.com/Coffee2CodeNL/gebaar-libinput
Main PID: 4350 (gebaard)
CGroup: /user.slice/user-1000.slice/user@1000.service/gebaard.service
└─4350 /usr/local/bin/gebaard
What should probably be done, that in the packaging process, the existing desktop file is installed system wide, such that users can enable Autostart in their desktop environment with a graphical menu
Personally I think gebaard
is more a thing that should be managed by whatever init system is in use rather than as a desktop entry.