Open Tiger-Tom opened 3 years ago
ReplaySorcery is designed to be init-system neutral even with the ability to launch it directly from the command-line without putting it inside a service.
I added systemd service files since a very large majority of Linux desktops use systemd (and unless you have something specifically against systemd, I would recommend using a systemd-based distro like Arch [which Artix is based off]. This isn't going to be the only project you find that only has systemd support).
I've been thinking about adding support for other init-systems but so far it hasn't been worth the effort. I can't seem to find much documentation on OpenRC but if you know how to write its service files feel free to open a PR :)
Well, I'm still pretty new to OpenRC, but I managed to find this code to run WireGuard using OpenRC:
#!/sbin/openrc-run
depend() {
need localmount
need net
}
start() {
ebegin "Starting wireguard"
/usr/bin/wg-quick up warp
eend $?
}
stop() {
ebegin "Stopping wireguard"
/usr/bin/wg-quick down warp
eend $?
}
When placed in the /etc/init.d directory, I can use it as a service. Is this the type of thing that ReplaySorcery could use? If so, I could probably try to figure out how to make an init script for it.
OK, so I made an init script for it, but I'm still facing a problem: when I start it through the service, I get this output:
Failed to open config file '/usr/etc/replay-sorcery.conf': No such file or directory
Failed to open config file '/root/.config/replay-sorcery.conf': No such file or directory
ReplaySorcery Copyright (C) 2020-2021 ReplaySorcery developers
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; see COPYING for details.
FFmpeg version: n4.4
No protocol specified
Failed to connect to X11 server: Broken pipe
Could not detect X11 display size
Failed to create X11 device: Function not implemented
Function not implemented
* start-stop-daemon: failed to start `/bin/replay-sorcery'
* Failed to start ReplaySorcery Daemon [ !! ]
* ERROR: replay-sorcery failed to start
I think that I've managed to make it so that it runs when I need it to, but I can't do anything if the program doesn't run in the first place. (Also, on a side note, can you please tell me how to make it only select one monitor? I can't seem to figure it out. Still sort of new to Linux with a GUI.)
Here's the actual init script, if you needed to see it:
#!/sbin/openrc-run
# Init script by Tiger-Tom on GitHub, ReplaySorcery by matanui159
name="ReplaySorcery Daemon"
command=/bin/replay-sorcery
depend() {
need xdm
}
I should note, running it regularly works perfectly.
Looks like its running as root. The replay-sorcery-kms
service needs to run as root but the replay-sorcery
service needs to run as a user program
Please add OpenRC support!
I think that those who don't have systemctl will appreciate this, so I though that I'd request for you to add support for OpenRC. For instance, when I try to run "sudo rc-update add replay-sorcery default", I get "service `replay-sorcery' does not exist. I really hope that you can add this (or any other similar things), because I recently came free from the clutches of Windows 10 and decided to install Artix, and was disappointing when I couldn't find any instant replay solutions.
Thank you!