Post back the Full Report - copy and paste - using the Additional Text Icon ( 3rd Icon to last ) The Report will Not Reveal Any Personal Information. It will take a Snap Shot - both the hardware and software. Run the application with Full Disc Access ( Security & Privacy - Full Disc Access ). ![]() The application is free or paid from added features. Then log out of the Main User account and log into the dummy account and test again if the issue persists.Ĥ - If the issue is present in the dummy account - then this appears to be a System Wide issue.ĥ - Suggest downloading the Application Etrecheck directly from a well Respected ASC Contributor. To further isolate this - Set up users, guests, and groups on Mac. The boot up will be slow and can take some time - Normal.Ģ - Does the issue present in this mode ?ģ - If not - there could be something in the main User Account playing up. This will perform a Disk Repair, clear cache files and only load Apple Software, extensions and fonts. Source: /usr/src/homeassistant/homeassistant/components/shell_command/_init_.1 - Suggest restarting in Safe Mode. Here is the error I get, but I know that is not related Unfortunatelly when I run it from lovelace it doesn’t work.Īlthough it does work from terminal, all the times. ![]() service: shell_command.shutdown_imac_right Shutdown_imac_right: ssh -i /config/ssh_keys/id_rsa "sudo shutdown -h now"Īfter that I create a script as follows: alias: shutdown imac right So, I go ahead and I create the shell command as follows: #shutdown imac right ssh -i /config/ssh_keys/id_rsa "sudo shutdown -h now" When I run the following command from HA terminal everything works smoothly and imac shuts down. (of course, replace to get full name of current user with to shut down, it’s easier to test without rebootingįollow up my previous post, another problem came up So, remove the leading echo, and you have what you want: ssh localhost 'osascript -e '"'"'tell application "System Events" to get full name of current user'"'" There are many ways to provide the proper quotes, the trick here is to end the initial single quote with a single quote, then start double with single inside, and terminate double and start single again… Gives: ssh localhost osascript -e 'tell application "System Events" to get full name of current user' ![]() Osascript expects a single arg after the -e, but the ssh execution gives 3 strings to execute on remote side, which, after shell evaluation loses the quotes, so you can test this: echo ssh localhost 'osascript -e '"'"'tell application "System Events" to get full name of current user'"'" Gives ssh -i /config/ssh_keys/id_rsa osascript -e tell app "System Events" to shut downĪs you can see single quotes are “lost” (because evaluated by shell on remote side) Simply add an echo at the beginning, and you will “see” what is executed: echo ssh -i /config/ssh_keys/id_rsa osascript -e 'tell app "System Events" to shut down' (if you need only the shutdown, you can also specify it): something like: (“user” is the actual username) user ALL = NOPASSWD: /sbin/shutdownĬoncerning your initial request, using osascript, the issue is about argument values… Personally I prefer the solution that is more unix-ish, than mac-ish.Īnd right, I would add that line to /etc/sudoers
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |