UNIX command to open applications

I'm looking for a UNIX command to open any application on a client machine.
I am also looking for a command to set the time of each machine to use a Network Time Server.
Any help would be appreciated. Thank you.

open /Applications/path...
e.g.
open /Applications/Safari.app
time server:
# turn on network time and designate a network time server.
systemsetup -setusingnetworktime on;
systemsetup -setnetworktimeserver time.apple.com;
the time unix commands are available as a template from the send unix command window.

Similar Messages

  • Running Unix Command from WEB-APPLICATION

    Hi all,
    I want to run unix command from a java-based web application. the basic code part is this ---
    public class RunCommand
          public String runIt()
              String s = null, returnString = "";
              Process p=null;
              try
                       Runtime rt = Runtime.getRuntime();
                  p = rt.exec("sh testPOC.ksh");
                  p.waitFor();
                  BufferedReader stdInput = new BufferedReader(new
                       InputStreamReader(p.getInputStream()));
                  BufferedReader stdError = new BufferedReader(new
                       InputStreamReader(p.getErrorStream()));
                  // read the output from the command
                  returnString += "Here is the standard output of the command:<br>";
                  while ((s = stdInput.readLine()) != null) {
                      returnString += s;
                  // read any errors from the attempted command
                  returnString += "Here is the standard error of the command (if any): <br>";
                  while ((s = stdError.readLine()) != null) {
                      returnString += s;
              catch (IOException e)
                  returnString += "exception happened - here's what I know: ";
                  returnString += "error-> " + e.getMessage();
              catch(Exception e)
                returnString += "exception happened - here's what I know: ";
                  returnString += "error-> " + e.getMessage();
              return returnString;
      }this class is kept as an inner class. The control comes to its outer class, from servlet, from which the runit() is called. but the exception is occuring at line of p=rt.exec(.....). it tells "<command name> : not found transaction completed" [got this using getMessage() method].
    i am unable to show(and see, too) the stacktrace, because i don't have access to that test environment and its log. i can't run this in local because its windows one.
    now can anyone tell me, where is the problem. is there any limitation in web application server/container? this was successful when i used command prompt writing a .java file. Please help me. Thanks in advance...

    Friends, i've got, where the problem is.
    when we run a class file directly from a command prompt, we get an environment with that shell window. but for a servlet application running these kind of commands from a class creates kind of child processes. each and every command is executed as a child process of jvm and don't get those environment. we have 'PATH' variable in the environment. when a command (say, 'dir' or 'sh' or 'ls', etc.) is executed, the shell first search for that executable file (i.e. dir / sh / ls) in the given paths in the variable 'PATH'. this is not available for the child commands of jvm. hence the basic commands are searched in the current directory of the jvm and they are failed.
    i solved the problem giving full path of the commands. like :
    p = rt.exec("/bin/sh runningScript.ksh")

  • Using Unix commands from Java Application

    Hi,
    I need to write an Java application such that could run Unix commands in a Unix box.
    For example, my Java app needs to log in the Unix box, change directory (cd), create new folder (mkdir), list the current files in folder (ls), mount a new device (mount), etc.
    Thank you very much.
    Hung

    you can use java.lang.Runtime.exec to invoke OS commands, but if you're going to be completing a sequence that complicated and need to manage error handleing well, it might be best to just invoke a native method or write a shell script that does all of that stuff and then invoke that script via Runtime.exec . The Runtime class has limitations when you start invoking processes that require user input (like 'su'). Search the forums for more extensive examples on how to use Runtime.

  • Applescript to run terminal command then open application..

    Hey,
    I've installed the add-on to make the Lion Finder sidebar icons colored again, but whenever I reboot my Mac, I have to execute a killall Finder to get those icons back. This also closes TotalFinder, which is an addon I use. So, I want to write an AppleScript which will run on startup, and do those two things: run the Terminal command, and then open TotalFinder.
    I've written:
    tell application "Terminal"
        activate
        do script "killall Finder" in front window
        quit
    end tell
    tell application "TotalFinder"
        activate
    end tell
    This gives me an error stating "Connection is invalid." when running the activate line for TotalFinder. The Terminal command is executed correctly. Any idea why this is? The application is definitely named correctly, its just in my root Applications directory so it should be able to find it, etc. How can I get this working?
    Thanks!

    try this:
    do shell script "killall Finder"
    tell application "TotalFinder"
              try
      activate
              end try
    end tell
    First thing you don't need to open a terminal window to do the killall you can just do to as a shell script.
    Second don't know why TotalFinder gives that message about Connection invalid but it doesn;t seem to affect it any. So putting in the try just eats the error message.
    Ypu may not even need the killall, When TotalFinder starts it restarts the Finder so you may be able to remove the killall
    regards

  • UNIX command open. How do I get around warning screens?

    Hello
    I am trying to run an installation of an app program through UNIX commands, since I want to deploy it using ARD. This app is actually an Adobe CS5 update. I managed to get it the installation started using the OPEN unix command. However, I am prompted with a security warning "Installer" is an application downloaded from the insternet. Are you sure you want to open it" Of course the answer would be yes, but I want to do this with no user intervension. Any ideas to get around this?

    Automating as far as building disk images, or packaging for mass deployment on an ad hoc basis?
    As far as building disk images goes, you might want to get into InstaDMG to build fresh, never-booted OS images. For packaging and deployment on an Ad Hoc basis, there are a number of options: Radmind (although this deals less with packaging and IMO acts more like DeepFreeze), Casper Admin Suite (I use this tool), Munki, etc. There's also DeployStudio but I don't know much about this one.
    Munki, DS, and Radmind are free/open source, Casper is pricey, but worth it if you have a large number of macs to manage.

  • Since switching to Firefox this week, when I click on a hyperlink in an e-mail in Outlook, I get this message, "General failure. An error occurred in sending the command to the application." It doesn't open a new window or do anything.

    Since switching to Firefox this week, when I click on a hyperlink in an e-mail in Outlook, I get this message, "General failure. An error occurred in sending the command to the application." It doesn't open a new window or do anything. Any work around to fix this?

    See this lnk for a fix, it worked for me!
    http://www.pcworld.com/article/200103/fix_outlook_general_failure_error_for_email_links.html

  • Open application via. command line with parameters - Multiple times

    I'm using ANT to compile a program, then launch in FireFox ... I've looked all over for a solution to this, but have yet to find one.
    I need the command to open a specified URL in FireFox... easy enough, right?
    Solution #1 was to use the "open -a" command, with the URL- so "open -a FireFox.app/ http://someURL.com" ... the problem with this is that it opens a new window or tab every time- its a minor annoyance, but when you do 100 or more compiles during the day, its quite annoying.
    Solution #2 is to actually launch the program executable (FireFox.app/Content/MacOS/firefox) using the argument -url and that makes it so FireFox opens the URL in the current & front-most window. This worked great the first time, second time I get an error saying "A copy of Firefox is already open. Only one copy of Firefox can be open at a time."
    Anybody know how to make it so I don't have to close a window every time I compile? Your help would be greatly appreciated.
    Thanks!
    -Eric
    Message was edited by: eheaton

    If you don't get an answer here, you might try reposting in the UNIX forum. That's where the command line experts tend to hang out. Good luck.

  • "An error occurred sending the command to the application" When trying to open excel document from outlook 2007

    Error message "An error occurred sending the command to the application" When trying to open excel document from outlook 2007.
    OS: Windows Server 2008 R2
    If I save the document then it opens fine, messing with default file associations does not resolve this problem, I've googled for ir it and some suggest unticking compatibility mode or "run as admin" for excel application, neither is selected in my case.
    Outlook is configured to run as remote application from remoteApp server, this error is only occurring for one user, for others excel documents open just fine.

    Hi
    Thank you for using
    Microsoft Office for IT Professionals Forums.
    From your description, we can Create a trusted location follow these steps
    Click the Microsoft Office Button , and then click Excel Options.
    Click Trust Center, click Trust Center Settings, and then click
    Trusted Locations.
    If you want to create a trusted location that is not local to your computer, select the Allow trusted locations on my network (not recommended) check
    box.
    Click Add new location.
     IMPORTANT   We recommended that you don't make your entire
    Documents or My Documents folder a trusted location. Doing so creates a larger target for a hacker to potentially exploit and increases your security risk. Create a subfolder within Documents or My Documents, and make only that folder a trusted location.
    In the Path box, type the name of the folder that you want to use as a trusted location, or click Browse to
    locate the folder.
    If you want to include subfolders as trusted locations, select the
    Subfolders of this location are also trusted check box.
    In the Description box, type what you want to describe the purpose of the trusted location.
    Click OK.
    More detailed information you can refer to this link:
    http://office.microsoft.com/en-us/word-help/create-remove-or-change-a-trusted-location-for-your-files-HA010031999.aspx?CTT=1#BM12
    Please take your time to try the suggestions and let me know the results at your earliest convenience. If anything is unclear or if there is anything
    I can do for you, please feel free to let me know.
    Hope that helps.
    Sincerely
    William Zhou CHN
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Open applications not appearing in dock or command-tab.

    I am using 10.9.5 on a Macbook Air and I've noticed recently that open applications don't display icons in the dock.  Command-Tab also doesn't show the icons of all open applications either.  This seems to be recently occurring.  It's quite frustrating switching between applications when command-tab doesn't show the open application icons nor are the icons of open apps displayed in the dock.  Any ideas are appreciated.
    Thank You

    Open the Terminal in the Utilities folder. At the prompt paste the following:
         killall Dock
    Press RETURN. See if that helps.

  • After updating to 3.6.10 links in Outlook 2007 no longer open - "An error occurred in sending the command to the application"

    After updating to Firefox 3.6.10 this morning, Outlook 2007 can no longer open up links embedded in emails. Normally when you clicked a link it would open up Firefox and send you to the website, but when you click on any link it now says:
    General failure. The URL was: [url here]
    An error occurred in sending the command to the application.
    I don't know what happened. I didn't change any other settings on the computer.
    I am running Windows 7 64 Professional, MS Outlook 2007 with latest updates, and Firefox 3.6.10

    Please read this article to see if it helps:
    https://support.mozilla.com/tiki-view_forum_thread.php?locale=en-US&comments_parentId=542907&comments_offset=20&comments_per_page=20&forumId=1
    Also, you might try this first:
    https://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes

  • I changed from IE to Firefox. When I click on a shortcut in an email, I get the message "an error occurred in sending the command to the application" in Outlook. It doesn't stop Firefox opening and going to the site, but is annoying.

    I changed from IE to Firefox. When I click on a shortcut in an email, I get the message "an error occurred in sending the command to the application" in Outlook. It doesn't stop Firefox opening and going to the site, but is annoying.

    See:
    *http://kb.mozillazine.org/Windows_error_opening_Internet_shortcut_or_local_HTML_file_-_Firefox

  • Command line: Error: unable to open '/Applications/flex_sdk_4\frameworks\flex-config.xml'

    Hi,
    I am new to flex. I am trying to use the xmp sdk to create custom file info panels in photoshop.
    I am going through the example show in the adobe documentation 'Building a panel with Flex SDK'
    I got any running and I got all the files setup in the proper folders but I cannot for the life of me figure out why I keep getting this error.
    Buildfile: /Volumes/three/2011/XMP/test project/build.xml
    clean:
    buildPanel:
         [echo] --> Panel 'Test2'
        [compc] Adobe Compc (Flex Component Compiler)
        [compc] Version 4.5.1 build 21328
        [compc] Copyright (c) 2004-2011 Adobe Systems, Inc. All rights reserved.
        [compc] command line: Error: unable to open '/Applications/flex_sdk_4.5\frameworks\flex-config.xml'
        [compc] Use 'compc -help' for information about using the command line.
    BUILD FAILED
    /Volumes/three/2011/XMP/test project/build.xml:20: compc task failed
    Total time: 616 milliseconds
    thanks,
    digitalkyle

    can you tell us where your services-config.xml file is
    located. can you make sure it is right under the "src" folder of
    the Flex Builder project.
    Hope this helps.

  • Command, Tab option not showing all open applications

    Hi,
    Just upgraded to Mountain Lion and now when using the combination of Command+TAB not all open applications are displayed.
    This seems like a bug or am I missing something

    I want to add to list as having same issue... Even core Apple programs not showing up (Safari, iPhoto) in Command Tab. But Mail, iCal do show up in Command + Tab.  Also noticed that only some applications "minimize window into the application icon", while others get minimized to bottom right of Dock.  Additionally no "Show indicator lights for open application" appears for those missing programs.  I attempted to select-unselect both of those in the Preferences -> Dock options and restart a few times, with no success.
    The same programs missing from Command + Tab are also missing a graphic icon in Dashboard view (only Application Name appears).
    Issue is new to OS X Mountion Lion, I did not have that problem before.

  • How can I import eex files into Applications EUL from the unix command line

    How can I import *.eex and *.dis files into an Applications EUL from the unix command line?
    Thanks

    Hi
    The simple answer is you either have to use the client tool DIS51ADM to import files using the command line (Discoverer Admin is a windows only client tool), or the Java command line which needs a browser.
    In theory if you have a browser running on your Unix box you may be able to use the Java command line to make this work.
    Best wishes
    Michael

  • "Switch between open applications" command does no...

    I dont know why the "Switch between open applications" command does not work with my E7 when i updated my phone to belle which was last week. Also, i cant mass text with this OS, max of 5 reciepients only. When the phone was still anna, both or all commands were functioning properly...

    That is obviously a point of view that many would share. However, it does not really answer the question :-).
    When using multiple Desktops with many open apps using Cmd + Tab can require a lot of keystrokes - even if you use Cmd + Shift + Tab to move backwards.

Maybe you are looking for