orangeshirt / gnome-shell-extension-touchpad-indicator

A touchpad indicator extension for gnome-shell
GNU General Public License v2.0
23 stars 14 forks source link

Permission error when not installed in user home directory #15

Closed slosd closed 11 years ago

slosd commented 12 years ago

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.

orangeshirt commented 12 years ago

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 12 years ago

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 ;)

orangeshirt commented 11 years ago

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 11 years ago

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.

orangeshirt commented 11 years ago

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

slosd commented 11 years ago

Works for me. Thanks!