Mac Stuff

Replacing a failed Hard drive on a Mac

  • Replace with SSD
  • Issues with display connector
  • Torx need the tiny one
  • Fan issue - SSD Fan Control + Link needed

Restoring MacOSx

Mavericks Migration notes

  • Garmin Issues - looks to be a retransfer of all Activities
  • Java issues - needed to install java to begin with + eclipse 3.6 never worked until the Apple java 1.6 update version was installed (seems to have a different structure to oracle java 1.7).
    • All newer versions of eclipse, netbeans etc worked with newer oracle version.
    • Some games seem not to work - eg wolfenstein enemy territory
    • IPCam stuff also seems dodgy - FF and Chrome not working

Memory Upgrades

  • 1333MHz DDR3 PC3-10600 SDRAM

Dual boot linux with mac

I've used the liveUSB for ubuntu 20 on the iMac and it seems like nearly everything worked - magic mouse + keyboard etc. I'd like a more permanent setup than the liveusb so maybe linux mint might be cool too.

Notes from the install

Linux Mint Setup notes

Initial setups:

  • Handle the Fan stuff - mbpfan
    • installed from apt (sudo apt install mbpfan)
    • run by sudo mbpfan
    • config files exist -> no need to touch them by default
    • seems to still run after reboot ….. to be confirmed
  • Handle the brightness - brightnessctl
    • installed from apt
    • sudo brightnessctl s 20%
  • Screen sleep - I turned it off because I couldn't wake it up from sleep

  • grub
    • had to switch to using console mode to have the list of entries (/etc/default/grub)
    • still trying to find osx solution
      • sudo vim /etc/grub.d/40_custom
      • added an OSX entry (first one didn't work (hd0,2) not found error) menuentry "OSX" { insmod hfsplus insmod part_apple insmod chain set root=(hd0,2) chainloader /System/Library/CoreServices/boot.efi }

menuentry "OS X v2" { insmod hfsplus search –set=root –file /System/Library/CoreServices/boot.efi chainloader /System/Library/CoreServices/boot.efi } - then sudo update-grub

Coding tools

  • JDK
    • sudo apt-get update
    • sudo apt-get install -y default-jdk default-jre
    • got me OpenJDK 11 by default

-Maven

  • https://maven.apache.org/install.html
  • https://www.thecodejournal.tech/2020/08/install-apache-maven-on-linux/
  • https://www.baeldung.com/install-maven-on-windows-linux-mac

  • git
    • installed with sudo apt install git
  • ZSH and ohmyzsh
    • TODO
    • https://www.howtogeek.com/362409/what-is-zsh-and-why-should-you-use-it-instead-of-bash/
    • https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH
  • Sublime text I took from the software centre (didn't notice if flatpak or not)
  • VSCode - I saw reviews saying the flatpak was rubbish and NOT officially supported so I followed the VSCode site and installed by apt
  • Intellij
    • downloaded from the jetbrains site and unpacked to /opt/idea
    • https://techviewleo.com/how-to-install-intellij-idea-on-linux-mint/
    • /opt/idea/bin/idea.sh

MacPorts

Package installer for Mac Mac ports allows you to install things conveniently from the terminal window

the command is sudo port … for most things you want to do.

For migration to OSX Mavericks I followed this migration guide.

https://trac.macports.org/wiki/Migration

There's also the guide to macports here: http://guide.macports.org/

Cheatsheet

  • sudo port installed
  • sudo port selfupdate
  • port version
  • port list (but this gives a very long list)
  • port search (more precise search)
  • port installed (list of installed ports)
  • port outdated
  • sudo port upgrade outdated
  • sudo port select pip (show installed versions)
  • sudo port select –set pip pip27

Useful Apps

Key Shortcuts

  • Pipe in terminal - Alt + Shift + L
  • F11 - show desktop
  • Tilda ~ - Alt+n

Screenshots

http://guides.macrumors.com/Taking_Screenshots_in_Mac_OS_X

  • Command-Shift-3: Take a screenshot of the screen, and save it as a file on the desktop
  • Command-Shift-4, then select an area: Take a screenshot of an area and save it as a file on the desktop
  • Command-Shift-4, then space, then click a window: Take a screenshot of a window and save it as a file on the desktop
  • Command-Control-Shift-3: Take a screenshot of the screen, and save it to the clipboard
  • Command-Control-Shift-4, then select an area: Take a screenshot of an area and save it to the clipboard
  • Command-Control-Shift-4, then space, then click a window: Take a screenshot of a window and save it to the clipboard

  • Can also use also Grab App in Applications/Utilities

Launch an App from the Terminal

'''bash open /path/to/some.app ‘''

Opening Multiple Windows for Eclipse

'''bash cd /Applications/eclipse/ open -n Eclipse.app'' ‘''

Modifying file info for multiple files

  • Select multiple files, right-click to show options menu.
  • Hold down alt key and an option Show Inspector will appear.
  • This will open just one info window instead of one per file

http://forums.macrumors.com/showthread.php?t=366864

Note: This could also be achieved with a recursive command line command - chflags -R nouchg ./

http://www.westwind.com/reference/os-x/commandline/files-folders.html