Commit 335be6b4 authored by RUSSELL MYERS's avatar RUSSELL MYERS

Updating ReadMe, adding pkg build automation, adding 2.2 pkg.

parent 9898ab50
#tag BuildAutomation Begin BuildStepList Linux Begin BuildProjectStep Build End End Begin BuildStepList Mac OS X Begin IDEScriptBuildStep SaveProject , AppliesTo = 0 DoCommand "SaveFile" End Begin BuildProjectStep Build End Begin IDEScriptBuildStep UnDock , AppliesTo = 0 Dim AppLocation as String = CurrentBuildAppName + ".app" AppLocation = AppLocation.ReplaceAll( " ", "\ " ) AppLocation = CurrentBuildLocation + "/" + AppLocation //@ More cocoa info.plist keys here: // https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html Call DoShellCommand("/usr/bin/defaults write " + AppLocation + "/Contents/Info ""LSBackgroundOnly"" -bool ""true""") End Begin IDEScriptBuildStep tarProject , AppliesTo = 0 /// Set Variables dim packageLoc, res, tarname as string tarname = "Idle-Logout.tar.bz2" packageLoc = "/Users/rzm102/Documents/_Programing/Git/IdleLogout/" //print "Build Location: "+CurrentBuildLocation 'if CurrentBuildLocation="/Users/rzm102/Documents/_Programing/Git/IdleLogout/Builds\ \-\ psuIdleLogout.rbvcp/OS\ X\ 64\ bit" then ' '// Tar up folder 'res = DoShellCommand _ '("cd "+CurrentBuildLocation+"; /usr/bin/tar -c --exclude='.svn' -vjf "+tarname+" *") 'if res = "" then 'print "Results: "+res 'end '// Delete old tar '// print "rm "+packageLoc+tarname 'res = DoShellCommand _ '("rm "+packageLoc+tarname) ' '// Move tar to luggage folder '// print "mv "+CurrentBuildLocation+"/"+tarname+" "+packageLoc '// res = DoShellCommand _ '("mv "+CurrentBuildLocation+"/"+tarname+" "+packageLoc) ' '// Make package '// res = DoShellCommand _ '("cd "+packageLoc+"; make pkg; open "+packageLoc) '// print res 'else '// print "Not on rusty's mac. Skipping pkg creation" '//print CurrentBuildLocation//print "Build Location: "+CurrentBuildLocation 'end End End Begin BuildStepList Windows Begin BuildProjectStep Build End End #tag EndBuildAutomation
\ No newline at end of file
#tag BuildAutomation Begin BuildStepList Linux Begin BuildProjectStep Build End End Begin BuildStepList Mac OS X Begin IDEScriptBuildStep SaveProject , AppliesTo = 0 DoCommand "SaveFile" End Begin BuildProjectStep Build End Begin IDEScriptBuildStep UnDock , AppliesTo = 0 Dim AppLocation as String = CurrentBuildAppName + ".app" AppLocation = AppLocation.ReplaceAll( " ", "\ " ) AppLocation = CurrentBuildLocation + "/" + AppLocation //@ More cocoa info.plist keys here: // https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html Call DoShellCommand("/usr/bin/defaults write " + AppLocation + "/Contents/Info ""LSBackgroundOnly"" -bool ""true""") Call DoShellCommand("/bin/chmod 644 " + AppLocation + "/Contents/Info.plist") End Begin IDEScriptBuildStep tarProject , AppliesTo = 0 /// Set Variables dim packageLoc, res, tarname as string tarname = "Idle-Logout.tar.bz2" packageLoc = "/Users/rzm102/Documents/_Programing/Git/IdleLogout/" //print "Build Location: "+CurrentBuildLocation 'if CurrentBuildLocation="/Users/rzm102/Documents/_Programing/Git/IdleLogout/Builds\ \-\ psuIdleLogout.rbvcp/OS\ X\ 64\ bit" then ' '// Tar up folder 'res = DoShellCommand _ '("cd "+CurrentBuildLocation+"; /usr/bin/tar -c --exclude='.svn' -vjf "+tarname+" *") 'if res = "" then 'print "Results: "+res 'end '// Delete old tar '// print "rm "+packageLoc+tarname 'res = DoShellCommand _ '("rm "+packageLoc+tarname) ' '// Move tar to luggage folder '// print "mv "+CurrentBuildLocation+"/"+tarname+" "+packageLoc '// res = DoShellCommand _ '("mv "+CurrentBuildLocation+"/"+tarname+" "+packageLoc) ' '// Make package '// res = DoShellCommand _ '("cd "+packageLoc+"; make pkg; open "+packageLoc) '// print res 'else '// print "Not on rusty's mac. Skipping pkg creation" '//print CurrentBuildLocation//print "Build Location: "+CurrentBuildLocation 'end End Begin IDEScriptBuildStep PkgApp , AppliesTo = 0 Dim result as String Dim command As String Dim source as String Dim dest as String // Path to Build Path Dim ProjectPath as String = " " + CurrentBuildLocation // Path to Project Root Dim ProjectRoot as String = ProjectShellPath.ReplaceAll( " ", "\ " ) ProjectRoot = Replace(ProjectRoot, "psuIdleLogout.rbvcp", "") // Path to Application Dim AppLocation as String = CurrentBuildAppName + ".app" AppLocation = AppLocation.ReplaceAll( " ", "\ " ) AppLocation = CurrentBuildLocation + "/" + AppLocation // Path to Pkg Output Dim BuildOutput as String = ProjectShellPath + "/IdleLogout Builds/IdleLogout-" + PropertyValue("IdleLogout.ShortVersion") + ".pkg" BuildOutput = BuildOutput.ReplaceAll( " ", "\ " ) BuildOutput = Replace(BuildOutput, "psuIdleLogout.rbvcp", "") // Make root dirs command = "mkdir -p " + CurrentBuildLocation + "/Library/LaunchAgents/" result = DoShellCommand(command) command = "mkdir -p " + CurrentBuildLocation + "/Library/CLMshared/Startup\ Items/" result = DoShellCommand(command) // Move App source = " " + AppLocation dest = " " + CurrentBuildLocation + "/Library/CLMshared/Startup\ Items/" command = "mv " + source + dest result = DoShellCommand(command) // Copy LaunchAgent source = " " + ProjectRoot + "IdleLogout\ Builds/LaunchAgent/edu.psu.idlelogout.plist" dest = " " + CurrentBuildLocation + "/Library/LaunchAgents/" command = "cp" + source + dest result = DoShellCommand(command) // Build Pkg command = "/usr/bin/pkgbuild --version " + PropertyValue("IdleLogout.ShortVersion") +" --identifier edu.psu.idlelogout --root " + CurrentBuildLocation + " " + BuildOutput result = DoShellCommand(command) 'print result // Delete the project command = "rm -R " + ProjectPath result = DoShellCommand(command) End End Begin BuildStepList Windows Begin BuildProjectStep Build End End #tag EndBuildAutomation
\ No newline at end of file
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IdleLoopDelaySeconds</key>
<string>120</string>
<key>ComputerIdleAfterNumSeconds</key>
<string>600</string>
<key>WaitForUserPromptSeconds</key>
<string>90</string>
</dict>
</plist>
This diff is collapsed.
......@@ -5,29 +5,26 @@ Description
------------
Application to log out users after a specified period of time. The user will see a prompt with a countdown asking them if they wish to log out or continue working ("More Time"). Users can disable the Idle Logout process using the "Disable Idle Logout.applescript".
**The Idle Logout App will force close any applications the user has open. This will not save any data!**
Screen Shot of Count Down Window:
![window]
Download app: [Idle Logout.app](https://github.com/CLCMacTeam/IdleLogout/releases)
Background
------------
Idle Logout.app was written in RealStudio 2014 R2.1. It uses the ioreg command to determine how long USB devices have been idle. Once the idle limit is meet, the computer is forcibly restarted to log out any users.
Installation
-------------
The terminal command we use to check idle seconds on USB devices is:
> /bin/echo $((`/usr/sbin/ioreg -c IOHIDSystem | /usr/bin/sed -e '/HIDIdleTime/ !{ d' -e 't' -e '}' -e 's/.* = //g' -e 'q'` / 1000000000))
The IdleLogout-V.v.pkg installs the Idle Logout.app into /Library/CLMshared/Startup Items/ and the [LaunchAgent](https://github.com/CLCMacTeam/IdleLogout/tree/master/IdleLogout%20Builds/LauchAgent) to open it in /Library/LaunchAgents/.
Important Notes
-------------
Idle Logout.app should be run at login with a LaunchAgent under the users context. **UPDATE: The Idle Logout.app is self contained and will force a user logout without the need for external scripts!** The Idle Logout.app will write log files into the /Users/Shared/IdleLogout folder.
The Idle Logout.app will write log files into the /Users/Shared/IdleLogout/ folder.
You can deploy the "Disable Idle Logout.applescript", as a compiled app, to give users an easy way to stop the Idle Logout process. This is helpful in locations where users need to allow processes to run for longer than you're normal logout time.
**The Idle Logout App will force close any applications the user has open. This will not save any data!**
Preferences
-------------
The Idle Logout.app looks for the preference file "/Library/CLMadmin/Config/edu.psu.its.clc.IdleLogoutSettings.plist" (included in the repo under 'IdleLogout app' folder). It looks for the following key/string pairs in the plist. If they are missing, it will use the defaults:
The Idle Logout.app looks for the preference file "/Library/Preferences/edu.psu.idlelogout.plist" (included in the repo under '[IdleLogout Builds/Preference/](https://github.com/CLCMacTeam/IdleLogout/tree/master/IdleLogout%20Builds/Preference)' folder). It looks for the following key/string pairs in the plist. If they are missing, it will use the defaults:
* IgnoreUser = Ignore the username, don't force logout.
* IgnoreGroup = Ignore anyone in this group, don't force logout.
......@@ -57,9 +54,16 @@ Defaults can be set quickly for all users using defaults write:
* defaults write /Library/Preferences/edu.psu.idlelogout.plist WindowTitle -string "Our Idle Logout"
* defaults write /Library/Preferences/edu.psu.idlelogout.plist WindowMessage "You're going to be logged out\n\n\nDude\!"
Background
------------
Idle Logout.app was written in Xojo 2015 R3. It uses the ioreg command to determine how long USB devices have been idle. Once the idle limit is meet, the computer is forcibly restarted to log out any users.
The terminal command we use to check idle seconds on USB devices is:
> /bin/echo $((`/usr/sbin/ioreg -c IOHIDSystem | /usr/bin/sed -e '/HIDIdleTime/ !{ d' -e 't' -e '}' -e 's/.* = //g' -e 'q'` / 1000000000))
ToDo
-------------
* No Known Issues
* No Known Issues - Please use GitHub Issues
Completed
------------
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>edu.psu.idlelogout</string>
<key>ProgramArguments</key>
<array>
<string>open</string>
<string>/Library/CLMshared/Startup Items/Idle Logout.app</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment