ahmed-al-balochi/LibreGaming

LibreGaming command works by itself, adding sudo yields "sudo: libregaming: command not found"

stephepush opened this issue · 4 comments

I'm having a strange issue. I added the little script to .bashrc to add LibreGaming to the PATH. I can run LibreGaming commands without sudo fine. When I try to run LibreGaming --gaming or LibreGaming -g I get Please run LibreGaming with sudo or doas command for this flag. I then add sudo and get sudo: libregaming: command not found

To fix this issue, You need to install LibreGaming using sudo. So, for example:
sudo pip install LibreGaming.

I installed on arch / endeavour with
sudo pipx install LibreGaming
but facing similar issue.

Without sudo:
libregaming -g (line 1): Unknown command. '/root/.local/pipx/venvs/libregaming/bin/libregaming' exists but is not an executable file. function libregaming --wraps /root/.local/pipx/venvs/libregaming/bin/libregaming --description 'alias libregaming=/root/.local/pipx/venvs/libregaming/bin/libregaming'; /root/.local/pipx/venvs/libregaming/bin/libregaming $argv ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ in function 'libregaming' with arguments '-g'

With sudo:
sudo libregaming -g [sudo] password for USER: sudo: libregaming: command not found

Remark -
installing with pip & sudo prompts you for potential package breaking, that's why we don't use it and use pipx instead - however, using sudo + pip is not a fix, it's a quick and dirty workaround imo because it potentially breaks systems. - not to an unbootable state or anything like that, but breaks potentally packages that have been working prior.

Thank you for bringing this to my attention. I will take a look once I have time and get back to you.