tophat icon indicating copy to clipboard operation
tophat copied to clipboard

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

Open papanito opened this issue 1 year ago • 11 comments

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/[email protected]/lib/shared.js:24:21
  @/home/papanito/.local/share/gnome-shell/extensions/[email protected]/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.

papanito avatar Sep 03 '23 14:09 papanito

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

iammrugesh avatar Sep 24 '23 14:09 iammrugesh

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 avatar Oct 05 '23 02:10 totargaming

Update: Problem solved!

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

totargaming avatar Oct 05 '23 02:10 totargaming

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

papanito avatar Oct 10 '23 08:10 papanito

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

totargaming avatar Oct 10 '23 08:10 totargaming

@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

papanito avatar Oct 10 '23 12:10 papanito

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.

4JX avatar Nov 26 '23 13:11 4JX

@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 ];

xclrr avatar Dec 09 '23 08:12 xclrr

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

4JX avatar Dec 09 '23 13:12 4JX

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

papanito avatar Dec 09 '23 18:12 papanito

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.

ljuzig avatar Jan 11 '24 23:01 ljuzig