-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cryo_utilities CLI fails writting cryoutilities.log to /root #124
Comments
Did you install CU using the script, or did you just download the binary? |
Installed with the script. Like you show in this video.
https://youtu.be/C9EjXYZUqUs
…On Thu, Mar 23, 2023, 10:14 PM CryoByte33 ***@***.***> wrote:
Did you install CU using the script, or did you just download the binary?
—
Reply to this email directly, view it on GitHub
<#124 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB2RQVF3L5CPPXLARQXIADW5UUUZANCNFSM6AAAAAAWGBKSRQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Interesting, I'll try to replicate today but I'm curious why it thinks $HOME is /root when using sudo on your device but not mine. Thank you for the report! |
Yea NP. FWIW I don't see anything set in my sudoers file which would preserve the environment. Removing my hack and using 'sudo -E .cryo_utilities/cryo_utilities help' works. Perhaps there is a difference here: (130)(deck@steamdeck ~)$ sudo cat /etc/os-release |
This happened for me as well. I believe by default Here is (130)(deck@steamdeck ~)$ sudo env
COLORTERM=truecolor
LANGUAGE=
XAUTHORITY=/run/user/1000/53ae5570-b101-13e1-a124-521e3c501831
LANG=en_US.UTF-8
TERM=xterm-256color
DISPLAY=:0
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/home/deck/.local/share/flatpak/exports/bin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/deck/.local/bin:/home/deck/.local/podman/bin
MAIL=/var/mail/root
LOGNAME=root
USER=root
HOME=/root
SHELL=/bin/bash
SUDO_COMMAND=/usr/bin/env
SUDO_USER=deck
SUDO_UID=1000
SUDO_GID=1000 I have only glanced at the code. Assuming most of the commands are things needed to be ran as root, this should be okay. But anything touching user (e.g. It's a little tricky with the deck, since you can't install a binary to, say, You can see how the decky installer handles this. Pretty much what the stackoverflow link says. Although they also mix For a log file, as long as you're not logging a ton it's probably okay to leave in the home directory. If the log needs to persist through reboots, you can't really do Also, would be nice to have the option to put the binary in edit: So the GUI does not attempt to write the log as root, which makes sense. It's run as edit2: this occurs on debian as well. Haha TIL! Looks like I have more to learn. edit3: This is actually a recent-ish linux feature specifically regarding writing to |
This is occurring for myself as well.
|
@CryoByte33 I ran into this error as well. I worked around it it by running Using Due to the use of the (deck@sdeck ~)$ sudo env
LANG=en_US.UTF-8
TERM=xterm-256color
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/home/deck/.local/share/flatpak/exports/bin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
MAIL=/var/mail/root
LOGNAME=root
USER=root
HOME=/root
SHELL=/bin/bash
SUDO_COMMAND=/usr/bin/env
SUDO_USER=deck
SUDO_UID=1000
SUDO_GID=1000 (5)(deck@sdeck-spk ~)$ sudo -E env
SHELL=/bin/bash
LIBVA_DRIVER_NAME=radeonsi
EDITOR=vim
PWD=/home/deck
LOGNAME=root
XDG_SESSION_TYPE=tty
MOTD_SHOWN=pam
HOME=/home/deck
LANG=en_US.UTF-8
SSH_CONNECTION=192.168.15.171 52665 192.168.15.42 9022
XDG_SESSION_CLASS=user
TERM=xterm-256color
USER=root
DRACUT_NO_XATTR=1
SHLVL=1
MOZ_ENABLE_WAYLAND=1
MOZ_USE_XINPUT2=1
XDG_SESSION_ID=5
XDG_RUNTIME_DIR=/run/user/1000
SSH_CLIENT=192.168.15.171 52665 9022
DEBUGINFOD_URLS=https://debuginfod.archlinux.org
XDG_DATA_DIRS=/home/deck/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/home/deck/.local/share/flatpak/exports/bin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
MAIL=/var/spool/mail/deck
SSH_TTY=/dev/pts/0
_=/usr/bin/sudo
SUDO_COMMAND=/usr/bin/env
SUDO_USER=deck
SUDO_UID=1000
SUDO_GID=1000 |
I ran the CLI per your video and got the following error. I got around this by creating the /root/.cryo_utilities directory and everything ran fine.
I did not use the CLI to configure anything. From what I can tell everything worked with the GUI. So this is likely not a big deal as most users are probably not going to use the CLI.
(deck@steamdeck .cryo_utilities)$ sudo ./cryo_utilities help
2023/03/23 20:00:43 open /root/.cryo_utilities/cryoutilities.log: no such file or directory
panic: open /root/.cryo_utilities/cryoutilities.log: no such file or directory
goroutine 1 [running, locked to thread]:
log.Panic({0xc00022feb0?, 0x27?, 0x42?})
/opt/hostedtoolcache/go/1.20.2/x64/src/log/log.go:384 +0x65
main.main()
/home/runner/work/steam-deck-utilities/steam-deck-utilities/cmd/cryoutilities/main.go:37 +0xb1
The text was updated successfully, but these errors were encountered: