Problems configuring "Open with" extension. [Mac.]

Discussion of general topics about Mozilla Firefox
Post Reply
oceanmonkey
Posts: 17
Joined: February 27th, 2009, 12:47 am

Problems configuring "Open with" extension. [Mac.]

Post by oceanmonkey »

I've been using the "Open with" extension for years (it allows you to open any web page you're on with another browser) but for some reason I've had to reconfigure it again. I'm on a Mac with Firefox 108.0.2.
Here are the "Open with" instructions I've followed:

To complete installation:
Open With needs a file outside of the browser to communicate with. More information…

1. Click here to download and save the file to your computer.

2. Open Terminal. Ensure the file permissions allow you to run it ("x" permission):
chmod u+x open_with_mac.py

3. Run the file with the argument "install", like this:
./open_with_mac.py install

If you move the file, you must run this step again.


The problem is with step 3 where I get this error message in Terminal (after first "cd" to the same directory as the open_with_mac.py file:

$ ./open_with_mac.py install
env: python3: No such file or directory


I also tried the same thing but without the punctuation and slash:

$ open_with_mac.py install
-bash: open_with_mac.py: command not found


Apparently, Python is installed on my Mac, so that's not the problem:

$ python --version
Python 2.7.16


...and like I said, it's worked before, so what am I doing wrong?
Last edited by LIMPET235 on January 13th, 2023, 4:40 am, edited 1 time in total.
Reason: Added [Mac] to the title.
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: Problems configuring "Open with" extension. [Mac.]

Post by morat »

The support site says the addon is no longer maintained.

Open With issues
http://github.com/darktrojan/openwith/issues

Open With is no longer maintained
http://github.com/darktrojan/openwith/issues/347
LeeBinder wrote:Python 2 not working to begin with.
Try using Python 3, not Python 2.

Not working in MacOS Ventura
http://github.com/darktrojan/openwith/issues/342
oceanmonkey
Posts: 17
Joined: February 27th, 2009, 12:47 am

Re: Problems configuring "Open with" extension. [Mac.]

Post by oceanmonkey »

Thanks. It looks like others are having similar problems, and I'm guessing the problem has appeared when I last updated Firefox
(I see this sort of thing happens all the time -I update Firefox, then some extension stops working and changes my workflow, and I once again lose some useful functionality! I suppose I could refrain from updating Firefox, but then there's security issues could issue a risk....).

I haven't yet tried updating Python as you suggested, but not knowing the implications of this (if it will cause other issues on my computer, take up a lot of space etc.) I looked into finding other similar extensions.... looks like it's hard to find something similar these days which is still maintained. but came across the "Open in Safari" extension which after a similar type of installation works! As far as I can see it doesn't offer a contextual menu-item (as Open with" did), and only (as its name implies) offers to open up a web page in Safari, but it's definitely better than losing this ability altogether :D
PS. apparently I did use the "install" command the correct way (as it works fine with the latter extension) with "open with", namely as follows:
1) cd (change directory) to the root of where the downloaded file is
2) once you're located within the directory where the file(s) are, enter the command with the punctuation and slash preceeding it, like this: ./install.sh

Does anyone know of any (working with the latest Firefox) alternatives to "Open with"? I mean with similar functionality (configurable to open several alternative browsers, and with a right-clickable option for opening up the current page in another browser)?
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: Problems configuring "Open with" extension. [Mac.]

Post by morat »

The open_with_mac.py file description says "Remove Python 2.7 compatibility" that means the addon developer removed compatibility on purpose.

The open_with_mac.py file says "Python 3.2 or newer is required".

Directory open_with_mac.py
http://github.com/darktrojan/openwith/t ... ion/native

You could try using an older version of the open_with_mac.py file.

History open_with_mac.py
http://github.com/darktrojan/openwith/c ... ith_mac.py

Sorry, I don't know an alternative. Addons that require a .py script to install are rare.
oceanmonkey
Posts: 17
Joined: February 27th, 2009, 12:47 am

Re: Problems configuring "Open with" extension. [Mac.]

Post by oceanmonkey »

You're right!
Using an older version solved my problem. I selected the previous version (7.2.5) by clicking on its "download file" link, and Firefox asked if I wanted to install it.
From then on I just followed the configuration instructions, and I downloaded the .py file to the root of my Firefox profile folder, continued with the UNIX Terminal commands as instructed, and this time it worked!

I suppose I could install a newer version of Python to make it work with the latest version (7.2.6) of "Open with", but which implications does this have? Will it possibly break other things on my Mac, take up a lot of extra disk space etc? I'm not a programmer and have never had any use for Python, so I suppose this was pre-installed with MacOS as I can't remember ever having done it myself.
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: Problems configuring "Open with" extension. [Mac.]

Post by morat »

I don't know about the implications since I'm a Windows user. Best to ask for advice in a Mac forum.

Personally, I had to convert some of my Python 2 scripts to Python 3 when I updated.

Python 2 to 3
http://www.howtoforge.com/converting-yo ... -python-3/
http://python2to3.com/

Python converters only work with simple scripts.
oceanmonkey
Posts: 17
Joined: February 27th, 2009, 12:47 am

Re: Problems configuring "Open with" extension. [Mac.]

Post by oceanmonkey »

Good idea to ask in a Mac forum about that.
Is Python backwards compatible (i.e. if I install version 3 it can still run version 2 scripts)?

On a slightly different note I noticed that "Open with" which I had installed in my Thunderbird email app (also on the same Mac) had stopped working. I don't know when as I don't click that "Open with" icon there often, but I suppose it's happened at some update of Thunderbird.
Unfortunately the solution used with Firefox (installing the previous version) didn't work. Or do I need to look for a Thunderbird-specific version as that's different from the "Open with" extension for Firefox?
I just assumed the same extensions worked with both, but maybe I was wrong.
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: Problems configuring "Open with" extension. [Mac.]

Post by morat »

Python 3 is not backwards compatible with Python 2. Many developers install both Python versions.
oceanmonkey wrote:Thunderbird specific version
Open With version history for Thunderbird
http://addons.thunderbird.net/thunderbi ... /versions/
Post Reply