is there a way to shutdown OSX (without any prompts), from within PD? i tried a naive "sudo shutdown -h now" sent to a shell object but did not get any reaction. (other simple commands like ls worked though)
so maybe the question would be how to send a command that needs su rights? or how to supply a pwd via shell. and yeah i know, bad idea.
Simon Iten wrote:
is there a way to shutdown OSX (without any prompts), from within PD? i tried a naive "sudo shutdown -h now" sent to a shell object but did not get any reaction. (other simple commands like ls worked though)
you need to provide the full path of the command "shutdown" (i think it's either /sbin/shutdown or /usr/sbin/shutdown) when you send it to the [shell] object.
plus (IIRC) you would have to permit superuser privileges in order to use it as a normal user (=without root password). i don't know the exact procedure anymore but you will find the information on the net.
also consider using the newer [command] external instead of [shell]
best
oliver
Am 12. November 2022 14:42:36 MEZ schrieb Simon Iten itensimon@gmail.com:
is there a way to shutdown OSX (without any prompts), from within PD? i tried a naive "sudo shutdown -h now" sent to a shell object but did not get any reaction. (other simple commands like ls worked though)
Try to provide full paths to the commands: the [shell] and [command] objects do not read (nor evaluate) ~/.bashrc and the like, so some PATHs might be missing from the environment.
mfg.sfg.jfd IOhannes
thanks oliver and IOhannes,
i installed [command] and supplied the full path. working as expected now. (got to read up on the superuser without password thing)
cheers
On 12 Nov 2022, at 15:34, IOhannes m zmölnig zmoelnig@iem.at wrote:
Am 12. November 2022 14:42:36 MEZ schrieb Simon Iten itensimon@gmail.com:
is there a way to shutdown OSX (without any prompts), from within PD? i tried a naive "sudo shutdown -h now" sent to a shell object but did not get any reaction. (other simple commands like ls worked though)
Try to provide full paths to the commands: the [shell] and [command] objects do not read (nor evaluate) ~/.bashrc and the like, so some PATHs might be missing from the environment.
mfg.sfg.jfd IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list