ansible-role-customize-gnome icon indicating copy to clipboard operation
ansible-role-customize-gnome copied to clipboard

Installing extensions fails when gnome_user != ansible_user

Open mjbogusz opened this issue 10 months ago • 1 comments

When trying to install extensions for a secondary non-sudoer user I've found 2 problems:

First, restarting the shell doesn't work (https://github.com/PeterMosmans/ansible-role-customize-gnome/issues/28#issuecomment-1683670289) - this might be due to permissions, due to another user logged in, or maybe no user logged in at all - besides #30 (which would help) I think the restart step should be allowed to fail gracefully.

Second, more important - neither gnome-extensions nor gnome-shell-extension-tool can see the installed extensions (or in fact the whole dconf database) when 'becoming' the target user, probably due to some environment variables set/passed by SSH and ansible. To replicate, first ssh into a system as a user with some extensions and run gnome-extensions list --installed (this should work as expected); then ssh into the same system as other user, su (or sudo -u) onto the target user and run the command again - the list will be empty.

Ref #28 - I've posted some initial findings there, before it became clear that it's a slightly different issue.

As during debugging I've found a method to setup system-wide extensions for all users (https://help.gnome.org/admin/system-admin-guide/stable/extensions-enable.html.en), which suits my specific usecase much better, I'm switching to that but leaving this report here for other's reference.

mjbogusz avatar Aug 21 '23 16:08 mjbogusz