User Tools

Site Tools


computing:darwin

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
computing:darwin [2018/02/04 17:04] oemb1905computing:darwin [2020/02/12 01:02] (current) oemb1905
Line 1: Line 1:
-#Darwin 
-#Jonathan Haack 
-#Haack's Networking 
-#netcmnd@jonathanhaack.com 
- 
 ------------------------------------------- -------------------------------------------
-#Path +  * **darwin**  
- +  * **Jonathan Haack*
-  /etc/paths (location of PATH on Mac) +  * **Haack's Networking** 
-  /etc/man.path (man page paths) +  * **netcmnd@jonathanhaack.com** 
- +
-#Force Remove Trash +
- +
-#User Directory Trashes (sudo not required, but can help) +
-  sudo rm -rf ~/.Trash/+
-   +
-#All Directory Trashes (sudo not required, but can help) +
-  sudo rm -rf /Volumes/*/.Trashes +
- +
-#If this still causes trouble, then +
-  login root +
- +
-#Enter password +
-  sudo rm -rf /Volumes/*/.Trashes +
- +
-#Now, all trashes should empty, but it is slow so view +
-#Finder Status bar at /Volumes/Macintosh HD/ +
- +
-#Showing hidden items in Finder (highly recommended) +
- +
-  defaults write com.apple.finder AppleShowAllFiles TRUE +
-  killall Finder +
- +
-#replace with FALSE to change back ... make sure before entering killall +
-#could also use YES / NO, or 1/0 (have not tested 1/0) +
- +
-#Hiding Users +
- +
-  sudo dscl . create /Users/shortnameofuser IsHidden 1 +
- +
-#change to 0 to de-activate +
- +
-#Moving user directory to var (warning, do this logged in as root) +
-  sudo mv /Users/shortnameofuser /var/shortnameofuser +
- +
-#Then, update the user record path +
-  sudo dscl . -create /Users/shortnameofuser NSFHomeDirectory /var/shortnameofuser +
- +
-#Remove public share point through Terminal (or go to FS in SP in GUI) +
-  sudo dscl . -delete "/SharePoints/shortnameofuser's Public Folder"+
  
 ------------------------------------------- -------------------------------------------
 +Making a bootable usb stick ...
  
-#Homebrew Basics+  diskutil list 
 +  diskutil eraseDisk <filesystemtype> <partitionname> <diskidentifier> 
 +  diskutil unmountDisk <diskidentifier>
  
-#Install: +Examples
-  ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"+
  
-#Uninstall: +  sudo dd if=/Volumes/Cave/Users/axes/Desktop/lubuntu.iso of=/dev/disk4 bs=1m 
-  Download script from GitHub https://gist.github.com/SteveBenner/11254428+  sudo dd if=/Users/me/tails-i386-1.3.iso of=/dev/rdisk9 bs=16m && sync
  
-#Update +Insert USB drive into PPC Mac of choice, depress command-option-o-f (open firmware) 
-  brew update+try usb0, usb1, usb2, etc. until it works and finds the port you used for the img
  
-#Cleanup+  probe-usb 
-  brew cleanup+  boot usb0/disk@1:2,\\yaboot 
 +  boot usb1/disk@1:2,\\yaboot 
  
-#Verify Config: +once inside the yaboot shell, some common examples are:
-  brew doctor+
  
-#Update Packages +  install url=mintppc.org 
-  brew update packagename+  install 
 +  cli   
 +  cli-expert 
 +  cli64 
 +  cli64-expert
  
-#Install from Casks 
-  brew install Caskroom/cask/nameofcasknoextension 
- 
-#To find the Casks in your GUI 
-  /Volumes/Macintosh HD/usr/local/Library/Taps/caskroom/homebrew-cask/Casks 
- 
-#To see what you have installed using your GUI 
-  /Volumes/Macintosh HD/usr/local/Cellar 
- 
-#Sometimes they are installed by default in opt 
-#(although this can be changed by an --option) 
-  /Volumes/Macintosh HD/opt/homebrew-cask/Caskroom 
  
 ------------------------------------------- -------------------------------------------
