[Unit]
Description=xremap service
After=default.target
[Service]
ExecStart=/usr/bin/xremap /home/komamitsu/xremap.yml
[Install]
WantedBy=default.target
sudo systemctl enable xremap.service
sudo systemctl start xremap.service
(Thank you https://github.com/dcraig327!)
Add the user to input
group if it's not added.
sudo gpasswd -a YOUR_USER input
Then, execute the following command if /etc/udev/rules.d/input.rules
doesn't have the entry.
echo 'KERNEL=="uinput", GROUP="input", TAG+="uaccess"' | sudo tee /etc/udev/rules.d/input.rules
[Unit]
Description=xremap
After=default.target
[Service]
ExecStart=%h/.cargo/bin/xremap %h/.config/xremap/config.yml
StandardOutput=journal
StandardError=journal
Restart=always
[Install]
WantedBy=default.target
systemctl --user enable xremap.service
systemctl --user start xremap.service
Thank you. This also works to run as a user service.
$HOME/.config/systemd/user/xremap.service
Installation follow the rust instructions, then install the service
Check status or errors
Editing and saving the new changes in config.yml file should auto-update without any extra work. In case it doesn't, find the error. After fixing the error in the service file reload it.
Uninstallation