forked from loceee/OSXCasperScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enable VNC script, info script... run it from Casper Self Service.
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
# | ||
# turn on vnc for Mac | ||
|
||
vncpassword="${4}" | ||
|
||
if [ -n "${vncpassword}" ] | ||
then | ||
echo "Kickstarting ARD enabling VNC..." | ||
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -clientopts -setvnclegacy -vnclegacy yes -setvncpw -vncpw ${vncpassword} -restart -agent | ||
fi | ||
exit 0 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
# | ||
# what's my ip and stuff | ||
# | ||
# run me from a self service policy (handy if windows guys need to VNC on for remote support) | ||
|
||
displayDialog() | ||
{ | ||
osascript -e "tell app \"System Events\"" -e "activate" -e "display dialog \"$message\" with title \"Information about your Mac\" buttons {\"OK\"}" -e "end tell" | ||
} | ||
|
||
makeMessage() | ||
{ | ||
message="$message\n$1" | ||
} | ||
|
||
myip=$(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1' | head -n1) | ||
compname=$(scutil --get ComputerName) | ||
username=$(who | grep console | awk '{print $1}') | ||
|
||
makeMessage "User: $username" | ||
makeMessage "IP address: $myip" | ||
makeMessage "Computer Name: $compname" | ||
|
||
displayDialog "$message" & | ||
|
||
exit |