desk-changer icon indicating copy to clipboard operation
desk-changer copied to clipboard

Not working on RHEL8

Open Sxderp opened this issue 3 years ago • 11 comments

This may have to do with the recent updates, I'm not sure if it has ever worked. I only just recently switched from RHEL7 to RHEL8.

--

Hopefully useful Information:

When opening the settings window I get the following error

TypeError: this.get_value(...).recursiveUnpack is not a function

Stack trace:
  get allowed_mime_types@/home/sdaniele3/.local/share/gnome-shell/extensions/[email protected]/_deskchanger.js:140:16
  _init@/home/sdaniele3/.local/share/gnome-shell/extensions/[email protected]/prefs.js:57:13
  buildPrefsWidget@/home/sdaniele3/.local/share/gnome-shell/extensions/[email protected]/prefs.js:375:12
  _showPrefs@resource:///org/gnome/shell/extensionPrefs/main.js:55:22
  _addExtensionRow/<@resource:///org/gnome/shell/extensionPrefs/main.js:294:13
  main@resource:///org/gnome/shell/extensionPrefs/main.js:691:5
  @<main>:1:43

I can also see the following error in "LookingGlass"

GObject.register() used with invalid base class (is PopupBaseMenuItem)

Sxderp avatar Aug 25 '21 15:08 Sxderp

Hi,

Can you please tell me what version of gnome-shell and the extension you're using? Just from the errors, it looks like you could be using a version of the plugin that doesn't support your version of gnome-shell, but I want to make sure.

Thanks!

BigE avatar Aug 25 '21 15:08 BigE

Sorry about that.

$ gnome-shell --version
GNOME Shell 3.32.2

I installed via the gnome-software.

I've also encountered something a bit weird. The metadata.json says 'version: "22"', but the source code is the same as "version-32" available on Github.

$ diff -u -r [email protected]/ ~/Downloads/desk-changer-version-32/[email protected]/

diff -u -r [email protected]/metadata.json /home/sdaniele3/Downloads/desk-changer-version-32/[email protected]/metadata.json
--- [email protected]/metadata.json	2021-08-17 23:29:34.000000000 -0400
+++ /home/sdaniele3/Downloads/desk-changer-version-32/[email protected]/metadata.json	2021-08-17 19:02:37.000000000 -0400
@@ -1,17 +1,16 @@
 {
-  "_generated": "Generated by SweetTooth, do not edit",
   "description": "Simple wallpaper changer with multiple profile support. Integrates into the shell by providing it's own panel icon. The daemon is written using gjs and runs independently of the extension as a background process.",
   "gettext-domain": "desk-changer",
   "name": "Desk Changer",
   "settings-schema": "org.gnome.shell.extensions.desk-changer",
   "shell-version": [
-    "3.34",
     "3.32",
+    "3.34",
     "3.36",
     "3.38",
     "40"
   ],
   "url": "https://github.com/BigE/desk-changer/",
   "uuid": "[email protected]",
-  "version": 22
-}
\ No newline at end of file
+  "version": "32"
+}
Only in /home/sdaniele3/Downloads/desk-changer-version-32/[email protected]/resources: .gitkeep
Binary files [email protected]/resources/org.gnome.Shell.Extensions.DeskChanger.gresource and /home/sdaniele3/Downloads/desk-changer-version-32/[email protected]/resources/org.gnome.Shell.Extensions.DeskChanger.gresource differ
Binary files [email protected]/schemas/gschemas.compiled and /home/sdaniele3/Downloads/desk-changer-version-32/[email protected]/schemas/gschemas.compiled differ

Sxderp avatar Aug 25 '21 15:08 Sxderp

Unfortunately this is just because of the way the gnome-shell site packages things. For whatever reason.. it modifies my metadata.json. I should just sync my versions here with there to reduce confusion... but I digress.

You're likely going to need to install a different version.. if you go to the extension site https://extensions.gnome.org/extension/1131/desk-changer/ you should be able to select your version of gnome-shell and get the correct plugin. It looks like the build there you're looking for is 17. It appears this build marked as 22 there is just not compatible with 3.32, so I need to remedy that or update the metadata to reflect that.

Thanks for reporting this issue!

BigE avatar Aug 25 '21 16:08 BigE

Unfortunately v17 doesn't work either. I'm able to successfully open the settings dialog (progress!) but attempting to enable the Daemon I get:

(gnome-shell-extension-prefs:175725): Gjs-WARNING **: 11:49:57.241: JS ERROR: TypeError: daemon.Start is not a function
_init_daemon/<@/home/sdaniele3/.local/share/gnome-shell/extensions/[email protected]/prefs.js:102:17
main@resource:///org/gnome/shell/extensionPrefs/main.js:691:5
@<main>:1:43

Sxderp avatar Aug 26 '21 15:08 Sxderp

@Sxderp welp. I'll have to fix that soon :) I might work with you, if you're willing, to test some changes out to ensure everything with the next version works with your version of gnome-shell. It's looking like there might not currently be a version that does... so, that's obviously not good!

Thanks for reporting all of this and digging in! I'll have updates soon.

BigE avatar Aug 26 '21 17:08 BigE

RHEL8 full support continues through 2024, so would be nice to work with that OS. I don't have any problems testing.

Sxderp avatar Aug 27 '21 12:08 Sxderp

@Sxderp If you're available for testing, I've updated the release/version-28 branch with a fix that will hopefully work. If we can get this fully working, I'll just push a fixed version to the extension store for the gnome-shell versions and disable everything else there.

Thanks!

BigE avatar Sep 17 '21 19:09 BigE

The settings dialog no longer immediately crashes, but it doesn't do anything when I set "Status" to "On". I set the interval to 15 seconds and have not encountered a switch. Reopening the settings dialog shows "Status" as "Off".

gnome-tweaks shows the extension "failed to load". In "Looking Glass" I still see the following error:

GObject.register() used with invalid base class (is PopupBaseMenuItem)

I don't see any other error messages.

Sxderp avatar Sep 20 '21 11:09 Sxderp

Hi @Sxderp,

Thanks for the info. It appears that version-28 tagged here is incompatible with 3.32, so I've backtracked again and opened release/version-27 to test. This one has the daemon written in Python, unfortunately, so you will need to make sure you have Python3 installed as well as the GIR libraries. This is also the last release of the extension before the ES6 rewrite, which is where the 3.32 support ends.

If this works for you, I might be willing to put more effort to this release and possibly remove the reliance on Python, at the very least. Thanks again for the feedback!!

BigE avatar Sep 20 '21 14:09 BigE

Progress!

The extension doesn't load, but I can get the daemon to run and change my background after a small patch.

Gnome Tweaks reports "Error loading extension". "Looking Glass" displays an error message TypeError: this._construct is not a function. It seems like this is a 3.32 compatibility issue. Since the extension is "functional" I'm guessing this has to do with rendering and creating the panel icon?

I can open the settings dialog and fiddle with it. Everything saves and works properly. After applying a small patch, I was able to get the daemon open and backgrounds are changing. RHEL8 does not have a python binary. You must specify your major version.


--- desk-changer-daemon.py.orig	2021-09-20 14:12:48.218404520 -0400
+++ desk-changer-daemon.py	2021-09-20 14:12:51.738381606 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import os
 import os.path

Sxderp avatar Sep 20 '21 18:09 Sxderp

Okay, knowing it works in this state makes me feel a bit better. I'll work to get the extension to a fully working state and then maybe retrofit the daemon so we're not at all reliant upon python. Thanks for testing this out!!

BigE avatar Sep 21 '21 12:09 BigE