Slimbook-Team / slimbookbattery

Slimbook Battery 4
https://slimbook.es/en/tutoriales/aplicaciones-slimbook/398-slimbook-battery-3-application-for-optimize-battery-of-your-laptop
GNU General Public License v3.0
246 stars 17 forks source link

Slimbook Battery is not starting even though no other instance of it is running #110

Open byteManiak opened 1 year ago

byteManiak commented 1 year ago

Description Slimbook Battery is not starting, it only says "Slimbook Battery is in execution". However, no other instance of it is running.

Evidence Steps to reproduce the behavior:

  1. Run slimbookbattery from terminal

Desktop (please complete the following information):

Expected behavior The Slimbook Battery GUI shows

Additional context It looks like there is a problem with the Python script that starts the GUI. In the snippet below, pgrep returns greater than 1 even though there is no slimbookbatterypreferences running:

    pgrep = subprocess.getoutput("pgrep -f slimbookbatterypreferences")
    num_proc_running = pgrep.split('\n')
    if len(num_proc_running) > 1:
        sys.stdout.write("Slimbook Battery is in execution\n")
    elif args.minimize:
        subprocess.run(['/usr/bin/env', 'python3', '/usr/share/slimbookbattery/src/slimbookbatteryindicator.py'])
    else:
        subprocess.run(['/usr/bin/env', 'python3', '/usr/share/slimbookbattery/src/slimbookbatterypreferences.py'])

Output of pgrep -f slimbookbatterypreferences is blank:

[byte@Lenny ~]$ pgrep -f slimbookbatterypreferences
[byte@Lenny ~]$
brisvag commented 1 year ago

Having the same issues; the code on main actually contains the fix, it's just unreleased. Can we get a release @slimbook, or is there something else blocking?

slimbook commented 1 year ago

This is not tested yet, but I built a binary: https://github.com/Slimbook-Team/slimbookbattery/releases/tag/v4.0.9beta I'll test it tomorrow and upload it to launchpad if everything is okey

slarse commented 1 year ago

@slimbook I have the exact same problem as @byteManiak using slimbookbattery v4.0.8. My setup is similar:

Desktop (please complete the following information):

Additional context:

v4.0.9 you linked above solves the problem for me.