New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MacOS .app has a different $PATH when launched from terminal #4273
Comments
Nothing that qutebrowser can do about that - you'll need to find a way to set a system-wide path on macOS, or just use full paths with |
There are quite a lot of issues about this already, but I'll try to write everything that I know in one place for search-ability. This is a problem because the path from Workarounds:
|
Thanks @jgkamat! Sorry for the extra noise but I appreciate the compiled workarounds. Would it be worth adding this as a "known" in the FAQ or Troubleshooting sections? idk how often this "issue" comes up. |
This does come up quite a lot, so I would be fine with adding an entry to the FAQ personally. I don't have access to a Mac OS machine though, so I can't test/validate anything, so I can't be the one to write it :P |
PR incoming |
I found another way to address this bug that I think is much better and will work for any GUI app. You can add the extra needed paths in
Feed launchd with added values (it will be automatic after a restart, the following command is only necessary if you don't want to reboot): egrep "^setenv\ " /etc/launchd.conf | xargs -t -L 1 launchctl you can now restart your Dock and Spotlight: killall Dock
killall Spotlight Now every GUI app you launch inherit of this PATH env variable, either you launch it by clicking the icon in |
I have the same problem here. Can someone help me how to find the extra needed PATH? Also with MacVim I have a very similar problem maybe the solution of @Bounga would fix this too. That would be awesome. |
@tbsmn Something like |
Thank you for that fast reply! But @jgillman has two PATH depending how qutebrowser ist started.
How can I get these? |
The easiest way is probably |
You should follow the instructions I added above. This is related to how Mac OS application launcher (understand clicking the app icon or use spotlight) handle the PATH. It uses it’s own PATH variable that is set by launchd. When you start an app from the term it inherits from the term PATH. This is not true when using app launcher (which I can understand technically). |
Thank you @The-Compiler and @Bounga this worked perfectly! |
Apologies if this has been posted before, I found closed $PATH-related issues, but none that seemed fitting.
When I launch qutebrowser from the command line in MacOS the PATH includes everything I would expect and I'm able to correctly
spawn mpv {url}
and stuff like that. When I launch qutebrowser from the .app the PATH is extremely short and I can'tspawn
anything that's not built into the system.I'm running 10.13.6 and installed qutebroswer with Homebrew.
PATH when launched from command line
PATH when lauched from .app
This all makes sense since launching it from the command line would inherit the environment from which it was launched, but it's annoying that it's not included when launched from the app. Not sure if that's a fixable thing, or if the solution is to always launch from the terminal.
The text was updated successfully, but these errors were encountered: