darktrojan / openwith

Open With add-on for Firefox
https://addons.mozilla.org/addon/open-with/
412 stars 71 forks source link

Install failure when running script as privileged user [Linux][Python] #209

Open S-Joao-V opened 6 years ago

S-Joao-V commented 6 years ago

While setting up the addon I used a terminal window elevated rights to run the chmod command, just to be sure. Right after I ran the installation script resulting in no folders created, or a open_with.json file.

After checking my FF install and then debugging the script I found that if it is executed with elevated access the "home_path = os.getenv('HOME')" expression will evaluate into the /root path, not the /home/user/ as expected.

Opening a new terminal session and then executing the script solved it.

The system has python 3.6.4-2 package installed.

nikoss commented 5 years ago

I thought that it needed installation as root. Only after I read the above comment did I decide to install "Open with", on the latest Firefox.

Maybe the instructions should make it clear, that you are supposed to install the script, as a simple user (which is uncommon).

Maybe, change..

Run the file with the argument "install", like this:

to...

As the current user, run the file with the argument "install", like this :

VHuemerlehner commented 5 years ago

Contrary to the comments above, I actually had to run both installation steps as sudo (Linux 18.02.4 LTS). Beforehand, I would get errors along the lines of "Access not permitted". So I don't know if anything changed in the meantime, but yeah... Maybe you could add information about "may have to be a normal user but also may have to have root access" to the installation guide =) Thanks for the great tool in any case!