Script to start and stop screen sharing

I've had no luck finding an applescript that will launch system preferences and select screen sharing in the sharing tab. I want to use this as a rule in Mail so I can open screen sharing and subsequently close after use with Jaadu on my iphone for only the time while I want to access my home computer.
Is there anyone skilled at writing that for me?
Thanks,
Michelle

You can do it on the command line but you have to have admin privileges
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -help
kickstart -- Quickly uninstall, install, activate, configure, and/or restart
components of Apple Remote Desktop without a reboot.
kickstart -uninstall -files -settings -prefs
-install -package <path>
-deactivate
-activate
-configure -users <user1,user2...>
-access -on -off
-privs -all -none
-DeleteFiles
-ControlObserve
-TextMessages
-ShowObserve
-OpenQuitApps
-GenerateReports
-RestartShutDown
-SendFiles
-ChangeSettings
-ObserveOnly
-mask <mask>
-allowAccessFor
-allUsers [-privs <priv options>]
-specifiedUsers
-computerinfo -set1 -1 <text>
-set2 -2 <text>
-set3 -3 <text>
-set4 -4 <text>
-clientopts
-setmenuextra -menuextra yes
-setdirlogins -dirlogins yes
-setdirgroups -dirgroups ardadmin,ardinfo
-setreqperm -reqperm no
-setvnclegacy -vnclegacy yes
-setvncpw -vncpw mynewpw
-setwbem -wbem no
-stop
-restart -agent -console -menu
-targetdisk <mountpoint>
-verbose
-quiet
-help ## Show verbose documentation
Examples:
- Uninstall program files (but not preferences and settings), install the given package, and then restart the service.
kickstart -uninstall -files -install -package RDAdminInstall.pkg -restart -console
- Install the given package and then restart the ARD agent.
kickstart -install -package RDClientInstall.pkg -restart -agent
- On 10.4 and earlier, stop the Remote Management service but, if activated, it will start after the next computer restart.
- On 10.5 and later, use kickstart -deactivate instead.
kickstart -stop
- Stop the Remote Management service and deactivate it so it will not start after the next computer restart.
kickstart -deactivate -stop
- Restart the agent.
kickstart -restart -agent -console
- Activate the Remote Management service and then restart the agent.
kickstart -activate -restart -agent -console
- Activate the Remote Management service, enable access, and restart the agent.
kickstart -activate -configure -access -on -restart -agent
- Disable user access.
kickstart -configure -access -off
- Give admin and bob all access.
kickstart -configure -access -on -privs -all -users admin,bob
- Use Directory Server accounts for authentication. Users must be a member of one of the directory
- groups to authenticate.
kickstart -configure -clientopts -setdirlogins -dirlogins yes -setdirgroups -dirgroups ardadmin,ardcontrol
- Disable the Remote Management menu extra.
kickstart -configure -clientopts -setmenuextra -menuextra no
The following examples are only for Mac OS X 10.5 and later.
- Allow access for only these users (the users must be specified in a separate command).
kickstart -configure -allowAccessFor -specifiedUsers
- Allow access for all users and give all users full access.
kickstart -configure -allowAccessFor -allUsers -privs -all
- Start the Remote Management service.
kickstart -activate
Version 0.9
RUNNING FROM THE COMMAND LINE
This script can be run like any UNIX tool from the command line or
called from another script.
Before starting:
- Use this script at your own risk. Read it first and understand it.
- Log in as an administrator (you must have sudo privileges)
- Copy this script to any location you like (such as /usr/bin/local/)
- Ensure this file has Unix line endings, or it won't run.
Running:
- Run the script using "sudo" (enter your password if prompted)
sudo ./kickstart -restart -agent
Command-line switches:
The optional "parent" switches activate the top level kickstart features:
-uninstall
-install
-deactivate
-activate
-configure
-stop
-restart
These features can be selected independently, but will always be done
in the order shown above.
For anything interesting to happen, you must specify one or more of
the parent options, plus one or more child options for those that
require them. Child options will be ignored unless their parent
option is also supplied.
All options are switches (they take no arguments), except for -package
<path> -users <userlist> and -mask <number>, as noted below.
-uninstall ## Enable the "uninstall" options:
-files ## Uninstall all ARD-related files
-settings ## Remove access privileges in System Preferences
-prefs ## Remove Remote Desktop administrator preferences
-install ## Enable the "install" options:
-package path ## Specify the path to an installer package to run
-configure ## Enable the "configure" options:
-users john,admin ## Specify users to set privs or access (default is all users)
-activate ## Activate ARD agent in Sys Prefs to run at startup
-deactivate ## Deactivate ARD agent in Sys Prefs to run at startup
-access ## Set access for users:
-on ## Grant access
-off ## Deny access
-privs ## Set the user's access privileges:
-none ## Disable all privileges for specified user
-all ## Grant all privileges (default)...
## ... or grant any these privileges...
-DeleteFiles ##
-ControlObserve ## Control AND observe (unless ObserveOnly is also specified)
-TextMessages ## Send a text message
-ShowObserve ## Show client when being observed or controlled
-OpenQuitApps ## Open and quit aplicationns
-GenerateReports ## Generate reports (and search hard drive)
-RestartShutDown ##
-SendFiles ## Send and/or retrieve files
-ChangeSettings ## Change system settings
-ObserveOnly ## Modify ControlObserve option to allow Observe mode only
-mask number ## Specify "naprivs" mask numerically instead (advanced)
-allowAccessFor ## Specify the Remote Management access mode
-allUsers ## Grant access to all local users
-specifiedUsers ## Only grant access to users with privileges
-computerinfo ## Specify all four computer info fields (default for each is empty)
-set1 -1 <text>
-set2 -2 <text>
-set3 -3 <text>
-set4 -4 <text>
-clientopts ## Allow specification of several opts.
-setmenuextra -menuextra yes|no ## Set whether menu extra appears in menu bar
-setdirlogins -dirlogins yes|no ## Set whether directory logins are allowed
-setdirgroups -dirgroups grp1,grp2 ## Set directory groups allowed
-setreqperm -reqperm yes|no ## Allow VNC guests to request permission
-setvnclegacy -vnclegacy yes|no ## Allow VNC Legacy password mode
-setvncpw -vncpw mynewpw ## Set VNC Legacy PW
-setwbem -wbem yes|no ## Allow incoming WBEM requests over IP
-stop ## Stop the agent and/or console program (N/A if targetdisk is not /)
-restart ## Enable the "restart" options: (N/A if targetdisk is not /)
-agent ## Restart the ARD Agent and helper
-console ## Restart the console application
-menu ## Restart the menu extra
-targetdisk ## Disk on which to operate, specified as a mountpoint in
## the current filesystem. Defaults to the current boot volume: "/".
## NOTE: Disables the -restart options (does not affect currently
## running processes).
-verbose ## Print (non-localizable) output from installer tool (if used)
-quiet ## No feedback; just run.
-help ## Print this extended help message
ARD has four main components:
1) ARD Helper
2) ARD Agent & associated daemons
3) ARD Menu Extra (controlled by the SystemUIServer)
4) ARD Admin Console (if you have an Administrator license)
What this script does:
1) Any running ARD components will be stopped as needed. For example,
they'll be stopped before an uninstall, reinstall, or restart
request. They will not be restarted unless you specify the
-restart options.
2) Components will be restarted as required. For example, restarting
the administrator console forces a restart of the agent.
Restarting the agent, in turn, forces a restart of the helper.
3) If you -uninstall but don't specify a new installer to run, then
the -restart family of switches will be ignored.
4) Options can be specified in any order, but remember that the
options are ignored unless their parent options are specified. For
example, -package is ignored unless -install is specified.
RUNNING THIS SCRIPT FROM A GUI
You can make yourself a GUI-based kickstarter program to run this
script if you like. The options, set in the console, can be conveyed
via environment variables to this script, per a spec shown in the
source code for this script (or the traditional way using command-line
switches). Be sure the console application runs this script with sudo
privileges. The console should also specify its own location in the
APP environment variable, and may specify the location of a
STRINGS_FILE to use to load string definitions for any localizable
messages produced by this script.
A GUI console could stay up & running between runs of the script but
should avoid running multiple instances of this script at the same
time.
WARNING
This script can be used to grant very permissive incoming access
permissions. Do not use the -activate and -configure features unless
you know exactly what you're doing.