- +#**wireless hardware driversb43 cutter +**
-#There is debatemostly from MacPorts & Fink people +
-#about where to put package Managers: +
- +
-#Homebrew will cause problems when building software from source if it is installed in /usr/local. +
- +
-#This is the default, which is a bad choice as this path is in the default search path of compilers and other tools. +
- +
-#Therefore builds from other packaging software might pick up the wrong dependency, using Homebrew's version instead of their own. +
- +
-#Years ago, in the very beginning of the project, even MacPorts was using /usr/local. +
- +
-#But it turned out not to cooperate with other tools as is documented in their FAQ. +
- +
-#Unfortunately Homebrew developers didn't want to hear about prior experiences and ignored such facts... +
-#In general, it is usually better to stick to one tool only to avoid all problems. +
-#MacPorts is doing their best to patch out any harcoded paths, e.g. to /sw which is used by Fink. +
-#So usually it will work, but having anything installed in /usr/local will definitely cause problems for it. +
- +
-@Raim on StackExchange  +
-[[https://superuser.com/questions/181337/is-it-safe-to-install-both-homebrew-and-macports-on-the-same-machine]] +
- +
-#MacPorts addresses this too: +
-[[https://trac.macports.org/wiki/FAQ#defaultprefix]] +
 ------------------------------------------- -------------------------------------------
  
-#Braumeister has a search engine of Homebrew packages+  deb http://httpredir.debian.org/debian/ wheezy main contrib non-free 
 +  deb http://http.debian.net/debian/ jessie main contrib non-free 
 +  apt-get update 
 +  sudo lspci 
 +  apt-get install firmware-b43-installer 
 +  apt-get install firmware-b43-lpphy-installer 
 +  apt-get install firmware-b43legacy-installer
  
-[[http://braumeister.org/]]+use lspci above and then visit https://wiki.debian.org/bcm43xx#supported-b43
  
 ------------------------------------------- -------------------------------------------
  
-#Common Packages (Will be adding more, this is by no means +32bit EFI 64bit .iso notes for GNU/Linux installs 
-#exhaustive of what I have used in past).+
  
-  * tree +  hdiutil convert -format UDRW -o destination_file.img source_file.iso 
-  * webkit2png +  diskutil list 
-  * graphicsmagick +  diskutil partitionDisk /dev/disk1 1 "Free Space" "unused" "100%"
-  * git +
-  * python +
-  * python3 +
-  * watch +
-  * wget +
-  * automake +
-  * autoconf +
-  * htop +
-  * jpegoptim +
-  * imagemagick +
-  * fish (fish shell) +
-  * xquartz +
-  * Homebrew cask +
-  * ack (like grep) +
-  * git +
-  * bash-completion +
-  * bash completion script +
-  * colordiff +
-  * ffmpeg +
-  * htop +
-  * imagemagick +
-  * gawk +
-  * gnu-sed +
-  * cowsay +
-  * lftp +
-  * wget +
-  * axel +
-  * tree +
-  * unrar +
-  * rlwrap +
-  * readline wrap +
-  * tig +
-  * git (command line interface) +
-  * youtube-dl +
-  * lynx (web browser) +
-  * memcached (for caching on web server) +
-  * Alpine (new version of Pine) +
-  * mutt +
-  * vi +
-  * emacs +
-  * nano +
-  * python (add 3 for v.3) +
-  * pip +
-  * virtualenv +
-  * ruby +
-  * ruby-build (test versions)+
  
--------------------------------------------+Particularly helpful is partitioning as GPT from command line in macOS:  
  
-#Install GNU Essentials+  diskutil partitionDisk /dev/disk2 GPT JHFS+ New 0b 
 +   
 +Back to writing the image to the partition with dd: 
 +   
 +  dd if=[Directory/to/udrw/img] of=/dev/disk1 bs=1m 
 +  diskutil eject /dev/disk2
  
-  brew install coreutils+First, disable Gatekeeper because it is stupid - use Terminal
  
-#Add to PATH with TextWrangler or: +  sudo spctl --master-disable
-  sudo open /etc/paths +
-  sudo nano /etc/paths+
  
-#Add the next line after /usr/bin +Second, disable System Integrity Protection (SIP) because it is stupid and won't let you dual boot properly.  Reboot your Mac, holding down command + r, and once in the recovery OS, open a Terminal and enter:
-  /usr/local/bin+
  
-#Add to PATH with vi text editor or nano using Terminal +  csrutil disable
-  sudo vi /etc/paths +
-  sudo nano /etc/paths+
  
-#Path Looks Like Thisbut bear in mind Homebrew prefers the local bin first +Nowreboot your Mac normally and enter a Terminal. 
- +   
-  /usr/bin +  cd ~ 
-  /usr/local/bin +  wget https://sourceforge.net/projects/refind/files/0.11.2/refind-bin-0.11.2.zip 
-  /bin +  unzip refind-bin-0.11.2.zip 
-  /usr/sbin +  cd refind-bin-0.11.2 
-  /sbin +  sudo ./refind-install 
- +  sudo reboot
-#Homebrew offers the following instructions about coreutils +
- +
-#All commands have been installed with the prefix 'g'. +
- +
-#If you really need to use these commands with their normal name can +
-#add a "gnubin" directory to your PATH from your bashrc like +
-  PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" +
- +
-#Additionally, you can access their man pages with normal names the +
-#"gnuman" directory to your MANPATH from your bashrc as well +
-  MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH" +
- +
-#You can also use Text Wrangler to add the GNU commands to Man Pages (or use vi) +
-  /etc/man.conf+
      
-#add the following in the Set up PATH to MANPATH mapping section 
-  MANPATH_MAP /usr/local/opt/coreutils/libexec/gnubin 
- /usr/local/opt/coreutils/libexec/gnuman 
- 
 ------------------------------------------- -------------------------------------------
 +  
 +PATH Location on macOS
  
-#More GNU commands, but duplicate ones+  /Sometimes they are installed by default in opt 
 +#(although this can be changed by an --option)etc/paths (location of PATH on Mac) 
 +  /etc/man.path (man page paths)
  
-  brew tap homebrew/dupes+Force Empty Trashes  
 +  sudo rm -rf ~/.Trash/* 
 +  sudo rm -rf /Volumes/*/.Trashes
  
-  brew install binutils 
-  brew install diffutils 
-  brew install ed --default-names 
-  brew install findutils --with-default-names 
-  brew install gawk 
-  brew install gnu-indent --with-default-names 
-  brew install gnu-sed --with-default-names 
-  brew install gnu-tar --with-default-names 
-  brew install gnu-which --with-default-names 
-  brew install gnutls 
-  brew install grep --with-default-names 
-  brew install gzip 
-  brew install screen 
-  brew install watch 
-  brew install wdiff --with-gettext 
-  brew install wget 
- 
-#newer versions of tools already on OS X and GNU 
- 
-  brew install bash 
-  brew install emacs 
-  brew install gdb   gdb requires further actions to make it work. See `brew info gdb`. 
-  brew install gpatch 
-  brew install m4 
-  brew install make 
-  brew install nano 
- 
-#commands not on GNU but on OS X but might want newer 
- 
-  brew install file-formula 
-  brew install git 
-  brew install less 
-  brew install openssh 
-  brew install perl518    must run "brew tap homebrew/versions" first! 
-  brew install python 
-  brew install rsync 
-  brew install svn 
-  brew install unzip 
-  brew install vim --override-system-vi 
-  brew install macvim --override-system-vim --custom-system-icons 
-  brew install zsh 
  
 ------------------------------------------- -------------------------------------------
  
-#Adding scripts to my shell PATH so I can run form command line+Showing hidden items in Finder
  
-  ln -s /Volumes/Cave/<path-to-script> /usr/local/bin/scriptname+  defaults write com.apple.finder AppleShowAllFiles TRUE 
 +  killall Finder
  
-------------------------------------------- 
- 
-#To see what is currently installed and save text file in User Downloads 
- 
-  brew list > ~/Downloads/brews.txt 
  
 ------------------------------------------- -------------------------------------------
  
-#Rememberthere are third party caskrooms (braumeister has lots of info):+Hiding Users in macOS.  Firstcreate an admin user in System Preferences.  
  
-  homebrew/science/metaphlan        +  sudo dscl . create /Users/shortnameofuser IsHidden 1 
-  Caskroom/cask/tap-bpm             +  sudo mv /Users/shortnameofuser /var/shortnameofuser 
-  Caskroom/cask/tuntap              +  sudo dscl . -create /Users/shortnameofuser NSFHomeDirectory /var/shortnameofuser 
-  Caskroom/cask/wiretap-studio    +  sudo dscl . -delete "/SharePoints/shortnameofuser's Public Folder" 
-  Caskroom/cask/rcdefaultapp        +  sudo reboot
-  Caskroom/cask/tapaal              +
-  Caskroom/cask/wavtap           +
  
-#To install one of them, run (for example): +Locate bitcoin wallet private key from Bitcoin-qt console:
-  brew install homebrew/science/metaphlan +
-     +
-------------------------------------------- +
- +
-#Some error readings I got once ... still need to review ... copied and paster below: +
- +
-Are you sure you want to uninstall Homebrew? [y/N] y +
-==> Removing Homebrew installation... +
-==> Removing empty directories... +
-==> Homebrew uninstalled! +
-The following possible Homebrew files were not deleted: +
-  *   /usr/local/.DS_Store +
-  *   /usr/local/bin/ +
-  *   /usr/local/share/ +
-You may consider to remove them by yourself. +
- +
-#You may want to restore /usr/local's original permissions +
-  sudo chmod 0755 /usr/local +
-  sudo chgrp wheel /usr/local +
-   +
-------------------------------------------- +
- +
-#Permissions to manually allow everything for a user +
-#The second command owns a directory by root with group wheel over local directory +
-#The third restores current user as owner to local directory +
- +
-  sudo chmod -R +a "$USER allow delete,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown,list,search,add_file,add_subdirectory,delete_child,file_inherit,directory_inherit"+
- +
-  sudo chown -R root:wheel /usr/local +
-  sudo chmod -R -N /usr/local +
- +
-------------------------------------------- +
-   +
-#To install alternative repositories for later installation, such as: +
- +
-  Homebrew/homebrew-apache +
-  Homebrew/homebrew-binary +
-  Homebrew/homebrew-boneyard +
-  Homebrew/homebrew-completions +
-  Homebrew/homebrew-dupes +
-  Homebrew/homebrew-games +
-  Homebrew/homebrew-headonly +
-  Homebrew/homebrew-python +
-  Homebrew/homebrew-science +
-  Homebrew/homebrew-versions +
-  davidchall/homebrew-hep +
-  josegonzalez/homebrew-php +
- +
-  brew tap Homebrew/homebrew-binary   +
- +
-#To install the brew tap third party packages, look inside the Taps folder in /usr/local to find one, and then +
- +
- brew install homebrew/homebrew-games/<name of package> +
- +
-#Some are not strict directory paths, but are abbreviations (most likely through the bin somehow) +
-  brew install Caskroom/cask/[name of package from step ^]  +
- +
-------------------------------------------- +
- +
-#To get private key from bitcoin console +
-#Navigate to bitcoin console+
  
   walletpassphrase [enterpassword]   walletpassphrase [enterpassword]
   dumprivkey [enter public address from gui]   dumprivkey [enter public address from gui]
- 
-#Out comes the private key 
  
 ------------------------------------------- -------------------------------------------
  
-#To add shell scripts to Terminal command, open bash.rc, and add this to the fields (first create a directory for your scripts):+To add shell scripts to Terminal command, open bash.rc, and add this to the fields (first create a directory for your scripts):
  
   export PATH="/path/to/dir:$PATH"   export PATH="/path/to/dir:$PATH"
Line 450: Line 212:
   dscacheutil -flushcache   dscacheutil -flushcache
  
-#sfcc server+#pimp bash profile 
 +  nano ~/.bash_profile 
 +  export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " 
 +  export CLICOLOR=1 
 +  export LSCOLORS=ExFxBxDxCxegedabagacad 
 +  #alias ls='ls -GFh' 
 +  alias l='ls' 
 +  alias ll='ls -lah' 
 + 
 +#sfcc server - use for thunderbird on macOS and on gnulinux
   https://archimedes.sfcc.edu/EWS/Exchange.asmx   https://archimedes.sfcc.edu/EWS/Exchange.asmx
      
Line 459: Line 230:
  
     git -C "$(brew --repo homebrew/core)" fetch --unshallow     git -C "$(brew --repo homebrew/core)" fetch --unshallow
 +
 +Apache password protect directory:
 +
 +  sudo htpasswd -c .htpasswd username1
 +  sudo htpasswd .htpasswd username2  
 +
 +syntax for BSD, macOS, and Red Hat:
 +
 +  AuthUserFile /private/etc/httpd/.htpasswd 
 +  AuthGroupFile /dev/null
 +  AuthName "Members Only"
 +  AuthType Basic
      
 +syntax for Debian:
 +  
 +  AuthType Basic
 +  AuthUserFile /etc/apache2/.htpasswd
 +  AuthName "Please Authenticate"
 +  Require valid-user
 +  
 + 
 +If you have an SMC based Mac, make sure to install macfanctl when installing GNU/Linux on the device:
 +
 +  apt-get update
 +  apt-get install macfanctld
 +  /etc/macfanctl.conf
 +  <set desired values>
 +  service macfanctld restart
 +  
 +Chromium API - Q5 - add to ~/.profile
 +
 +  export GOOGLE_API_KEY="AIzaSyAz932CQ2FD3654AKxq3GCE4voQ3eBPuR"
 +  export GOOGLE_DEFAULT_CLIENT_ID="702748309358-4f29qgd9h1qgla7l0l4sh15lrj1livs0.apps.googleusercontent.com"
 +  export GOOGLE_DEFAULT_CLIENT_SECRET="OZ3G8hpcHiw77l_Jh_IDJuz"
 +
 +To run the program, you must make a shell script that does:
 +
 +  /Applications/Chromium.app/Contents/MacOS/Chromium
 +
 +Remove the annoying Gatekeeper ban on open source apps like GIMP
 +
 +  xattr -d com.apple.quarantine /Volumes/macos/Applications/GIMP-2.10.app
  
- --- //[[netcmnd@jonathanhaack.com|oemb1905]] 2017/05/15 04:26//+This tutorial is a designated "Invariant Section" of the "Technotronic" section of Haack's Wiki as described on the [[https://jonathanhaack.com/dokuwiki/doku.php?id=start|Start Page]].
  
 + --- //[[jonathan@haacksnetworking.com|oemb1905]] 2020/02/11 17:59//
computing/darwin.1517763842.txt.gz · Last modified: 2018/11/25 01:33 (external edit)