isDipesh / gnome-shell-extension-sensors

Gnome shell extension: Shows CPU temperature, HDD temperature, voltage and fan RPM
https://motorscript.com/gnome-shell-extension-sensors/
161 stars 153 forks source link

Get rid of sysvinit #48

Closed YangtseSu closed 11 years ago

YangtseSu commented 11 years ago

extensions.js line 81

let ret = GLib.spawn_command_line_sync("pidof hddtemp");

pidof is a tool from sysvinit,which not all of us have installed. Gnome now use systemd,which do not have this command. Why not use systemctl show hddtemp.service -p ActiveState to get status systemctl show hddtemp.service -p MainPID to get pid.

farsx commented 11 years ago

I understand your concern but on some distribution, Debian most notably, sysvinit is the default init-system and systemd is not installed. An approach could be to try both methods (pidof and systemctl) but it's not so clean...

adrianbroher commented 11 years ago

Implemented.

Please open a new issue if there are bugs with this implementation.