Permission error when not installed in user home directory #15

Closed
slosd opened this Issue Aug 19, 2012 · 6 comments

Comments

Projects
None yet
2 participants

slosd commented Aug 19, 2012

I installed this extension with my distribution's package manager which installs it to "/usr/share/gnome-shell/extensions/touchpad-indicator@orangeshirt". As a result "settings.json" can not be created there because only root has write permission.

The settings files need to be stored somewhere in the user directory.

This is where the extension installation path is used for "settings.json" instead of a directory in the user home.
https://github.com/orangeshirt/gnome-shell-extension-touchpad-indicator/blob/master/extension.js#L357

BTW: does anybody know how to copy text from the "Error" section in Looking Glass? I would have provided the error message that is logged there, but I can't seem to select any text there.

Owner

orangeshirt commented Aug 19, 2012

Thanks for this report.
Normally all gnome-shell-extensions are installed in /home/user/.local/share/gnome-shell/extensions/... that's why you've got this error and I not ;-).
I try to fix this next days but I can only change the version on github and on extensions.gnome.org and not the one your distribution contains.
Could you tell me which distribution you use?
If you install the version from extensions.gnome.org it should run.

Sorry but I don't know a way to copy Errors from Looking Glass, that's why I implement a own Error section to the extension.

slosd commented Aug 21, 2012

From https://live.gnome.org/GnomeShell/Extensions#Extension_installation_locations
"Extensions can be installed per-user in ~/.local/share/gnome-shell/extensions, or systemwide in /usr/share/gnome-shell/extensions and /usr/local/share/gnome-shell/extensions. "

I'm using Arch Linux and installed it from AUR which (in case you are not familiar with it) is basically a community-maintained collection of installation scripts for many software projects that are not in the official repositories. The script for your extension pulls from the git repository and moves the files to the correct folders, so I will get your new version after all ;)

Owner

orangeshirt commented Oct 4, 2012

So after a long time I found some minutes to fix this issue.
Could you please test an give me some feedback, because on my pc it is installed in the user directory.
Thanks.

slosd commented Oct 4, 2012

It says "Error invoking Gio.replace_contents: Error when opening file ~/.local/share/gnome-shell/extensions/touchpad-indicator@orangeshirt/settings.json, File or Directory not found".
I think you need to make sure the folder in "StoragePath" exists and otherwise create it.

Owner

orangeshirt commented Oct 6, 2012

You was wright. Now I check if the StoragePath exits and it should be created if not.
Could you please test again.
Thanks.

orangeshirt closed this Oct 6, 2012

slosd commented Oct 7, 2012

Works for me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment