Open extension prefs as GDM user

It is possible to open dconf-editor as gdm user and tweak the settings which will apply to gdm login screen with below commands

xhost si:localuser:gdm
sudo -u gdm dbus-launch dconf-editor

But when I try to open gnome-extensions-app or gnome-extension prefs
The prefs window is opening but with error

$ sudo -u gdm dbus-launch gnome-extensions-app
Gjs-Message: 09:16:57.672: JS LOG: Failed to connect to shell proxy: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name :1.5 was not provided by any .service files

(gnome-extensions-app:14712): Gjs-WARNING **: 09:16:57.673: JS ERROR: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name :1.5 was not provided by any .service files
asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:114:23
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34

I tried with run-as -X gdm gnome-extensions-app and same error as above where as dconf-editor with same command works.

Can anyone help on this.

some more errors:

$ run-as -X gdm gnome-extensions-app
Connected to the local host. Press ^] three times within 1s to exit session.
Connection to the local host terminated.
Calling import-environment without a list of variable names is deprecated.

(gnome-extensions-app:16114): Gjs-CRITICAL **: 09:30:39.345: JS ERROR: Gio.DBusError: Error calling StartServiceByName for org.gnome.Shell.Extensions: Process org.gnome.Shell.Extensions exited with status 1
_injectToMethod/klass[method]@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:292:25
wrapper@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:253:17
vfunc_startup@resource:///org/gnome/Extensions/js/main.js:72:28
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34


(gnome-extensions-app:16114): Gjs-CRITICAL **: 09:30:39.346: JS ERROR: TypeError: this._shellProxy is undefined
vfunc_activate@resource:///org/gnome/Extensions/js/main.js:57:9
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34

$

That runs the app with a session bus that no gnome-shell instance connects to. That is, the app cannot communicate with gnome-shell to get the list of extensions, or use any API to do anything with the extensions.

So yes, this does not work.

Thanks.

I have created gnome-shell extension for gdm user but to get the settings from prefs, I have to enable the extension for user too and grab the changes from user and then get them via a script which uses run-as. I did trail and errors for quite long time with this and found it is not a good way.

Is there any other way that can take preferences from either GDM login session or user session?
Or is there a way that GTK Windows or anything that can be shown at login screen to tweak the settings? Or is there any window that St Widget can open for file chooser and color pallets?

I am able to tweak boolean from GDM login screen with St Widget.

No.

Neither, windows are explicitly disabled on the lock/login screens.

To the best of my knowledge, the choice is between dconf overrides and terrible hacks.

1 Like

Thanks I did not think of dconf overrides. I am working on it now.

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.