Run shell script after certain period of inactivity?

So I know that I can issue this command in terminal to enable fast user switching (and effectively lock the screen).
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend
What I want to do is have this happen on client machines after a certain period of inactivity (e.g. 15 minutes). I don't want to force a full logout via managed preferences because I want users to be able to log back in and still have everything they left open be available.
How would I go about this?

John's suggestion would allow another user to still log on to a computer after someone left it unattended, as opposed to just going to a locked screen saver.
However, I would be concerned that you could very easily end up with multiple users all logged onto one machine throughout the course of a day. Since often times, people tend to forget they had stayed logged in (which is one big reason it was left unattended for so long, generally), those people may never come back and then their log in is simply taking up resources. Also, it may make it harder for them to remember exactly which computer they were logged into to begin with (since it is now on a different user).
So, while I apologize for not actually being able to help with a solution, I'd make sure you weigh the pros and cons and see if it would truly solve what you're trying to accomplish to begin with.

Similar Messages

  • Automatically run shell script after publishing?

    Is there any way to automatically run a  shell script  after publishing?
    I would like to do some postprocessing on the remote server.
    The remote server is not mobileme,  so a tool like iwebenhancer  will not work.
    I will appreciate all kinds of tips and tricks and suggestions.
    best regards, Gabriel.

    So the Detect Change is to detect a change in the web page that the code is embedded, right?
    The only workaround would be, if you can modify what's in the ChangeDetection window is to not automatically enter the page but put in a red note to enter the page you want to be notified about.
    So instead of this:
    You would have this:
    where the visitor would have to copy and past the URL into the field.  Obviously not automatic. But might work if you can modify what is said in the window and not have the page automatically be entered.

  • How to run shell script using External Process in Process Flow?

    Hi,
    We can run external process using Process flow.
    I would like to run shell script as external process in Process flow.
    Could any one please explain it?
    Thanks and regards
    Gowtham Sen.

    HI,
    As you said I tried this case. I got the following error. The script is running successfully while I tested at unix command prompt.
    The error is as follows..
    tarting Execution PFPS_SMPL_RUNSHELL
    Starting Task PFPS_SMPL_RUNSHELL
    Starting Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS
    /SOURCE_FILES/CollectFiles.sh: line 1: ls: command not found
    /SOURCE_FILES/CollectFiles.sh: line 1: wc: command not found
    /SOURCE_FILES/CollectFiles.sh: line 1: ls: command not found
    Completing Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS
    Starting Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS_1
    SQL*Plus: Release 10.1.0.2.0 - Production on Fri Sep 29 22:57:39 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    ERROR:
    ORA-12545: Connect failed because target host or object does not exist
    Enter user-name: SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] | /
    Enter user-name: SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] | /
    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
    Completing Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS_1
    Completing Task PFPS_SMPL_RUNSHELL
    Completing Execution PFPS_SMPL_RUNSHELL
    My scenario is---
    I am trying to return a file name from one shell script. I created a external process for that. After completion of this process, I am running another script which takes that file name and trying to create a external table. The both scripts are runnning successfully. But while I am trying to run using process flow, its not coming.
    And I am not getting the way to catch the output of external process and pass it as parameter as another external process.
    Any suggestions are welcome.
    Thanks and regards
    Gowtham Sen.

  • Update Panel posts back after a period of inactivity

    I have a asp.net user control in a SharePoint solution. This user control uses Telerik Asp.net Ajax controls to provide a basic datagrid CRUD operations. I use this grid in a web part on a page in SharePoint 2013.
    I have a datagrid which is wrapped with RadAjaxPanel to ajaxify it.
    It all works fine. However, let's say, I click the add new record button and it opens a form to fill, if I leave that form intact for a minute, then start to fill and submit, it does postback and cancels form.
    However, if I click on add new record and fill the form and submit, it all works fine. I guess there is a timeout somewhere which causes this, my two days of research did not help me to find it.
    I was just wondering whether you have ever come across with this issue. I guess it does not matter whether it is Asp.net update panel or RadAjaxUpdatePanel, even if you have seen this issue on Asp.net update panel, that will help too.
    I did not know what part of the code I should share, please let me know if you need any code to understand this issue.
    There must be something on SharePoint script manager, and ajax manager, but I have no idea what.

    Hi,
    According to your post, my understanding is that you have an issue that the form could not submit after a period of inactivity.
    As the issue only occur while leave the form for a while, how about use the JavaScript
    setInterval method to send request to the server interval?
    You can use the JavaScript setInterval method or call a random SharePoint web service to send the request to the server to keep the form active, then check whether it works.
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • Trouble using Run Shell Script with python in Automator

    Hi. I have a python script I want to run in Automator (update_puzzles.py). All it does is check, rearrange and update files and there is not supposed to be any input. I can get the script to run outside of Automator, in Terminal, by navigating to the right directory and typing "python update_puzzles.py"
    I must not be setting up Run Shell Script correctly. I have it set to /bin/bash and Pass Input to stdin. The command line simply reads python /pathname/update_puzzles.py (where pathname is the path to the .py file, which I got by dragging the file onto the Run Shell Script command window). There are no actions before this in my workflow and the action after is View Results.
    The log says Run Shell Script failed, and the error is "Traceback (most recent call last):"
    Any suggestions?
    Thanks so much.

    If the script is expecting to do stuff with files in the same directory as the executable, you will probably need to add a statement to change to the appropriate working directory. The shell used in the Automator *Run Shell Script* action is a generic one that does not share any of the environment variables that the Terminal uses.

  • Pass multiple Automator variables to Run Shell Script?

    I have two Automator variables I'd like to pass to Run Shell Script. I'm missing something obvious, but how is this done?
    Thanks in advance

    i don't know a nice way to do it but in general any input passed to a shell script will be stored in $@ if input is passed as arguments.
    in particular, if you stack two "get value of variable actions" one after another and follow it by "run shell script" both variables will be stored in $@ as a list. just try it out with the default
    for f in "$@"
    do
    echo "$f"
    done
    You'll see that both variables will be echoed.

  • Run a script after a package is updated?

    Is it possible to run a script after a package is updated? I have Anki use a custom config folder (~/.anki instead of the default ~/Anki) and every time Anki updates it reverts back to the default folder. It's not such a burden to make a script that fixes this and run it manually after every update, but it would be nice if it worked automatically. So is there any way to monitor what pacman updates and run a script after it updates a certain package?

    If you're modifying a config file to change this, and pacman is overwriting it, consider adding the config file to pacman's NoUpgrade array in pacman.conf (man pacman.conf for details). If you feel that lots of people would benefit from this file being exempt from the upgrade process, file a bug report/feature request, and the maintainer may make the change in the package itself.

  • Running Shell Script

    Hi all,
    I need to run shell script on one of linux servers while executing some IdM workflow.
    There is no need to manage that server/ provision accounts / reset passwords etc but just to run the script and to process the result.
    I have IdM 8.04 installed on Windows Machine.
    What are my options to achieve that mission?
    Thank You,
    Alex.

    I was considering a situation similar to AD after actions where sometimes we execute a dos batch file for any specific purpose like creating home folder using mkdir. I was thinking on similar lines if your shell script is also for a specifc function similar to the one I mentioned above and if it is applicable in windows environment, you might covert that into a dos batch and do similar to an after action.
    Since you need your shell script to be run in UNIX / LINUX machine, I do not see any other way other than writing a java class and invoke within a wf as it was mentioned by etech or if you are planning on using any of the out of the box resource adapters, the AIX resource adapter reference might help, but I have not worked with that

  • Automator and "Run Shell Script" error

    First, if I'm in the wrong place with this- sorry. Figured this was an OS kind-of thing.
    I recently migrated to a new iMac ... I brought along an Automator script; I've been using it for years to perform a little rsync backup to an USB HDD. It's 'never' given me any problems ... until now!
    "*Run Shell Script*" encountered an error .. but alas, the system log is devoid of messages ... and the verbose log I have running indicates that all the files are copied/backed-up ... I would love any input on this that might help me get back on the feet. .....
    *Here's what my Shell Script Looks like:*
    Shell Option: /bin/bash
    Pass Input: to stdin
    rm -dfr '/Volumes/Backup HD/*********'
    rm -dfr '/Users/***********/Library/Logs/Profile_Backup.log'
    rsync -rltv /Users/******** '/Volumes/Backup HD/' > /Users/*******/Library/Logs/Profile_Backup.log
    (I'm sure there's way to only sync the changed stuff between backups ... but I've simply preferred the fresh copy approach).
    *I do however note this in my logs when I open Automator:*
    12/14/10 3:15:46 PM [0x0-0x42042].com.apple.automator.Backup[464] Application Stub: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.

    @Tony T1
    Thanks, I'll certainly adjust the log file as suggested
    In troubleshooting the problem I went the terminal route - and issued each command ... during the rsync process I was getting an error ... turns out when it was syncing the SyncServices folder it was encountering a copy of the keychain ... which had root permissions - naturally rsync was not able to copy the file (personally I have no idea why the keychain would be being sync'd with anything)!
    I removed the file from the sync ... I'm still doing some "debugging" to correct the problem-
    Again, thanks for the assist!

  • Automator - Run Shell Script - Does not return when script launches firefox

    Automator does not work the same on my MacBooks as my Mac mini! Both are latest Snow Leopard. I'm trying to automatically setup my MacBook after it decides if I'm at work, or elsewhere.
    The Automator Action "Run Shell Script" (Shell: /usr/bin/perl) does NOT return control when attempting to launch Firefox:
    system("/Application/Firefix.app/Contents/MacOS/firefox-bin -private news.google.com &");
    Note: the ampersand should cause Firefox to start as a background process.
    It only returns control after I close Firefox. I have a "Show Growl Notification" as the second action, so I know that the first action has not completed. Odd thing is that this works on my Mac mini. I also noticed that another difference: on my MacBook status is displayed in the top toolbar when the Automator application is running.
    Any ideas?

    Thanks, it worked. I forgot about stderr and stdin.
    I'm using Perl as it is part of a bigger script. I can quickly and easily figure out if I am at work where my MacBook is plugged into a network:
    my $ethernet = qx(ifconfig en0) =~ m{status:.active}xms;
    if ($ethernet) {
    # setup stuff for work environment
    } else {
    # setup stuff for mobile environment
    }

  • Output from Run Shell Script action

    Does anyone know what happens to the output of a "Run Shell Script" Automator action if there are no further actions? Does it simply get discarded, or does it end up in a log somewhere?

    It's the same for any action, nothing.
    The results passed on to the next action is generally just a list of file paths, or perhaps some text, or maybe a reference to a single item. In the "Run Shell Script" case, the result would likely simply be some text, perhaps as a list of lines.
    So, if there are no more actions, any of those results are just dropped.
    However, a list of files (or whatever) is actually just part of the results. An action performs some task on the input, or on the results from a previous action. In a sense, there can be said to be two parts to the "results". For example, perhaps an action changes some photos to black & white, so the photos will have been changed and then the paths to the photos (list of items) will be passed to the next action. The list of items is the only usable part for the next action, if there is a next action.
    You can use Automator's "View Results" action after it to see the results, TextEdit's "New Text File" to create a file with the previous results as the contents, TextEdit's "New TextEdit Document" to open a new document with the results as the document's contents, and so on.

  • Perl's __END__ doesn't work under Automator's Run Shell Script action

    Howdy,
    I have a large embedded data file in my Perl source file using the _END_ token. It works great at the command line, but when I copy and paste my Perl code into the Run Shell Script code window and execute it, reading the special file handle DATA always returns 0 lines.
    Help?
    -Eric

    Originally I was using $@ to parse a string and get the result pasted by the service. That was a while ago. There, I noticed that some Japanese characters were messed up. Basically all the kana characters that come with voicing markers like が-ga (instead of か-ka) etc. I did not have the time to pursue that issue though.
    Then, last night, I found that a colleague of mine had tried to use $@ to feed to a local dictionary application called ding (http://ftp.tu-chemnitz.de/pub/Local/urz/ding/). His problem was with characters that had umlauts. After verifying how he wrote his action I remembered that I had similar issues with Japanese.
    Basically his command was "/path/to/ding $@"
    That's supposed to use the selected string as an argument to pass to ding, which will launch a Wish application where the string is used as the searched item.
    From Terminal, that works a treat. But the exact same line in Automator (with input as argument, not as stdin) messed the composition and the resulting string was not recognized by ding as a match to what it was supposed to match.
    So, I tried a few things to get to the core of the issue and found that a simple "echo [accented characters]" was enough to reproduce the difference in string handling between Automator and Terminal. That difference is also reproduced on a number of person's machines.
    I have a number of services that basically revolve on "run shell script" actions and involve 3rd party application outputs, preference files etc. so it would not be convenient to show that to you.
    I have sent a mail about this issue to the automator list yesterday too:
    http://lists.apple.com/archives/Automator-users/2011/Jun/msg00004.html

  • How to prevent Automator's "run shell script" to create fully decomposed forms of my strings ?

    I am using Automator's "run shell script" and I am seeing that it outputs fully decomposed forms of my strings.
    For example, when I set the action to "echo été" in a service (with "Replace selected text" activated) and run that into a Textwrangler window, I'll get fully decomposed forms that Textwrangler won't understand. But when I simply type that command into Terminal, I get my string in composed form.
    The problem is not the display issue, but the fact that if I want to run grep for example in "run shell script", I will not be able to find the proper strings since the forms are different.

    Originally I was using $@ to parse a string and get the result pasted by the service. That was a while ago. There, I noticed that some Japanese characters were messed up. Basically all the kana characters that come with voicing markers like が-ga (instead of か-ka) etc. I did not have the time to pursue that issue though.
    Then, last night, I found that a colleague of mine had tried to use $@ to feed to a local dictionary application called ding (http://ftp.tu-chemnitz.de/pub/Local/urz/ding/). His problem was with characters that had umlauts. After verifying how he wrote his action I remembered that I had similar issues with Japanese.
    Basically his command was "/path/to/ding $@"
    That's supposed to use the selected string as an argument to pass to ding, which will launch a Wish application where the string is used as the searched item.
    From Terminal, that works a treat. But the exact same line in Automator (with input as argument, not as stdin) messed the composition and the resulting string was not recognized by ding as a match to what it was supposed to match.
    So, I tried a few things to get to the core of the issue and found that a simple "echo [accented characters]" was enough to reproduce the difference in string handling between Automator and Terminal. That difference is also reproduced on a number of person's machines.
    I have a number of services that basically revolve on "run shell script" actions and involve 3rd party application outputs, preference files etc. so it would not be convenient to show that to you.
    I have sent a mail about this issue to the automator list yesterday too:
    http://lists.apple.com/archives/Automator-users/2011/Jun/msg00004.html

  • Running shell scripts from within oracle. A big task is forgotten

    Dear List,
    I have some shell shell scripts which do some tasks on the linux OS level.
    I am calling the Korn scripts using a java class, which in turn is being called from a PLSQL function.
    All but one of the 10 script works fine. This is the script which does the most work, and takes on average 40 minutes usually.
    Why does Oracle forget the running of the shell script? I wait in my PLSQL function for the return code, but it never comes. The scripts I have not written myself !
    I look forward to your reply on this matter.
    regards
    Ben

    Hi
    If you are using the Oracle database 10g, the new dbms_scheduler package allows you to run shell scripts. The dbms_scheduler.create_job procedure have one parameter called the job_action in which you specify the full path of the shell script.
    I hope this will help

  • The first 7 or 8 letters of a sentence are jumbled as I type. This happens only after a period of inactivity. Short or long. I start to type and a word like 'anybody', looks like this: 'ybodyan' I have done all the normal fixes. No luck. Ideas? Thx

    The first 7 or 8 letters of a sentence are jumbled as I type. This happens only after a period of inactivity. Short or long. I start to type and a word like 'anybody', looks like this: 'ybodyan' I have done all the normal fixes. No luck. Ideas? Thx

    It's in every text-input app I use in my normal day.....most frustrating as you have to do a doublecheck especially in documents which do not have any special spellcheck system. I've done the cleanmymac, maintenance, cocktail, PRAM reset, Font Cache Smash fixes.....and still I'm dogged by this. Its almost as though the motherboard or some interface system is 'sleeping' longer than it should (if there are any input areas of the MBP which rest during short periods of inactivity) and then the initial keystrokes on the keyboard are somehow not registered and only 'kick in' once half of a new word's characters are already on the screen........grrrrr.

Maybe you are looking for

  • Select options_For file

    Hi, I want user can select file for many where in presentation server. I am using SELECT-OPTIONS : p_file for rlgrap-filename no intervals.But here we dont get serach help . Ivneet

  • Exception Handling for a Form Based on a Table

    I created a form based on a table. If a user tries to enter a record with key data that matches an existing record, Oracle Portal creates a page and displays: Error: An unexpected error occurred: ORA-00001: unique constraint (TIMETRACK.SYS_C007185) v

  • HT4211 Help. Can't mirror display with ios7, ipad 2, hdmi converter to tv.

    Recently updated to newest OS 7.0.2 on my ipad. For a presentation I need Keynote to be viewed on a tv with hdmi converter and hdmi cable. When I plug in and push play to test any videos or keynote nothing is mirrored to the tv. I did some research a

  • Will PC2 6400/800MHz work with my Early 2008 MacBook (4,1)?

    I am having a problem with upgrading new RAM.  I received new RAM sticks and they will not work with my Early 2008 MacBook(4,1) with OS Lion.  Here are the stick specs: Make: Kingston Product #: KTD-INSP6000C/2G Speed: PC2-6400/800MHz Pin count: 200

  • 4510 configuration

    How can I configure my 4510 to access internet through my cable wifi network?