Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SOWI Administratoren
Scripts
Commits
ce906a26
Commit
ce906a26
authored
4 years ago
by
Saad Chaaban
Browse files
Options
Downloads
Patches
Plain Diff
Updated 04_defaultsettings
parent
09eadd90
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
macos/04_defaultsettings.command
+138
-40
138 additions, 40 deletions
macos/04_defaultsettings.command
with
138 additions
and
40 deletions
macos/04_defaultsettings.command
+
138
−
40
View file @
ce906a26
#!/bin/bash
#######################################################################################
# Dieses Script dient dazu ein paar "Standardeinstellungen" zu vereinfachen.
# Die jeweiligen Erklärungen der einzelnen Abschnitte steht über den jeweiligen Befehl!
# Kopiert die die "Connect" Commands in Shared und verschiebt das Script connect_edv auf dem Desktop des Administrators
# Mac OS macht via Script Probleme mit CP und den Verzeichnis
# (es startet den cp Befehl nicht im Verzeichnis in dem man gerade dieses Script startet)
BASEDIR
=
$(
dirname
"
$0
"
)
file1
=
$(
echo
"
$BASEDIR
"
/Netzwerklaufwerke/connect_
*
)
FF_Profile
=
$(
echo
"
$BASEDIR
"
/Firefox
)
cp
$file1
/Users/Shared/
mv
/Users/Shared/connect_edv.command /Users/
$USER
/Desktop/
# Kopiert das Firefox Profil auf die Festplatte und sorgt dafür das Einstellungen und Lesezeichen gesetzt sind.
echo
"Kopiere Firefox Ordner"
cp
-R
$FF_Profile
~/Library/Application
\
Support/
###############################################################################
# Allow ALL to install Printer! #
##############################################################################
#??? sudo -v ???? Ins Script einbinden?
sudo
/usr/bin/security authorizationdb write system.preferences.printing allow
sudo
/usr/bin/security authorizationdb write system.print.operator allow
sudo
/usr/sbin/dseditgroup
-o
edit
-n
/Local/Default
-a
everyone
-t
group lpadmin
sudo
/usr/sbin/dseditgroup
-o
edit
-n
/Local/Default
-a
everyone
-t
group _lpadmin
#######################################################################################
osascript
-e
'tell application "System Preferences" to quit'
# Frage sofort nach dem Adminpasswort
sudo
-v
# Keep-alive: update existing `sudo` time stamp until this script has finished
while
true
;
do
sudo
-n
true
;
sleep
60
;
kill
-0
"
$$
"
||
exit
;
done
2>/dev/null &
################################################################################
# Software Updates #
###############################################################################
# Enable the automatic update check
defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled
-bool
true
# Check for software updates daily, not just once per week
defaults write com.apple.SoftwareUpdate ScheduleFrequency
-bool
true
# Download newly available updates in background
defaults write com.apple.SoftwareUpdate AutomaticDownload
-bool
true
# Install System data files & security updates
defaults write com.apple.SoftwareUpdate CriticalUpdateInstall
-bool
true
# Turn on app auto-update
defaults write com.apple.commerce AutoUpdate
-bool
true
# Allow the App Store to reboot machine on macOS updates
defaults write com.apple.commerce AutoUpdateRestartRequired
-bool
true
################################################################################
# General UI/UX #
###############################################################################
# Kopieren des Firefox Profiles und Connect Commands #
BASEDIR
=
$(
dirname
"
$0
"
)
file1
=
$(
echo
"
$BASEDIR
"
/Netzwerklaufwerke/connect_
*
)
FF_Profile
=
$(
echo
"
$BASEDIR
"
/Firefox
)
cp
$file1
/Users/Shared/
mv
/Users/Shared/connect_edv.command /Users/
$USER
/Desktop/
echo
"Kopiere Firefox Ordner"
cp
-R
$FF_Profile
~/Library/Application
\
Support/
# Set language and text formats
defaults write NSGlobalDomain AppleLanguages
-array
"de"
"DE"
defaults write NSGlobalDomain AppleLocale
-string
"de_DE@currency=EUR"
defaults write NSGlobalDomain AppleMeasurementUnits
-string
"Centimeters"
defaults write NSGlobalDomain AppleMetricUnits
-bool
true
# Set the timezone (see `sudo systemsetup -listtimezones` for other values)
sudo
systemsetup
-settimezone
"Europe/Berlin"
>
/dev/null
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode
-bool
true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2
-bool
true
# Automatically quit printer app once the print jobs complete
defaults write com.apple.print.PrintingPrefs
"Quit When Finished"
-bool
true
# Disable the “Are you sure you want to open this application?” dialog
defaults write com.apple.LaunchServices LSQuarantine
-bool
false
# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint
-bool
true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2
-bool
true
# Require password immediately after sleep or screen saver begins
defaults write com.apple.screensaver askForPassword
-int
1
defaults write com.apple.screensaver askForPasswordDelay
-int
0
# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
defaults write com.apple.screencapture
type
-string
"png"
# Disable shadow in screenshots
defaults write com.apple.screencapture disable-shadow
-bool
true
###############################################################################
# FINDER SETTINGS #
##############################################################################
# Use list view in all Finder windows by default
## Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv`
# Use list view in all Finder windows by default
## Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv`
defaults write com.apple.Finder FXPreferredViewStyle
-string
"Nlsv"
# Sorgt dafür das das die "Pathbar" immer angezeigt wird (klappt erst nach neustart!)
# Sorgt dafür das das die "Pathbar" immer angezeigt wird (klappt erst nach neustart!)
defaults write com.apple.finder ShowPathbar
-bool
YES
# Statusbar einblenben
# Statusbar einblenben
defaults write com.apple.finder ShowStatusBar
-bool
true
# (Externe) Festplatten und Server auf dem Desktop anzeigen lassen
# (Externe) Festplatten und Server auf dem Desktop anzeigen lassen
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop
-bool
true
defaults write com.apple.finder ShowHardDrivesOnDesktop
-bool
true
defaults write com.apple.finder ShowMountedServersOnDesktop
-bool
true
defaults write com.apple.finder ShowRemovableMediaOnDesktop
-bool
true
# Show battery percentage
# Show battery percentage
defaults write com.apple.menuextra.battery ShowPercent
-string
"YES"
# Avoid creating .DS_Store files on network volumes
# Avoid creating .DS_Store files on network volumes AND USB Volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores
-bool
true
# Empty Trash securely by default
defaults write com.apple.finder EmptyTrashSecurely
-bool
true
### NOT CONFIRMED YET! ###
# Prevent Photos from opening automatically when devices are plugged in
defaults write com.apple.desktopservices DSDontWriteUSBStores
-bool
true
# Empty Trash securely by default
defaults write com.apple.finder EmptyTrashSecurely
-bool
true
# Keep folders on top when sorting by name
defaults write com.apple.finder _FXSortFoldersFirst
-bool
true
### NOT CONFIRMED YET! ###
# Prevent Photos from opening automatically when devices are plugged in
defaults
-currentHost
write com.apple.ImageCapture disableHotPlug
-bool
true
# Prevent iTunes from opening automatically when devices are plugged in
# Prevent iTunes from opening automatically when devices are plugged in
defaults write com.apple.iTunesHelper ignore-devices 1
# Save to disk by default - not to iCloud
# Save to disk by default - not to iCloud
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud
-bool
false
# Prevent Time Machine from prompting to use new hard drives as backup volume
# Prevent Time Machine from prompting to use new hard drives as backup volume
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup
-bool
true
###############################################################################
...
...
@@ -58,14 +128,19 @@ defaults write com.apple.finder EmptyTrashSecurely -bool true
# Enable highlight hover effect for the grid view of a stack (Dock)
defaults write com.apple.dock mouse-over-hilte-stack
-bool
true
# Set the icon size of Dock items to 36 pixels
defaults write com.apple.dock tilesize
-int
69
# Enable spring loading for all Dock items
defaults write com.apple.dock enable-spring-load-actions-on-all-items
-bool
true
# Show indicator lights for open applications in the Dock
defaults write com.apple.dock show-process-indicators
-bool
true
# Speed up Mission Control animations
defaults write com.apple.dock expose-animation-duration
-float
0.1
# Remove the auto-hiding Dock delay
defaults write com.apple.Dock autohide-delay
-float
0
# Remove the animation when hiding/showing the Dock
...
...
@@ -98,11 +173,14 @@ dockutil --no-restart --add "/Applications/Atom.app/"
defaults write com.apple.dock wvous-tr-modifier
-int
0
killall Finder
###############################################################################
# Terminal #
##############################################################################
# UNTESTED - Schließt Terminalfenster wenn der Befehl "exit" ausgeführt worden ist.
defaults write com.apple.terminal shellExitAction
-int
0
################################################################################
# Terminal #
###############################################################################
# Appearance
defaults write com.apple.terminal
"Default Window Settings"
-string
"Pro"
defaults write com.apple.terminal
"Startup Window Settings"
-string
"Pro"
defaults write com.apple.Terminal ShowLineMarks
-int
0
###############################################################################
# Textedit #
...
...
@@ -116,12 +194,32 @@ defaults write com.apple.terminal shellExitAction -int 0
###############################################################################
# Hardware #
##############################################################################
# Trackpad
# Trackpad: enable tap to click for this user and for the login screen
# Bildschirm
# Aktiviere subpixel font rendering on non-Apple LCDs
defaults write NSGlobalDomain AppleFontSmoothing
-int
2
# Trackpad
# Aktiviere tap to click for this user and for the login screen
defaults write com.apple.AppleMultitouchTrackpad Clicking
-bool
true
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking
-bool
true
# Enable tap at login as well
defaults
-currentHost
write NSGlobalDomain com.apple.mouse.tapBehavior
-int
1
defaults write NSGlobalDomain com.apple.mouse.tapBehavior
-int
1
# swipe between pages with three fingers
defaults write NSGlobalDomain AppleEnableSwipeNavigateWithScrolls
-bool
true
defaults
-currentHost
write NSGlobalDomain com.apple.trackpad.threeFingerHorizSwipeGesture
-int
1
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerHorizSwipeGesture
-int
1
# Drucker
# Erlaube allen Usern Drucker einzurichten
echo
"Setze Druckerberechtigungen"
sudo
/usr/bin/security authorizationdb write system.preferences.printing allow
sudo
/usr/bin/security authorizationdb write system.print.operator allow
sudo
/usr/sbin/dseditgroup
-o
edit
-n
/Local/Default
-a
everyone
-t
group lpadmin
sudo
/usr/sbin/dseditgroup
-o
edit
-n
/Local/Default
-a
everyone
-t
group _lpadmin
# Tastatur
# Turn off keyboard illumination when computer is not used for 5 minutes
defaults write com.apple.BezelServices kDimTime
-int
300
exit
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment