fflewddur / tophat

View CPU, memory, disk, and network activity in the GNOME top bar.
https://extensions.gnome.org/extension/5219/tophat/
GNU General Public License v3.0
349 stars 26 forks source link

Error: Requiring GTop, version none: Typelib file for namespace 'GTop' (any version) not found #106

Open papanito opened 1 year ago

papanito commented 1 year ago

When starting the extensions I see this

image

In the settings dialog I get this error

Error: Requiring GTop, version none: Typelib file for namespace 'GTop' (any version) not found

Stack trace:
  @/home/papanito/.local/share/gnome-shell/extensions/tophat@fflewddur.github.io/lib/shared.js:24:21
  @/home/papanito/.local/share/gnome-shell/extensions/tophat@fflewddur.github.io/prefs.js:26:16
  _init@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:23:33
  ExtensionPrefsDialog@resource:///org/gnome/Shell/Extensions/js/extensionPrefsDialog.js:10:4
  OpenExtensionPrefsAsync@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:124:33
  async*_handleMethodCall@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:373:35
  _wrapJSObject/<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:408:34
  run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:186:20
  main@resource:///org/gnome/Shell/Extensions/js/main.js:22:13
  run@resource:///org/gnome/gjs/modules/script/package.js:206:19
  start@resource:///org/gnome/gjs/modules/script/package.js:190:8
  @/nix/store/929fwsrap4bswradh8svr3zwpkwl3rzm-gnome-shell-44.2/share/gnome-shell/.org.gnome.Shell.Extensions-wrapped:7:17

Not sure, why it stopped working. I was using it until recently with gnome-shell 44.2 and there was no obvious change.

iammrugesh commented 1 year ago

https://www.linode.com/docs/guides/installing-and-using-gtop-on-linux/ @papanito try this

totargaming commented 1 year ago

https://www.linode.com/docs/guides/installing-and-using-gtop-on-linux/ @papanito try this

gtop is installed ( as well as computer restarted ) and the error still remains, as below capture image

totargaming commented 1 year ago

Update: Problem solved!

$ sudo apt-get update -y $ sudo apt-get install -y gir1.2-gtop-2.0 $ sudo reboot

papanito commented 1 year ago

gtop is installed as well for me, but I still have the issue.

totargaming commented 1 year ago

gtop is installed as well for me, but I still have the issue.

is it still showing that gir binding is still missing?, if that's the case, try my commands, it helped me since i had also try install gtop but gir was still missing

papanito commented 1 year ago

@totargaming well I use nixos not ubuntu or any other derivate so your commands do not help me. Also don't find an alternative library

4JX commented 1 year ago

Stumbled upon this while fixing another extension, NixOS requires special patching to make some stuff work, see for example https://github.com/NixOS/nixpkgs/commit/b59ed689c4bd5bc8394734def7edff7ef602ed7d .

May be able to make a patch for this one at some point, but the above should work as a reference.

xclrr commented 11 months ago

@totargaming well I use nixos not ubuntu or any other derivate so your commands do not help me. Also don't find an alternative library

For nixos 23.11, Gnome 45.1. This will work. environment.variables = { GI_TYPELIB_PATH = "/run/current-system/sw/lib/girepository-1.0"; }; environment.systemPackages = with pkgs; [ libgtop ];

4JX commented 11 months ago

Actually I forgot to ask if you had installed this via nix or some other method. I assume it is the latter since the patch needed for this was done over a year ago https://github.com/NixOS/nixpkgs/commit/5da1db47bf1f4610e86bf744855fa40f937d5949 and it appears to work just fine on my system if installed as a nix package.

image

You should install GNOME extensions via the provided nix packages available at gnomeExtensions.* so that all the patching and quirks are already taken care of. Ie: https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=gnomeExtensions.tophat

You can also check out how I manage them in https://github.com/4JX/nixos-config/tree/b3eed993fb8b931f7e155f30449509ade4385ae4/home/modules/DE/extensions

papanito commented 11 months ago

@4JX I installed it as nixpkg but still faced the issue. Actually the solution from @xclrr solved it. Many thanks

ljuzig commented 10 months ago

I have developed a new extension called Astra Monitor to replace TopHat because of this. On NixOS and other OSes the (temporary) absence of GTop can be a big problem. Initially, it was born as a GTop-free alternative, heavily inspired by TopHat for those with NixOS or those who don't want to install GTop for any reason. Then it evolved into something more, with additional features and soon I'll introduce the choice whether to utilize GTop or not. I basically rewrote it from scratch but I have indeed mentioned @fflewddur both in the code and in the repository because his work was pivotal in achieving my purpose.

fflewddur commented 1 week ago

@ljuzig, just wanted to say that Astra Monitor looks really cool, nice work!

fflewddur commented 1 week ago

I'm re-writing TopHat to remove the GTop dependency, so this should not be an issue after the release of v16 later this year.