To make this working we should use other computer with ssh access and open the ssh connection on your host computer. The command stroke is long and the good idea to make an alias for it in .profile file of your current user. After this we should connect the host computer by current user and we must know login and password of this user. ;) Then we give the command in terminal and our screen shot will be saved in location pointed in our magic stroke. It sounds complicated, so we will look on it step by step.
On the first step we will add a stroke to .profile file:
alias sc='sudo launchctl bsexec `ps ax | grep [l]oginwindow | cut -c 1-5` screencapture -x /Users/username/screen.png'
Where 'username' is your current user login name. Change it for your system.On the second step enable ssh access to your system (see screen shot below). Follow "System Preferences... → Sharing". Check box must be enabled. Take a look - "Only these users" will restrict access additionally.
On the third step, if you use WiFi connection check out "System Preferences... → Network → AirPort → Advanced... → Disconnect when logging out" Check box must be disabled. (see screens hot below) If you have wired connection skip to next step.
On the forth step check your computer IP address and log out. From other device login to it and give the "sc" command. I used iPod Touch (see screen shot below):
When you login again, you'll find your screen shot in your active user home directory.
Easy, isn't it? ;)
No comments:
Post a Comment