Skip to content
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

Unable to Autostart glances using the systemd instructions [SOLVED] #2673

Closed
ddetton opened this issue Feb 6, 2024 · 2 comments
Closed

Unable to Autostart glances using the systemd instructions [SOLVED] #2673

ddetton opened this issue Feb 6, 2024 · 2 comments

Comments

@ddetton
Copy link

ddetton commented Feb 6, 2024

[SOLVED] See first comment below.

I followed the instructions from here to autostart glances using systemd.
https://github.com/nicolargo/glances/wiki/Start-Glances-through-Systemd

=====================================
After systemctl enable and start, I run systemctl status glances.service, I get this:
image

====================================
My glances.service file looks like this:
image

===================================
My Operating System:
image

===================================
My Glances & psutil versions
image

==================================
My Install method:

pip install --user 'glances[all]'

It was installed in $HOME/.local/bin. I added this to my path in my .zshrc script. I can run 'glances -w' just fine from the terminal and it responds to the REST API calls. I just can not get it to autostart with systemd. I am open to other autostart methods if systemd is not going to work for me.

Thanks!

@ddetton ddetton changed the title Unable to Autostart glances on pop-os 22.04 using the systemd instructions Unable to Autostart glances using the systemd instructions Feb 6, 2024
@ddetton ddetton changed the title Unable to Autostart glances using the systemd instructions Unable to Autostart glances using the systemd instructions [SOLVED] Feb 7, 2024
@ddetton
Copy link
Author

ddetton commented Feb 7, 2024

This stackoverflow article solved this issue for me.

https://stackoverflow.com/questions/35641414/python-import-of-local-module-failing-when-run-as-systemd-systemctl-service

I needed to tell systemd which user to run as. I also put in WorkingDirectory but don't know if that was required or not.

@nicolargo
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants