Re: [gnome-shell-ext] How does gnome-browser-extension and chrome-gnome-shell load extension without reloading gnome session



Thank you very very much. This works like a charm.

Can I enable unsafe mode, install the extensions then revert back to safe mode?

I do not have any idea how theis dbus commands work. So, if someone please let me know how  `org.gnome.Shell.Exec` will work then it will be great.

By the way, the script currently looks like:
....
#!/bin/bash

array=(netspeed hedayaty gmail com)

for i in "${array[@]}"
do
    VERSION_TAG=$(curl -Lfs "https://extensions.gnome.org/extension-query/?search=${i}" | jq '.extensions[0] | .shell_version_map | map(.pk) | max')
    wget -O ${i}.zip "https://extensions.gnome.org/download-extension/${i}.shell-extension.zip?version_tag=$VERSION_TAG"
    gnome-extensions install --force ${i}.zip
    busctl --user call org.gnome.Shell.Extensions /org/gnome/Shell/Extensions org.gnome.Shell.Extensions InstallRemoteExtension s $i
    gnome-extensions enable ${i}
done
....


On Mon, Jul 4, 2022 at 11:04 PM Florian Müllner <fmuellner gnome org> wrote:


On Mon, Jul 4 2022 at 22:04:36 +0600, Ahmad Ismail
<ismail783 gmail com> wrote:
>
> ....
> So, as far i understood, I have two options:
>
> 1. Run org.gnome.Shell.Extensions.InstallRemoteExtension from my
> shell script (using dbus-send or busctl) in my first for loop.

Sure:

busctl --user call org.gnome.Shell.Extensions
/org/gnome/Shell/Extensions org.gnome.Shell.Extensions
InstallRemoteExtension s $i

should work, although you/the user would need to confirm the
installation of each extension.


> 2.
> gnome-extensions install --force ${i}.zip
> # Register the newly installed extension with a dbus command
> (probably dbus-send or busctl)
> gnome-extensions enable ${i}

You'd have to enable unsafe-mode and fiddle with `org.gnome.Shell.Exec`.

Florian




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]