Command On Mac For Force Shutdown Of A Program

Summary

JumpCloud lets you run commands across any number of systems (Windows, Mac OS X or Linux) or tags in parallel. Once you have a good understanding as an Administrator of Using the Commands Tab, you may determine further ways that you can orchestrate your IT activities using JumpCloud.

This article will help to provide you requirements, examples as well as configuration information for installing third-party applications to your JumpCloud managed systems using the Commands Tab.

Command on mac for force shutdown of a program usingCommand On Mac For Force Shutdown Of A Program

Prerequisites

Before getting started with installing any applications on Windows or Mac OS X using the Commands tab, there are several considerations that will need to be evaluated. You will need to refer to your software vendor’s documentation or support resources to ensure that the package will be supported with JumpCloud per the prerequisites listed:

  • OS X has a special window dedicated to helping you shut down unresponsive applications. You can access this window using one of two methods: By clicking the Apple logo in the Menu Bar and selecting Force Quit. By using the keyboard shortcut Command-Option-Escape.
  • Shut down or Restart with keyboard shortcut. Power button: Press the power button to turn on the Mac or wake from sleep. Press and hold the power button for 5 seconds without lifting to force your Mac to turn off. Press and hold power button for 1.5 seconds to get the turn off dialog. This dialog will ask if you want to restart, shutdown or put.

Command-line Installation Support

While this requirement may seem like an unspoken one, in order to successfully install the application to a JumpCloud-managed system it will need to support execution from the command-line. This is important being that not all packages support non-UI installations.

Force Quit with Mac Shortcut. To do the same thing but faster, use Mac shortcut keys to close frozen applications. On your keyboard, press and hold Command + Option + Esc. It will immediately bring up a “Force Quit Application” window. Select the frozen application from the dialogue box and select “Force Quit.”. See full list on wikihow.com.

Windows

In many cases EXE as well as MSI installation packages (Refer to Windows Installer wikipedia article for more information) will be supported. MSI packages in particular are provided for system administrators who would need to deploy the software to several terminals over a network connection. There shouldn’t be any major differences when comparing an MSI and EXE from a functionality standpoint, however there may be additional options available for MSI packages such as performing “silent” installs or having additional pre-configuration options. Because of this, MSI packages may in some cases be more compatible with the JumpCloud Commands tab. Please refer to your software vendor’s documentation and support for further information on the best options and supported methods.

Mac OS X

As with Windows, application vendors will distribute different application package types when working with a Mac OS X application. This may include DMG files, PKG files, compressed archives (.zip, .tgz, etc.) or even flat application files. A DMG file is a disk image, which will require the image to be mounted to the system in order to view it’s contents. Because of this, you may find that application deployment will be more preferred using either PKG files, compressed archives or application files but your vendor documentation and support can provide you direct advisement.

Unattended or Silent Installation

The Commands tab works in such a way that commands are sent to the system for execution and a pass/fail results along with any command result details are displayed within JumpCloud. Because the Commands tab does not present the administrator with an interactive session when performing execution, it is required that all application installations have “silent” or “unattended” installation options. The functionality and terminology can differ from software vendor to software vendor so this may require discretion on your part. By definition a “silent” install should be one that does not display any indication of progress, while an unattended installation is once which does not require user interaction. Explicitly, JumpCloud requires an “unattended” installation which does not require user interaction, but note that some vendors will in fact refer to this as “silent”.

As an example, our very own (Windows) Command Line Installation KB article is a great example that outlines command-line install to a Windows system where a unattended/silent option is available. There are three flags available for our EXE to aid in unattended installations in the form of /SILENT,/VERYSILENT and/SUPPRESSMSGBOXES:

JumpCloudInstaller.exe -k CONNECT_KEY /VERYSILENT /NORESTART

Setup & Execution

Using Upload File with the Commands Tab

