2
2
Fork
You've already forked gummy
1

Issues controlling gummy from root user #43

Open
opened 2025年01月08日 22:00:33 +01:00 by Ao1Pointblank · 0 comments

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.

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.
Sign in to join this conversation.
No Branch/Tag specified
master
0.6.1
0.6.0
0.5.9
0.5.8
0.5.7
0.5.6
0.5.5
0.5.4
0.5.3
0.5.2
0.5.1
0.5
0.4.1
0.4
0.3
0.2
0.1
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
fusco/gummy#43
Reference in a new issue
fusco/gummy
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?