webmastak / gnome-shell-extensions-mediaplayer

A mediaplayer indicator for GNOME Shell 3.18+.
https://extensions.gnome.org/extension/55/media-player-indicator/
GNU General Public License v2.0
376 stars 106 forks source link

failed to open file (schemas/gschemas.compiled not found) #444

Closed martinkg closed 6 years ago

martinkg commented 6 years ago

Hi,

i have package your extension as an RPM for Fedora. Usually we move the .gschema.xml file to the global directory, /usr/share/glib-2.0/schemas/, recompile all schemas there with the glib-compile-schemas command, and omit the precompiled gschemas.compiled file. I've successfully done this for several other GNOME Shell extensions, and they all detect the schemas in the new location. However, after installing the media-player-indicator RPM, GNOME Tweak Tool shows the below error message when you click on the settings button for media-player-indicator. And the switch to enable or disable the extension is grayed out.

Here's the error message again with the original formatting preserved:

GLib.FileError: Failed to open file “/usr/share/gnome-shell/extensions/mediaplayer@patapon.info/schemas/gschemas.compiled”: open() failed: No such file or directory

Stack trace:
  getSettings@/usr/share/gnome-shell/extensions/mediaplayer@patapon.info/lib.js:27:24
  @/usr/share/gnome-shell/extensions/mediaplayer@patapon.info/prefs.js:31:19
  Application<._getExtensionPrefsModule@resource:///org/gnome/shell/extensionPrefs/main.js:75:13
  wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
  Application<._selectExtension@resource:///org/gnome/shell/extensionPrefs/main.js:90:31
  wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
  Application<._extensionFound/<@resource:///org/gnome/shell/extensionPrefs/main.js:209:17
  main@resource:///org/gnome/shell/extensionPrefs/main.js:402:5
  @<main>:1:43

rpm spec file used: gnome-shell-extension-media-player-indicator.spec

Here are the files owned by the RPM after installation:

/usr/share/doc/gnome-shell-extension-media-player-indicator
/usr/share/doc/gnome-shell-extension-media-player-indicator/README.md
/usr/share/gnome-shell/extensions/mediaplayer@patapon.info
/usr/share/gnome-shell/extensions/mediaplayer@patapon.info/dbus.js
/usr/share/gnome-shell/extensions/mediaplayer@patapon.info/extension.js
/usr/share/gnome-shell/extensions/mediaplayer@patapon.info/lib.js
/usr/share/gnome-shell/extensions/mediaplayer@patapon.info/manager.js
/usr/share/gnome-shell/extensions/mediaplayer@patapon.info/metadata.json
/usr/share/gnome-shell/extensions/mediaplayer@patapon.info/mpi-symbolic.svg
/usr/share/gnome-shell/extensions/mediaplayer@patapon.info/panel.js
/usr/share/gnome-shell/extensions/mediaplayer@patapon.info/player.js
/usr/share/gnome-shell/extensions/mediaplayer@patapon.info/prefs.js
/usr/share/gnome-shell/extensions/mediaplayer@patapon.info/schemas/org.gnome.shell.extensions.mediaplayer.gschema.xml
/usr/share/gnome-shell/extensions/mediaplayer@patapon.info/settings.js
/usr/share/gnome-shell/extensions/mediaplayer@patapon.info/stylesheet.css
/usr/share/gnome-shell/extensions/mediaplayer@patapon.info/ui.js
/usr/share/gnome-shell/extensions/mediaplayer@patapon.info/util.js
/usr/share/gnome-shell/extensions/mediaplayer@patapon.info/widget.js
/usr/share/licenses/gnome-shell-extension-media-player-indicator
/usr/share/licenses/gnome-shell-extension-media-player-indicator/LICENSE
/usr/share/locale/de/LC_MESSAGES/gnome-shell-extensions-mediaplayer.mo
/usr/share/locale/es/LC_MESSAGES/gnome-shell-extensions-mediaplayer.mo
/usr/share/locale/fr/LC_MESSAGES/gnome-shell-extensions-mediaplayer.mo
/usr/share/locale/gl/LC_MESSAGES/gnome-shell-extensions-mediaplayer.mo
/usr/share/locale/he/LC_MESSAGES/gnome-shell-extensions-mediaplayer.mo
/usr/share/locale/it/LC_MESSAGES/gnome-shell-extensions-mediaplayer.mo
/usr/share/locale/lt/LC_MESSAGES/gnome-shell-extensions-mediaplayer.mo
/usr/share/locale/nb_NO/LC_MESSAGES/gnome-shell-extensions-mediaplayer.mo
/usr/share/locale/nl/LC_MESSAGES/gnome-shell-extensions-mediaplayer.mo
/usr/share/locale/pl/LC_MESSAGES/gnome-shell-extensions-mediaplayer.mo
/usr/share/locale/pt_BR/LC_MESSAGES/gnome-shell-extensions-mediaplayer.mo
/usr/share/locale/ro/LC_MESSAGES/gnome-shell-extensions-mediaplayer.mo
/usr/share/locale/ru/LC_MESSAGES/gnome-shell-extensions-mediaplayer.mo
/usr/share/locale/sk/LC_MESSAGES/gnome-shell-extensions-mediaplayer.mo
/usr/share/locale/sr/LC_MESSAGES/gnome-shell-extensions-mediaplayer.mo
/usr/share/locale/tr/LC_MESSAGES/gnome-shell-extensions-mediaplayer.mo
/usr/share/locale/zh_CN/LC_MESSAGES/gnome-shell-extensions-mediaplayer.mo
/usr/share/locale/zh_TW/LC_MESSAGES/gnome-shell-extensions-mediaplayer.mo

Does media-player-indicator use a hard-coded gschema path or something?

JasonLG1979 commented 6 years ago

System wide installs and packaged versions in this extension are not supported. The only supported installation methods are via the GNOME extensions site or from source.