Similar Messages

  • How to create a .exe script to start and stop Oracle EBS R12 in Linux

    Hello,
    I have installed Oracle EBS R12 in Linux enterprise through Virtual box on windows 7 professional. It takes a long time to start and stop EBS as I have to start and stop the scripts manually - can someone please help me with the following (I have tried searching the web and Oracle for help but have had no joy);
    Q1. I want to create a executable file in Linux so I can double click the file in Linux to start EBS automatically instead of going through each script manually
    Q2. I want to create a executable file in Linux so I can double click the file in Linux to stop EBS automatically instead of going through each script manually
    you help will be appreciated.
    Ali

    I have installed Oracle EBS R12 in Linux enterprise through Virtual box on windows 7 professional. It takes a long time to start and stop EBS as I have to start and stop the scripts manually - can someone please help me with the following (I have tried searching the web and Oracle for help but have had no joy);
    Q1. I want to create a executable file in Linux so I can double click the file in Linux to start EBS automatically instead of going through each script manually
    Q2. I want to create a executable file in Linux so I can double click the file in Linux to stop EBS automatically instead of going through each script manually
    you help will be appreciated.Please see these links.
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Autostart+AND+Services&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Auto+AND+Start+AND+Services&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Managing Server Processes
    http://docs.oracle.com/cd/E18727_01/doc.121/e13675/T530130T530133.htm#5274555
    Thanks,
    Hussein

  • Windows script to start and stop jobserver only, with BOXI31

    hi,
    my question is easy but i have found nothing : on BOXI31
    how  to start and stop jobserver (adaptive...) automaticaly with windows script ?
    in tasklist command, jobserver have no services name...
    thank's

    In XI R2 you can stop & start job servers by their types, but in XI 3.1 I don't think you can do that, b'cos it doesnt list by server type just shows jobserver for crystal, webi & deski.
    Thanks,
    Hari

  • Maxl Script to Start and Stop Service

    Hi All,
    to stop essbase service i had used below  script in maxl  but it did not work
    alter system shudown;
    is there any script that  i want to stop Essbase services through MAXL  ?
    is there any script i want to start essbase services through MAXL?
    Thanks

    Its as simple as this :
      alter system kill request all;
      alter system logout session all;
      alter system unload application all ;
      alter application 'App' disable connects;
    Use all these when you are trying to Isolate the system from users .
    But to answer your question Unload command is nothing but Stop , load is start !

  • Script to auto start and stop an application

    Ok, I'm looking for an easy solution, maybe someone can point me in the right direction:
    I have a security camera program that runs on a Mac Mini that I would like to start and stop at a specific time of day. Is there an easy way to create an Applescript to do that?
    Thanks much in advance.

    Two scripts and iCal can do this for you. However, it assumes that your workstation is always logged into the Finder and that your app can be scripted beyond start and stop.
    --Script 1, launch application
    tell application "name of security app"
    activate
    -- do more stuff here like start capture
    end tell
    --Script 2, quit the application
    tell application "name of security app"
    quit
    end tell
    Save them both as scripts and then use iCal to make two repeating events. One to start the app and the other to stop it. Attach your scripts as event actions. Then sit back and let the iCal schedular the rest.

  • Stop and restart screen sharing

    When I call stop() on the ScreenSharePublisher it seems like it's not stopped in the right way or something. If I try to start it again I get this trace:
    ERROR:The Connection wasn't closed properly by abrupt killing of sharing instance.
    You need to call stop screen sharing, close the client browser and addin and relaunch screen sharing again
    and nothing happens. Am I missing something essential here?
    private function startDesktopSharing():void {
         if (screenShare != null && !screenShare.isPublishing) {
              trace("startDesktopSharing")
              screenShare.publish();
    private function stopDesktopSharing():void {
         if (screenShare != null && screenShare.isPublishing) {
              trace("stopDesktopSharing");
               screenShare.stop();
    I get my traces so I know that it's not publishing when I try to publish it again at least. Can't I stop and start it again right away?

    Can you enable log tracing and send us the client and addin logs when the problem occurs ? The instructions are here: http://forums.adobe.com/thread/786297?tstart=0

  • Is there a DJ app for the Ipad that will read the "start" and "stop time" setting for each individual song, as they are set in the song Options screen in Itunes?

    Is there a DJ app for the Ipad that will read the "start" and "stop time" setting for each individual song, as they are set in the song Options screen in Itunes? The Ipod Touch, by itself does not allow cross-fading, therefore when the stop time is edited short, the song jusst truncates then goes to the next song. I tried the DJay ap and while it would crossfade, it would NOT read the song settings for the stop marker. So now I want to try and Ipad and see if there is an app that will READ the Itune stop settings within the song. I do NOT want an app that will allow me to DO the stop marker. I want an app that will READ the stop marker from the song as it is set in Itunes.

    Itunes provides the option for setting the Start and Stop times of each music track.  However, the start and stop times do not synchronize to the iPhone.  I don't understand why this option is even available as it doesn't work when listening to music on the phone.  I have not found another application that will support the start and stop time markets.  I have searched quite a bit for this but can't find anything.  I hope we can find something. 

  • How to create services start and stop automation script for diff servers

    Hi All,
    i want to create a bat file for automation purpose to start and stop services
    i have some services in 1st server aand some in 2nd server and some in 3rd servers.
    has you all know i have to follow sequences to start and stop services can any help me in creating .bat by linking 3 servers fo starting and stoping services.
    Thanks in advance
    Regards
    SM

    Hi,
    this is the list of start oder for services in 11.1.2.1 from the Installation and Configuration Guide
    1. Databases for repositories.
    2. Any corporate user directories that you plan to configure for use with Shared Services.
    3. Foundation Services Managed Server application server, which includes Shared Services,
    and EPM Workspace.
    4. Reporting and Analysis Framework — Agent Service (if required for your environment)
    5. Reporting and Analysis Framework Application Server (if required for your environment)
    6. Web server
    The remaining services and processes can be started in any order:
    1. Performance Management Architect Services
    2. Performance Management Architect application server
    3. Performance Management Architect Data Synchronizer application server
    4. Essbase Server
    5. Administration Services application server
    284 Starting and Stopping EPM System Products
    6. Integration Services Server
    7. Essbase Studio Server
    8. Provider Services application server
    9. Financial Reporting Services
    10. Financial Reporting application server
    11. Web Analysis application server
    12. Calculation Manager application server
    13. Planning application server and the Hyperion RMI Registry
    14. Financial Management service
    15. Financial Management Web application server
    16. Strategic Finance service
    17. Performance Scorecard application server
    18. Performance Scorecard Alerter application server
    19. Profitability and Cost Management application server
    to start services on different servers you can use the sc command in your batch file
    for eg
    sc \\10.121.201.21 start HypS9FrameworkAgent

  • Web Sharing Start and Stop routines...

    Does any one know where to find the actual start and stop methods that get executed when you turn on/off Personal Web Sharing in System Preferences. A long while back I found where those were to do some custom event upon web sharing start-up/shut-down, and now I can't remember where those are located.

    http://discussions.apple.com/thread.jspa?messageID=6792272&#6792272
    answered my question, which helped me to find an error:
    sudo /usr/sbin/apachectl start
    Syntax error on line 241 of /etc/httpd/httpd.conf:
    Cannot load /usr/libexec/httpd/modhfsapple.so into server: (reason unknown)
    /usr/sbin/apachectl start: httpd could not be started
    it appears that this Apache module: modhfsapple.so file is missing. (It was in the locate database, but the file is now gone) I recently had some disk errors and restored from a backup drive, but maybe the backup itself had been missing some of the same files. Bummer.
    Now I am wondering if I have to reinstall 10.4 from the DVD or if I can somehow repair/reinstall just the Apache modules to get Personal Web Sharing up and running again?
    It's probably safer to reinstall the whole OS, since I don't really know what other bits and pieces might be missing. I have one Intel Mac and one PPC Mac, so I don't think I could safely pilfer the missing shared object module from one to the other.

  • CC&B start and stop script

    Hi,
    has any one automated the start and stop script for backup.
    Please share the script.
    Regards
    TAI

    Hi,
    I don't believe there is a single script that can fit all installation of CC&B .
    Backup usually has a strategy and a plan.
    In our installation we run incremental backup daily for the database, and full backups weekly and montly. As for the application, full backup daily. Also we have several application servers running and the database has RAC installation.
    So I guess you will need to review your backup strategy consider existing backup solutions in the market.
    AK

  • Action Script 3 code not working for start and stop button?

    Ok so I have this simple animation I created of a circle that moves from one side of the stage to the other. I have added a new layer and called it buttons. On this layer I have added 2 buttons. One for start and another one for stop. The purpose is to get my circle to move from one side of the stage to the other but be able to use my buttons so that I can start and stop the animations at random times during playback. I fixed all my compiler errors now the problem lies in that everytime I click the start or the stop button I get an output error. I have a 3rd layer in which is titled actions and this is where all my code is posted. I removed that layer and placed my code in the first frame of the buttons layer to see if this would change anything but I still get the same output errors. So I just added back my actions layer. What could I be doing wrong? I have made sure to name all my movie clips and buttons correctly and I even added an instance name to them.
    Here is my code and the errors I am getting when I press the play and stop button on test-
    start_btn.addEventListener(MouseEvent.CLICK, startCircle);
    stop_btn.addEventListener(MouseEvent.CLICK, stopCircle);
    function startCircle(e:MouseEvent):void{
        circle.play();
    function stopCircle(e:MouseEvent):void{
        circle.stop();
    green_btn.addEventListener(MouseEvent.CLICK, greenCircle);
    red_btn.addEventListener(MouseEvent.CLICK, redCircle);
    function greenCircle(e:MouseEvent):void{
        circle.play();
    function redCircle(e:MouseEvent):void{
        circle.stop();
    Here are my output errors-
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at exercise2_fla::MainTimeline/redCircle()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at exercise2_fla::MainTimeline/greenCircle()

    ok so my circle is my movie clip and it is titled circle and the instance name is circle. Am I supposed to change MovieClip to circle? I put the code at the top of my actions script but for some reason it did not work. I did change play to stop and it got the movie clip to stop when I do test movie but my buttons still do not work. So I changed stop back to play. Strange.
    I did try changing MovieClip to circle but that did not work so I did Circle with a capital C and that did me no good eigther.
    I meant to add that I did get an error that said- 1180 Call to a possibly undefined method circle.

  • Batch file to start and stop

    Hi All,
    Can we create a batch file to start and stop the services. I need to start all the services like shared, essbase, eas, planning, webanlysis and financial reporting, and at also need to stop them using windows batch file.(Using windows 2003 server....service pack 1). Any help would be appreciated.
    Thanks

    Hi,
    The simplest script would be something like this. Save it as a .bat file, set all your services to manual and then set up a scheduled task to run this script when the computer starts.
    Gee
    ::          Startup Script for Hyperion Services          ::
    date/t >> startup.log
    time/t >> startup.log
    echo "Starting Hyperion Services" >> startup.log
    net start "Hyperion S9 OpenLDAP" >> startup.log
    net start "Hyperion S9 Shared Services" >> startup.log
    :: Insert pause of 5 seconds to ensure HSS has finished starting
    ping localhost -n 6 >nul
    net start "Hyperion S9 BI+ Analytic Services 9.3.1 - Essbase" >> startup.log
    net start "Hyperion S9 Administration Services ATS5" >> startup.log
    net start "HyperionRMIRegistry" >> startup.log
    net start "Hyperion S9 Planning" >> startup.log
    net start "Hyperion S9 Provider Services ATS5" >> startup.log
    net start "Hyperion S9 Apache 2.0" >> startup.log
    net start "Hyperion S9 BI+ 9.3 Core Services 1" >> startup.log
    :: Insert pause of 10 seconds to ensure Core has finished starting
    ping localhost -n 11 >nul
    net start "Hyperion S9 BI+ 9.3 Workspace" >> startup.log
    net start "Hyperion S9 BI+ 9.3 Financial Reporting Java RMI Registry" >> startup.log
    net start "Hyperion S9 BI+ 9.3 Financial Reporting Print Server" >> startup.log
    net start "Hyperion S9 BI+ 9.3 Financial Reporting Report Server" >> startup.log
    net start "Hyperion S9 BI+ 9.3 Financial Reporting Scheduler Server" >> startup.log
    net start "Hyperion S9 BI+ 9.3 Financial Reporting Web application" >> startup.log
    net start "Hyperion S9 BI+ 9.3 Web Analysis" >> startup.log
    date/t >> startup.log
    time/t >> startup.log
    echo "Finished Starting Hyperion Services" >> startup.log
    echo "###################################################################" >> startup.log

  • Need help getting Tomcat 5.0.28 to start (and stop, eventually)

    Hi!
    I am such a newbie to the Terminal and writing scripts, so please forgive my naiveté. I have successfully installed Tomcat in my /usr/local directory, but I am having trouble creating files to start and stop Tomcat, per the instructions on the following page:
    http://developer.apple.com/internet/java/tomcat1.html
    I've followed the directions but continue to get the following error after I execute ~/bin/start_tomcat.
    -bash: start_tomcat: command not found
    My file contains the following code:
    #!/bin/sh /n
    export CATALINA_HOME=/usr/local/jakarta-tomcat-5.0.28 /n
    export JAVA_HOME=/usr /n
    $CATALINA_HOME/bin/startup.sh /n
    If anyone can help me, I would really, really, really appreciate it!
    Thanks!
    PowerBook G4 12"   Mac OS X (10.4.5)  

    Why are there all those "/n" there? Either you or the place you copied from has the wrong slash. But still, it's wronger than that to have them at all: "\n" means a newline (i.e., press "return") not the actual "backslash en" characters. Sometimes people post code with those \n visible: by making it explicit where a line-break should be, one doesn't have as much trouble when a web browser reformats the text and puts line breaks where they don't belong.

  • Printing event start and stop times

    In month view, is there any way to have both the start and stop times for an event show when you print the calendar so you can see the duration of an event - thanks.

    You might be able to use this script to reset the start/stop times to zero.  Try with a small selection and see if it works for you.
    http://dougscripts.com/itunes/scripts/ss.php?sp=batchtrimtime

  • Adding Start and Stop characters to a text field???

    "For 1D bar codes, there are two options depending on the type of PDF form you want to use. Forms that you create in Acrobat (acroforms) can be set up to use a bar code font with a standard text field. If you want to include the standard start and stop character (*) and/or a check character, you can use JavaScript to add them. The check character would have to be calculated, but that can be easily done with JavaScript."
    How would i go about doing this. My current PDF form will pull a last name and first name onto the form in a Barcode format, but i need to add in *LNM to the start and another * at the end of the data that was pulled from a SQL data base.  example the pdf has a Text Feild named "borrower1_last_name" and that filed pulls the last name..  So i was thinking there should be an easy script like you said to add in to that feild properties.
    posting here now, becasue no one seems to be able to point me to the correct resourse on the reader forum.

    okay.. so now how do I change the space between the first name and middle inital (and even the last name) in that same field?
    something like this looks like it should work but doesnt seem to do anything.
    str.replace(/ /g, "_");
    // Add an asterisk to the beginning and end of the value
    if (event.value) event.value = "*FNM" + event.value + "*";
    //Replace black spaces with an Underscore
    str.replace(/ /g, "_");

Maybe you are looking for