-
Notifications
You must be signed in to change notification settings - Fork 27
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
Allow running without root #12
Allow running without root #12
Conversation
A typo was causing an errors.
It can be called as steam-buddy@username like so: systemctl start steam-buddy@gamer
steam-buddy
Outdated
DATA_DIR = '/var/lib/steam-buddy' | ||
else: | ||
HOST_PORT = 8080 | ||
DATA_DIR = os.path.join(os.path.expanduser('~'), '.local/share/steam-buddy') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to honour the XDG_DATA_HOME
environment variable as well. ~/.local/share
is only the default location. See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, it now uses the XDG_DATA_HOME
when possible, otherwise it falls back to ~/.local/share
.
@@ -0,0 +1,16 @@ | |||
[Unit] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still need the other service file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. Possibly not, but if you still want to be able to run as root you may want to keep it. I haven't really tested running the new service file as root and running it as steam-buddy@root is a bit weird. It probably does work, though.
This allows steam-buddy to be started as a regular user. When not running as root, you may notice the following differences:
~/.local/share/steam-buddy
. This one will require a small change to steam-shortcuts.To start steam-buddy as a regular user, you can either just run the application directly or use the newly included
steam-buddy@
service file. Once installed in/etc/systemd/system/
this file can be used withsystemctl start steam-buddy@username
. Enabling it as the gamer user would be done withsudo systemctl enable steam-buddy@gamer
.This pull request fixes issue #9