## page was renamed from AppleMacintoshScreenshot
= Apple Macintosh =
The Macintosh marketed as Mac, is a line of personal computers (PCs) designed, developed, and marketed by Apple Inc.

== Take a Screenshot ==

'''cmd + shift + 3''', captures the whole screen to a file on the desktop.

'''cmd + shift + 4''', captures the selected area to a file on the desktop.

'''cmd + shift + 4 + space''', then click on the desired window we wish to capture, then the file is saved to the desktop.

'''ctrl + cmd + shift + 4''', captures the selected area to the clipboard. To paste use '''cmd+v'''.

== Enable full disk access to terminal (required for systemsetup in Terminal) ==
 * https://support.apple.com/guide/remote-desktop/about-systemsetup-apd95406b8d/mac
 * Apple
 * System preferences
 * Security and privacy
 * Full disk access
 * add Terminal and sshd 

== Enable remote login and remote management ==
 * Apple
 * System preferences
 * Sharing
 * Remote login and Remote management (computer settings, vnc viewers may control screen with password)
{{{#!highlight bash
systemsetup -getremotelogin
systemsetup -setremotelogin on
ping mac-laptop
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \
-activate -configure -access -on \
-clientopts -setvnclegacy -vnclegacy yes \
-clientopts -setvncpw -vncpw ***** \
-restart -agent -privs -all

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \
-deactivate -configure -access -off
# restart Mac 
# debian client 
sudo apt update 
sudo apt install vinagre
ssh -L 5900:127.0.0.1:5900 -C -N -l userMac mac-laptop
vinagre localhost:5900
ssh userMac@mac-laptop
# in Mac
sudo bash
dscl . list /Users
dscacheutil -q user
dscl . -create /Users/userMac
dscl . -create /Users/userMac UserShell /bin/bash
dscl . -create /Users/userMac RealName "User Mac"
dscl . -create /Users/userMac UniqueID 1001
dscl . -create /Users/userMac PrimaryGroupID 1000
dscl . -create /Users/userMac NFSHomeDirectory /Users/userMac
# define password in ********
dscl . -passwd /Users/userMac ********
dscl . -append /Groups/admin GroupMembership userMac
mkdir -p /Users/userMac
cd /Users
chown userMac userMac/
chgrp staff userMac/
ssh userMac@mac-laptop
dscl . -read /Users/userMac
dscl . -delete /Users/userMac
# in Debian
vinagre vnc://mac-laptop
}}}

== Install nodejs - Ionic test app ==
 * https://ionicframework.com/docs/v3/intro/deploying/
 * https://ionicframework.com/docs/developing/ios
{{{#!highlight bash
cd ~/Downloads
wget https://nodejs.org/dist/v14.16.0/node-v14.16.0.pkg
sudo installer -pkg node-v14.16.0.pkg -target /
node -v
npm -v
sudo xcodebuild -license # type agree at the end
# https://ionicframework.com/docs/v3/intro/deploying/
# https://ionicframework.com/docs/developing/ios
cd ~
mkdir IonicTest
npm install @ionic/cli
node_modules/.bin/ionic start IonicTest
#framework angular
#starter template tabs
#integrate capacitor N
#create free ionic account N
cd IonicTest
npm i
npm install @ionic/cli
npm install cordova
npm install cordova-res
node_modules/.bin/ionic cordova plugin add cordova-plugin-advanced-http
npm install @ionic-native/http
# configure xcode
# xcode, preferences, accounts, (+) Apple ID, type apple id, continue, Personal team, quit xcode
node_modules/.bin/ionic cordova platform add ios
node_modules/.bin/ionic cordova platform prepare ios
# create ios simulator
npm install ios-sim native-run
export PATH=$PATH:./node_modules/.bin
node_modules/.bin/ionic cordova build ios
node_modules/.bin/ionic cordova run ios -l --external
# has shown iPod touch - 7th generation - 14.4
}}}