I have a script in /lib/systemd/system-sleep/ which runs a few commands before/after the computer suspends.
I would like to have a command that makes gummy immediately stop or reset when date +%H is greater than 09 (make screen brightness/temp revert to default when the computer is woken up after 9am).
However, I am running into some issues getting gummy to do anything when interacted with from the root user. I have even made attempts with sudo -u <my_user> and su - <my_user> and also doas.
Some of the errors i get when testing these commands directly from terminal in root user:
attempting to run gummy as root
[root@monolith ~]# gummy -T 0 -t 6500
terminate called after throwing an instance of 'std::__ios_failure'
what(): basic_ios::clear: iostream error
Aborted (core dumped)
running from root as my user with su
[root@monolith ~]# su - pointblank gummy status
/usr/bin/gummy: /usr/bin/gummy: cannot execute binary file
running from root as my user with sudo
[root@monolith ~]# sudo -u pointblank gummy status
terminate called after throwing an instance of 'std::runtime_error'
what(): [lockfile] open() failed
Aborted
I also have some journalctl -f output:
Jan 08 15:51:08 monolith systemd-coredump[364460]: [🡕] Process 364457 (gummy) of user 0 terminated abnormally without generating a coredump.
with this one, I ran it from tty3, but specified DISPLAY=:0 before the gummy command, just in case:
Jan 08 15:57:57 monolith systemd-coredump[368207]: [🡕] Process 368204 (gummy) of user 1000 dumped core.
Stack trace of thread 368204:
#0 0x0000766b049b63f4 n/a (libc.so.6 + 0x963f4)
#1 0x0000766b0495d120 raise (libc.so.6 + 0x3d120)
#2 0x0000766b049444c3 abort (libc.so.6 + 0x244c3)
#3 0x0000766b04c97b2c _ZN9__gnu_cxx27__verbose_terminate_handlerEv (libstdc++.so.6 + 0x97b2c)
#4 0x0000766b04cadf3a _ZN10__cxxabiv111__terminateEPFvvE (libstdc++.so.6 + 0xadf3a)
#5 0x0000766b04c9752a _ZSt9terminatev (libstdc++.so.6 + 0x9752a)
#6 0x0000766b04cae1f6 __cxa_throw (libstdc++.so.6 + 0xae1f6)
#7 0x00006001846aeedc n/a (/usr/bin/gummy + 0x9edc)
#8 0x00006001846b87d8 n/a (/usr/bin/gummy + 0x137d8)
#9 0x0000766b04945e08 n/a (libc.so.6 + 0x25e08)
#10 0x0000766b04945ecc __libc_start_main (libc.so.6 + 0x25ecc)
#11 0x00006001846af725 n/a (/usr/bin/gummy + 0xa725)
ELF object binary architecture: AMD x86-64
I think that is all I managed to do. I hope this means something useful.