Closed warmup72 closed 10 months ago
Do you have a ready to use plugin I can use for debugging?
Sorry for the delay - The following script starts contact as example as root. If You set terminal=true it works. With terminal=false nothing happens:
#!/bin/bash
if [ "$1" == 'app' ]; then
admuser="[ADMINUSER]"
pw="[ADMINPASSWORD]"
app="/System/Applications/Contacts.app/Contents/MacOS/Contacts"
expect -c "spawn su - $admuser -c \"echo "$pw" | sudo -S nohup $app &>/dev/null & \";expect \"Password:\";send \"${pw}\n\";interact"
exit
fi
echo "test"
echo "Start App as Root | bash='$0' param1='app' terminal=false refresh=false"
exit
Well, it works on this build for me:
https://user-images.githubusercontent.com/222100/190278883-e2e7c8ba-c601-4b8d-a270-305bfe6a3335.mp4
Slightly modified plugin source:
#!/bin/bash
if [ "$1" == 'app' ]; then
admuser="user"
pw="password"
app="/System/Applications/Contacts.app/Contents/MacOS/Contacts"
expect -c "spawn su - $admuser -c \"echo "$pw" | sudo -S nohup $app &>/dev/null & \";expect \"Password:\";send \"${pw}\n\";interact"
exit
fi
echo "test"
echo "---"
echo "Start App as Root | bash='$0' param1='app' terminal=false refresh=false"
echo "Start App as Root Terminal | bash='$0' param1='app' terminal=true refresh=false"
Any other detials you can provide? Maybe a dump of defaults
Hm, I´ve tried it with the new build. On my MBP (12.6 and before with 12.5) same Problem. The Terminal-Link works an Contact starats The other link didn´t bring up the Contacts. Seems that something with the config is different
@warmup72 👋
It is still working for me on the latest beta build, mind trying it if the issue is still relevant to you?
Sorry - I´ve tried this now an it also works for me - don´t know what before went wrong
I want to start Forklift (or any other Application) as root-user. So I´ve set up a little script with a expect/spawn-Command. This Command works on Terminal and also with Swiftbar-Execute setting "terminal=true". But is I set terminal=false it doesn´t work anymore:
macOS 12.5.1 Swiftbar 1.4.4