You can upload one or more files to be pushed to the server prior to executing the command, including an installation package. The file push occurs immediately before the command is executed, so you can update the files anytime, and know that the next time your command runs, it will have the latest update. You can include any data you like, such as a tarball, that your script can untar and utilize for any purpose.

Note that the Upload File functionality within JumpCloud only supports files of 1MB or smaller size. If your installation package is larger than this, you may want to refer to the next section for downloading a file from a web-hosted source or placing in a centralized network destination external to JumpCloud.

  1. From the JumpCloud Administrative Console, click on the Commands tab on the left-hand navigation
  2. Click the + button at the top-left to create a new command
  3. At the top of the Execute Command window choose either Linux, Windows orMac depending on your target system(s)
  4. Before populating your installation command into the main pane, click Upload File under the Files section to attach the installation package
  5. Once selected, take note of the File Destination field and it’s default value. Feel free to specify a different local directory on the target machine as needed
  6. Populate your installation command, and take note that you will need to specify the full package path was was specified in Step 5
  7. Choose the target Systems and or Tags that you would like to execute to from the right-hand side
  8. Choose to either Save & Run Now, or click Save for later usage

Downloading Installation Packages

While planning your deployment strategy, you may find that you want to look at other alternatives than the native Upload File functionality provided. This could be due to considerations ranging from the 1MB file limitation that is discussed above, to trying to have a more streamlined method of package acquisition that allows for management external to JumpCloud.

One option that is available to you is to use Windows PowerShell or Bash Shell (Mac OS X) to download a file from a web server for subsequent install.

Windows PowerShell

Command On Mac For Force Shutdown Of A Program

The following PowerShell command will download a file from a web server to the local machine, and allow you to specify the directory it lives:

(New-Object System.Net.WebClient).DownloadFile('<FILE_DOWNLOAD_WEB_PATH>', '<LOCAL_FILE_DOWNLOAD_PATH>')

Below is an example of the command which is downloading the Windows JumpCloud Agent, and placing the file into the C:WindowsTemp directory. This is purely an example being that the JumpCloud agent must be installed prior to the ability to send commands to the system:

(New-Object System.Net.WebClient).DownloadFile(“https://s3.amazonaws.com/jumpcloud-windows-agent/production/JumpCloudInstaller.exe”, “$env:TEMP/JumpCloudInstaller.exe”)

Mac OS X

The following Bash Shell command will download a file from a web server to the local machine, and allow you to specify the directory it lives:

curl -o <LOCAL_FILE_DOWNLOAD_PATH '<FILE_DOWNLOAD_WEB_PATH>'

Below is an example of the command which is downloading the Mac OS X JumpCloud Agent, and placing the file into the /tmp/ directory. This is purely an example being that the JumpCloud agent must be installed prior to the ability to send commands to the system:

curl -o /tmp/jumpcloud-agent.pkg 'https://s3.amazonaws.com/jumpcloud-windows-agent/production/jumpcloud-agent.pkg'

Executing the Command

At this point you should now have a good understanding on what is required prior to command execution for an application installation. Once you have confirmed that your package supports command-line installation, allows for unattended options and have determined how you will upload/download the installation to the target system you are ready for install.

For more information on the options available with Commands, please refer to Using the Commands Tab.

Force

If you require have any questions or concerns, please contact support@jumpcloud.comfor further assistance.

We’ve all seen the spinning beachball appear on our Mac’s screen and grown in frustration as we wait for the application that has hung to respond. Sometimes it doesn’t and we have to resort to force quit to shut it down and start again. But what happens when force quit is not working? We’ll answer that question and show you exactly what to do.

Command On Mac For Force Shutdown Of A Programming

A quick replacement for Force Quit is found in CleanMyMac X. This program by MacPaw has a tool that switches off your hanging apps (and checks if they take up too much memory). We’ll show you how to use it later in the article.

Download the free version of CleanMyMac X here (app is notarized by Apple)


Why force quit?

Force quitting an application is a pretty drastic course of action. It tells the app to stop what it’s doing immediately and not to display any of the dialogs it might usually show you before it closes. However, it can be useful, despite the risk of losing data, if the app in question hangs and fails to respond for several minutes, and especially if it causes the rest of your Mac to hang or even just slow down.

How do you force quit?

There are several different ways to force quit an application.

  • Press Command-Option-Escape, select the app from the box that opens, and press Force Quit.
  • If you can access the Apple menu, click on it, choose Force Quit, select the app and press Force Quit.
  • Right-click or Control-click on the app’s icon in the Dock and choose Force Quit.

Try to force quit it from the Dock

If you hold down Option and click on an app in the Dock, you will see an extra option for Force Quit. See if that one works.


What to do when an application won’t force quit

Sometimes none of the options above works and the app carries on hanging. Don’t worry, there are other things you can try.

Use Activity Monitor

Activity Monitor is designed to allow you to monitor the performance of processes on your Mac. However, it can also quit those processes and so force quit the apps running them.

  1. Go to Applications > Utilities and double-click Activity Monitor to launch it.
  2. Click the CPU column header to order processes according to the CPU cycles they are using.
  3. The process causing the application to hang will probably be at or near the top. Select it then press Quit Process.
  4. The app should now force quit.

Use CleanMyMac X’s Optimization module

Force
  1. If you don’t already have CleanMyMac X installed on your Mac, download it here and install it.
  2. Choose Optimization in the sidebar. Then click View all Items.
  3. Select Hung Applications, then the app you want to quit and press Quit at the bottom of the window.

Disable Launch Agents

Many processes displayed by Force Quit performed by a class of applications called Launch Agents. It could be an automatic app updater that works invisibly in the background. The same tool we’ve just described has a sub-menu called Launch Agents (see the screenshot above). It will force quit the unwanted launch agents — when the regular Force Quit doesn’t work.

Use Terminal

If, for some reason, Activity Monitor doesn’t do the job, or you can’t launch it, try using Terminal instead.

  1. Go to Applications > Utilities and double-click Terminal to launch it.
  2. Type: ps -ax
  3. Press Return.

You will now see a list of running apps and processes in the Terminal window. Locate the application you want to force quit. (Its row will start /Applications/). Now, the quitting part:

  1. Note the number on the far left of the row, that’s the PID.
  2. Type: kill [PID] (replace [PID] with the number you noted down in step 6).
  3. Press Return.

Restart your Mac

If none of the methods we described above works and the application just won’t quit, you may need to restart your Mac. Normally, we’d tell you to click on the Apple menu and choose Restart. But if a misbehaving app won’t force quit, the chances are that it has grabbed most of the resources on your Mac and caused it to beachball, meaning you can’t click on the Apple menu. So here’s what to do.

  • Press and hold the power button (if you have a MacBook with a Touch Bar, it’s the Touch ID button).
  • Wait until you see the Apple logo on the screen.
  • Release the power button and wait for your Mac to restart.

Check for an update to the misbehaving app

The first thing you should do after you restart is try and figure out why the application was misbehaving. And the first step in that process is to check to see if you’re running the latest version.

If the app was downloaded from the App Store, you can check it there. If not, clicking on the [APP NAME] menu will normally display an option to check for updates.

However, there is an even easier way. CleanMyMac X (the app is available for a free download here) allows you, with a couple of clicks, to check multiple apps for updates at the same time, then with another click, update them.

See Full List On Wikihow.com

  1. Choose Updater in the sidebar.
  2. Check the box next to the apps you want to update.
  3. Press Update.

Command On Mac For Force Shutdown Of A Program Download

It can be very frustrating when an application stops responding or starts beach balling. It’s even worse if the app brings your whole Mac to a standstill. However, force quitting the app usually solves the problem. There are a number of different ways to force quit apps, all of them described above. If you think your Mac’s force quit isn’t working, try a different method. Use the Optimize and Updater modules in CleanMyMac X regularly and you may never need to force quit an app again, and if you do, the methods we’ve described can help identify the culprit and quit it for you.