New answers tagged script
The following AppleScript works for me: tell application "Terminal" do script "~/testscript" & " -arg1" & " -arg2" end tell
You can use System Preferences/Energy Settings to define shutdown/restart times run sudo shutdown -r 23:45 to automatically reboot every night combine the second option with a cron/launchd job to reschedule the reboot daily (or just call shutdown -r now from cron/launchd) You also can set one user to auto-login after reboot in System Preferences/Users ...
Also make sure that rc.local has the permission to execute, via a sudo chmod 755 /etc/rc.local The LaunchDaemon does not explicitly report an error, so I was bitten by this until I changed permissions.
Oh, found it. You'll have to reload the appropriate kernel extension like this: defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadMomentumScroll -bool false sudo bash -c "kextunload /System/Library/Extensions/AppleBluetoothMultitouch.kext; kextload /System/Library/Extensions/AppleBluetoothMultitouch.kext" After that your trackpad ...
In addition the quotes and slashes, it looks like you are trying to give an absolute path, so remove the tilde: defaults write com.apple.screencapture location '/Users/tommy/Google Drive/Sync/iMac/iMac Screenshots/' Don't forget to run killall SystemUIServer or logout afterwards
There are backs lashes (\) in your path that should probably be forward slashes (/). You also use curly quotes (‘ and ’), which are weird at best. Try using straight quotes ('), although in that case straight double quotes (") should do as well: defaults write com.apple.screencapture location '/Users/tommy/Google Drive/Sync/iMac/iMac Screenshots'
Open your Script Editor(Launch Pad -> Other -> Script Editor) Type scripts like this: do shell script "launchctl setenv autoBackupImagesInProgress false" Use multiple lines if you want to set multiple variables. Save this script as Application, open SystemPreferences → Users & Groups → your user → Login Items and add your saved script. To apply ...
I was using those commands for VirtualBox in rc.local, and I ran into the same problem. I don't if this is the right way to do this, but it works for me. I created /Library/LaunchDaemons/local.localhost.startup.plist containing the code below. It runs the rc.local script once at start up. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist ...
sudo systemsetup -setremotelogin on sudo systemsetup -setremotelogin off
Comment out the four lines that reference Heroku by adding the pound/hash sign in front of each one, like so: # fancy_echo "Installing Heroku CLI client ..." # brew_install_or_upgrade 'heroku-toolbelt' # fancy_echo "Installing the heroku-config plugin to pull config variables locally to be used as ENV variables ..." # heroku plugins:install ...
Top 50 recent answers are included