How can I edit /usr/bin on macOS Sequoia?

I'm trying to get some software working on my computer that wasn't written with OS X in mind, and it's hard-coded to look for a certain program in /usr/bin. Since I'm using OS X, that program file is actually located elsewhere, but the software isn't smart enough to let me customise which directory it looks for the program in. I want to copy or symlink that program into /usr/bin so that the software can find it, but when I try this, I find I don't have permission. I'm logged in as administrator, and I've tried disabling SIP, but to no avail. Is there really no way to get permission to edit /usr/bin in Sequoia?



[Re-Titled by Moderator]

MacBook Air 13″, macOS 15.4

Posted on Apr 20, 2025 3:12 PM

Reply
Question marked as Top-ranking reply

Posted on Apr 21, 2025 8:10 AM

pebblle wrote:

survex is a separate program for handling cave survey data

OK. Now we're getting somewhere.


Oh god. survex requires junkware homebrew. Luckily for me, I did all this in a VM. But now I'm going to have to reset my VM when this is done.


Normally I just trash homebrew here in the forums. I don't install it. I had no idea it was this bad. What's it doing? Why does it take so long? It seems to be installing a complete operating system, with new versions all kinds of system files, none of which would ever be required. Now we're installing ffmpeg. I guess cave surveying also requires downloading copyrighted videos...


I'm in contact with someone about editing the Tunnel sourcecode to get it working

Don't waste your time. All this software is junk.


came here to ask about editing /usr/bin since that seemed like an easier fix for now.

You did the right thing. The only problem was you didn't ask for help until you were already well into the rabbit hole.


A walkthrough of exactly what I'm doing:

-Create survex file by copying the text at https://expo.survex.com/expofiles/tunnelwiki/wiki/pages/One_Quick_Example.html into a .txt file then changing it to .svx.
-Open Tunnel and doing File->open Survex/Topo and navigating to the .svx file I've just saved and opening it
-Tunnel opens a new window, as it is supposed to do, with the S-shaped path with the .svx file text attached to it, as it should do, but it fails to draw the centreline (survey data), and comes up with these warning messages:

OMG! Bless you.


After installing Homebrew and survex, I finally got to the point where I could reproduce the error. The error message in Terminal seems to suggest that I could change the path to the survex executable. Of course, there was no documentation for any of this. Even the raw HTML file on the GitHub site didn't mention anything. But I was able to download the source and track it down from there. Here's what you have to do:


Run the following Terminal command to set the survex path:


export SURVEX_EXECUTABLE_DIR=/opt/homebrew/bin/


Then, on the very next line, run the app:


java -jar tunnel2023j8.jar


If you want, you can combine both into a single script. Or put the export command into your shell profile. Lots of ways to do that.


It's horribly slow. It takes maybe a couple of minutes to load that file. I sure hope you weren't expecting much, because it sure doesn't do much. It doesn't look anything like that screenshot. But at least now you don't have to worry about hacking up your operating system to run it.


<big sigh>

8 replies
Question marked as Top-ranking reply

Apr 21, 2025 8:10 AM in response to pebblle

pebblle wrote:

survex is a separate program for handling cave survey data

OK. Now we're getting somewhere.


Oh god. survex requires junkware homebrew. Luckily for me, I did all this in a VM. But now I'm going to have to reset my VM when this is done.


Normally I just trash homebrew here in the forums. I don't install it. I had no idea it was this bad. What's it doing? Why does it take so long? It seems to be installing a complete operating system, with new versions all kinds of system files, none of which would ever be required. Now we're installing ffmpeg. I guess cave surveying also requires downloading copyrighted videos...


I'm in contact with someone about editing the Tunnel sourcecode to get it working

Don't waste your time. All this software is junk.


came here to ask about editing /usr/bin since that seemed like an easier fix for now.

You did the right thing. The only problem was you didn't ask for help until you were already well into the rabbit hole.


A walkthrough of exactly what I'm doing:

-Create survex file by copying the text at https://expo.survex.com/expofiles/tunnelwiki/wiki/pages/One_Quick_Example.html into a .txt file then changing it to .svx.
-Open Tunnel and doing File->open Survex/Topo and navigating to the .svx file I've just saved and opening it
-Tunnel opens a new window, as it is supposed to do, with the S-shaped path with the .svx file text attached to it, as it should do, but it fails to draw the centreline (survey data), and comes up with these warning messages:

OMG! Bless you.


After installing Homebrew and survex, I finally got to the point where I could reproduce the error. The error message in Terminal seems to suggest that I could change the path to the survex executable. Of course, there was no documentation for any of this. Even the raw HTML file on the GitHub site didn't mention anything. But I was able to download the source and track it down from there. Here's what you have to do:


Run the following Terminal command to set the survex path:


export SURVEX_EXECUTABLE_DIR=/opt/homebrew/bin/


Then, on the very next line, run the app:


java -jar tunnel2023j8.jar


If you want, you can combine both into a single script. Or put the export command into your shell profile. Lots of ways to do that.


It's horribly slow. It takes maybe a couple of minutes to load that file. I sure hope you weren't expecting much, because it sure doesn't do much. It doesn't look anything like that screenshot. But at least now you don't have to worry about hacking up your operating system to run it.


<big sigh>

Apr 21, 2025 5:22 AM in response to pebblle

pebblle wrote:

Somewhat niche, but it's a java program for drawing up cave survey data called 'Tunnel'. It's open source, so I might be able to edit the source code to allow me to change the directory it looks in, but thought adding something to usr/bin would be much more straightforward if it was possible.

The only thing I could find like that is "Tunnelx"



It requires Java, which is getting difficult to find these days. Download it from here: https://www.oracle.com/java/technologies/downloads/


I guess it seems to work?


I don't understand what /usr/bin has to do with this at all.

Apr 21, 2025 6:31 AM in response to etresoft

That's the one! The program opens fine, the issue comes when I try to import survex files (survex is a separate program for handling cave survey data, and uses .svx files). Tunnel attempts to call a program from survex (called 'cavern') but it assumes cavern is in /usr/bin, hence the problem. I'm in contact with someone about editing the Tunnel sourcecode to get it working, but came here to ask about editing /usr/bin since that seemed like an easier fix for now.



A walkthrough of exactly what I'm doing:


-Create survex file by copying the text at https://expo.survex.com/expofiles/tunnelwiki/wiki/pages/One_Quick_Example.html into a .txt file then changing it to .svx.

-Open Tunnel and doing File->open Survex/Topo and navigating to the .svx file I've just saved and opening it

-Tunnel opens a new window, as it is supposed to do, with the S-shaped path with the .svx file text attached to it, as it should do, but it fails to draw the centreline (survey data), and comes up with these warning messages:


Apr 21, 2025 6:35 AM in response to pebblle

That's the one! The program opens fine, the issue comes when I try to import survex files (survex is a separate program for handling cave survey data, and uses .svx files). Tunnel attempts to call a program from survex (called 'cavern') but it assumes cavern is in /usr/bin, hence the problem. I'm in contact with someone about editing the Tunnel sourcecode to get it working, but came here to ask about editing /usr/bin since that seemed like an easier fix for now.



A walkthrough of exactly what I'm doing:


-Create survex file by copying the text at https://expo.survex.com/expofiles/tunnelwiki/wiki/pages/One_Quick_Example.html into a .txt file then changing it to .svx.

-Open Tunnel and doing File->open Survex/Topo and navigating to the .svx file I've just saved and opening it

-Tunnel opens a new window, as it is supposed to do, with the S-shaped path with the .svx file text attached to it, as it should do, but it fails to draw the centreline (survey data), and comes up with these warning messages:


I've tried doing Import->Import Centreline on the window with the S, but that has no effect other than to cause the warning messages to flag again.

Apr 23, 2025 10:23 AM in response to etresoft

Brilliant, thank you so much! It's definitely not as nice as having the application just work upon opening, but it makes it usable which is all I was looking for really.


I believe installing Survex is a bit more straightforward on Windows and doesn't require Homebrew, but I haven't tried it so don't know for sure. I assume the clunkiness is partially from the developers not designing it with other operating systems in mind?


Either way, it's actually loading pretty fast on my machine, I barely had to wait. Not sure what the difference is but I'm glad it's working!


Thanks again for all your help :)

Apr 23, 2025 12:24 PM in response to pebblle

pebblle wrote:

I believe installing Survex is a bit more straightforward on Windows and doesn't require Homebrew, but I haven't tried it so don't know for sure. I assume the clunkiness is partially from the developers not designing it with other operating systems in mind?

Nothing requires Homebrew. It's just a crutch so that lazy developers don't have to bother with Macs and Mac users don't have to bother with being developers. To this day, Windows continues to get the kind of special dispensation from open source/Linux developers that they don't extend to the Mac.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How can I edit /usr/bin on macOS Sequoia?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.