Last active
June 6, 2016 07:19
-
-
Save opragel/e54cb67859ced8b5a6ebf6dcac841cbb to your computer and use it in GitHub Desktop.
launch_googledrive_osx.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| currentUser=$(python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "\n");') | |
| launchctl asuser "$currentUser" open "/Applications/Google Drive.app/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment