Re: .unixCmd

[email protected]
Newsgroups gmane.comp.audio.supercollider.user
Message-ID <ZuzKsDApbB8cWUkjAgJmSfSosxARb15tkQLlkvKOr1bt2X9ssBUHi_3n5uIpjDQAdka2jbLqLIKRCsRdjDSKnMnJnj3sIXFmHapY6uMge0E=@brianlheim.com>
It's not a bug in SC, this is a misunderstanding of how your OS operates. Each process starts with its own environment provided by the process which launched it (this may be the kernel itself!). The typical behavior of a shell is to indeed pass on the current environment to subprocesses, although this isn't required behavior at all in a UNIX system. SC itself has no control over the starting environment it receives, and like many applications it simply operates within that environment because this is a very useful way to pass some configuration items.

SC is not reading your shell config file. Your shell is reading it, and then SC inherits that environment when your shell starts open, which starts SC. The man page for open [1] also makes this clear:

"Opened applications inherit environment variables just as if you had launched the application directly through its full path."

One feature we could add to the IDE is the ability to modify certain environment items in the UI, but it's also easier and more portable across editors and workflows to call setenv(key, value) in your startup script. Unless we have a more substantial notion of projects in the IDE, there's not much benefit to making it more complicated than that, I feel.

Hope this helps.

Brian

[1] https://ss64.com/osx/open.html
-------- Original Message --------
On Mar 19, 2021, 11:16 AM, wrote:

> yes, something is very wrong here with SuperCollider running under macOS.
> and i believe it has caused a lot of the problems other users reported here previously - for example with git and quarks.
>
> if i start SuperCollider.app like normal by double clicking the icon, and then run...
> "echo $PATH".unixCmd; //or "PATH".getenv;
> i get /usr/bin:/bin:/usr/sbin:/sbin and it will not pick up the custom paths i have added in my ~/.zprofile settings file.
>
> but if i cd to the supercollider directory...
> cd /Applications/SuperCollider
> and then start the program like this...
> open SuperCollider.app
> now the above commands WILL read the .zprofile file and acknowledge the custom paths.
>
> this of course causes trouble. for example let's say i have installed htop via homebrew, then the following will return found or not found depending on how i launched SuperCollider.app...
> "which htop".unixCmd;
> and similar...
> "which git".unixCmd;
> it will either return /usr/local/bin/git (homebrew version) or /usr/bin/git (the version that macOS ships with)
>
> maybe i'm missing something obvious here but it does look like nasty bug.
>
> so to answer you question... yes, that integer return code means that your telnet is not found, but try starting SuperCollider.app from the command line with open. that should solve your problem until a fix is found.
>
> (i'm on macOS 10.14.6, SC 3.11.2, zsh shell)
> _f
>
>> 19 mars 2021 kl. 10:13 skrev [email protected]:
>>
>> dear list!
>>
>> I’m trying to understand what’s wrong with the .unixCmd and why the PATH is not the same as in Terminal.
>> Basically I want to send "telnet localhost 8000“.unixCmd, and in SC it gives me only an integer as a result, while in terminal:
>>
>> telnet localhost 8000
>> Trying ::1...
>> Connected to localhost.
>> Escape character is '^]‘.
>>
>> Does it have to do sth with PATH?
>>
>> thanks for answers!
>>
>> best,
>> Alisa
>>
>
> #|
> fredrikolofsson.com musicalfieldsforever.com
> |#
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
> search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.