Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working if installed at system-level (instead of user level) #55

Open
D3vil0p3r opened this issue May 26, 2023 · 5 comments
Open

Not working if installed at system-level (instead of user level) #55

D3vil0p3r opened this issue May 26, 2023 · 5 comments

Comments

@D3vil0p3r
Copy link

When this extension is installed at system level for all users, the "Settings" button does not work and returns the following error message:
image

It occurs because in files pref/pages.js and shared/media.js, the MEDIA_CACHE variable only refers to the current user by:

pages.js

const MEDIA_CACHE = GLib.get_user_cache_dir()+'/aylur/media';

media.js

const CACHE_PATH = GLib.get_user_cache_dir()+'/aylur';
const MEDIA_CACHE = CACHE_PATH+'/media/';

So, if the extension is installed at system-level (so for all users in the system), the GLib.get_user_cache_dir() is not a good choice because it will return the current user cache directory.

When the extension is installed at system level, the media path should be stored to /usr/share/gnome-shell/extensions/widgets@aylur/media.

Could you please add an if statement for defining CACHE_PATH and MEDIA_CACHE in order to manage also system-level installation of this extension?

@Aylur
Copy link
Owner

Aylur commented May 26, 2023

You didn't install it correctly.
The cache path shouldn't point to /usr/share because the extension doesn't have permission to write there.

I don't know how it works, but the gresource that contains the schema has to be compiled into somewhere at /usr/share/gnome-shell if you want to install it systemwide.

@D3vil0p3r
Copy link
Author

You didn't install it correctly. The cache path shouldn't point to /usr/share because the extension doesn't have permission to write there.

I don't know how it works, but the gresource that contains the schema has to be compiled into somewhere at /usr/share/gnome-shell if you want to install it systemwide.

Do you know how to compile gresource?

@Aylur
Copy link
Owner

Aylur commented May 26, 2023

I am not sure, look at some aur pkgbuild for references.
You probably need to use glib-compile-schemas with the widgets@aylur/schemas/gschema.xml file

@Aylur
Copy link
Owner

Aylur commented May 26, 2023

I will also look into it and provide a makefile or meson to build it.

@D3vil0p3r
Copy link
Author

I will also look into it and provide a makefile or meson to build it.

Very kind. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants