

- Mac command for screenshot full#
- Mac command for screenshot password#
- Mac command for screenshot mac#
The same can be done if you open the image in Preview however, taking another screenshot will reload the image in Preview and reset any image resizing done to get a better view of the image. The Finder will immediately preview the updates for you. Once the file is saved, you can preview it in the Finder while in Column view, which can be useful for monitoring updates, as you can quickly run the command again to capture and replace the current image file. This command will instruct the system launcher to run the screencapture command as the designated user, which in this case is the UID of the target user, and then save the resulting file to your home directory.
Mac command for screenshot password#
Now you can use the target user’s ID in the following command (replace UID with the target user’s ID number, and FILENAME with the desired file name) to capture an image of his or her screen (provide your password when prompted): sudo launchctl asuser UID screencapture ~/FILENAME.pngįor example, the loginwindow processes listed above show me (tkessler) being logged in along with a user “zephyr.” When logged into my account, provided I have administrative rights, I can take a screenshot of the account “zephyr” by running the following command: sudo launchctl asuser 503 screencapture ~/zephyrshot.png Note that you can also use the Finder or Dock processes, as these are also only present as one instance during graphical logins for a given user. Since OS X dedicates one loginwindow process to each user session, this will output something like the following, which will give you the User ID you need for the accounts currently running graphical sessions on your Mac: 503 zephyr loginwindow

It will then filter these to only show the “loginwindow” processes that are running. This command will run the “top” process viewer utility once, and only display User ID, User Name, Process ID, and Process Names. Top -stats uid,user,command -l 1 | grep loginwindow
Mac command for screenshot mac#
Therefore, you need to determine who is logged onto your Mac graphically, which can be done in two ways: While you can list the current users by running the command “users” in the Terminal, this is not sufficient as these may be non-graphical sessions (e.g., SSH logins).

Mac command for screenshot full#
Keep in mind this ability does require you have full administrative rights for your Mac, and also requires the targeted user be logged in.įirst you will need to determine which users are logged into a graphical session on your Mac. Taking a screenshot of any user’s desktop just takes a couple of Terminal commands that can be done either locally, or remotely if you are logged into your system via SSH, and will be done without the targeted user knowing the screenshot has been taken.
