Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Johnny Jackhammer

macrumors regular
Original poster
May 5, 2011
149
87
In case it's fine to post here I will just ask.

When running this command in a GeekTool Shell Geeklet

Code:
#!/usr/bin/env bash
echo "${PATH//:/$'\n'}"

I don't get my system PATH I get the PATH GeekTool uses.
Code:
/usr/bin
/bin
/usr/sbin
/sbin

How would I get my system PATH to show in the GeekTool "Shell" - without exporting paths in the GeekTool Shell command?
 
Last edited:

Slartibart

macrumors 68040
Aug 19, 2020
3,146
2,822
what version of macOS, Geektool? Why not just extend $PATH for bash, if you want to use bash?
 

Slartibart

macrumors 68040
Aug 19, 2020
3,146
2,822
GeekTool is a program that allows you to have a heads up display of shell script output on your desktop.
which does not answer my question about its or the macOS version you are using... or why - if you run e.g. Ventura - you use bash instead of zsh. 😀
 

Slartibart

macrumors 68040
Aug 19, 2020
3,146
2,822
When you use e.g. Ventura the system shell is zsh. Obviously you use bash in Geektool. Luckily you can of course expand the bash profile or change the system shell to bash. I do not need to install Geektool to see and suggest that.
 
Last edited:

Nygaard

macrumors member
Dec 7, 2022
47
20
Houston
What do you mean by your "system PATH"? Do you want to know what your custom PATH is in general, or do you want to see the PATH of some Terminal session that you manually change on-the-fly?

If it's the former, just source your .bashrc and/or profile. If it's the latter, you'll need to be a bit more clever.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.