Categories
Mac

Remote Control another Mac on your network

You need to go to the Mac you want to access and under System Preferences->Sharing activate the following:

macOS Sharing Settings

On all this options you can limit the users that can have access.

On the File Sharing option, you can determine what folders can be accessed in the network and by whom.

On Remote Management you will be asked what you want from this list, use option/alt click to select all:

macOS Remote Management Options

Once that is done you can go to the other Mac you want to use and in Finder you should see the Mac on the sidebar under Locations or click Network:

macOS Finder ScreenShare Connect As

You see on the top right options to Share Screen or Connect As. Click Share Screen to get remote control of the other Mac or Connect As to simple browse the folders that you gave permissions on the File Sharing step.

Categories
Dev Mac

Change macOS terminal shell to Bash 5

Since macOS Catalina that zsh is the default shell. From what I could understand this was caused by a change in Bash license to GPL after version 3.

So, since version 3 of Bash is pretty old they changed the default to zsh.

Since Homebrew is not yet fully Apple Silicon compatible using Homebrew was not an option. If your Mac runs Intel a simple brew install bash will install a newer version of Bash on /usr/local/bin/bash (if you had Homebrew installed obviously). You can follow the updates for Homebrew compatibility with Apple Silicon here.

This leaves us with installing Bash the good old fashion way:

curl -O https://ftp.gnu.org/gnu/bash/bash-5.1.tar.gz
tar xzf bash-5.1.tar.gz
cd bash-5.1
./configure --prefix=/usr/local && make && sudo make install

After that is done, you just need to add Bash to your available shells:

sudo bash -c "echo /usr/local/bin/bash >> /private/etc/shells"

And make Bash the active one:

chsh -s /usr/local/bin/bash

Open a new terminal window or restart your terminal app and check with:

echo "$SHELL"
bash --version

Categories
Dev Mac Tech

MAMP Pro – Oops, something is badly wrong!

Out of the blue, MAMP Pro started presenting me with an alert when I tried opening the app:

Oops, something is badly wrong!
Either you did not provide the necessary admin credentials or the MAMP PRO package could not be initialized correctly. You can either restart the application and try again or re-install the software.

I contacted support, they advised me to uninstall/reinstall and that didn’t help. The alert kept on being the only thing I saw when I tried to start the app and then it would just close.

After doing some digging around the web, I ended up here and the following command fixed it:

sudo launchctl load -w /Library/LaunchDaemons/de.appsolute.mampprohelper.plist

I suspect this might have been caused because I manually disabled MAMP Pro helper Launch Agent on macOS. Still not sure why MAMP Pro needs that running to start the app but it looks like it does.

BTW: the databases and settings for MAMP Pro are not in /Applications/MAMP but in /Library/Application Support/appsolute/MAMP PRO/

Categories
Mac Tech

MacOS password prompt for Keychain access twice

I did a migration of Keychain items between Macs and MacOS was prompting me to type the password twice to authorise access.

To avoid this Apple suggest changing the password of the Keychain “login” (the problematic) and setting it back to the same password. This did fix it for me but the option to change password was greyed out on Keychain Access.

greyed out option to change Keychain password

So, I had to create a new Keychain (no matter the name this will be temporary), then setting this new keychain as the default and now I was able to change the password on the “login” keychain.

Then, I just set the “login” keychain back as the default and deleted the temporary one (references+files option on delete).

Categories
Mac Tech

Migrate Apple Keychain to a new Mac

I needed to migrate some passwords from Apple Keychain to a new Mac. In particular iTerm2 password manager, Coda/Transmit + Cyberduck passwords.

After doing a replace to ~/Library/Keychains/login.keychain-db with the old login.keychain-db file that destroyed my Apple ID. I found the solution on https://library.panic.com/general/keychain-migration/

What I ended up doing was copying the old login.keychain-db to ~/Library/Keychains/ but with a different name, eg: login2.keychain-db

Then entering the app Keychain Access and under File->Add Keychain selecting the copied file, eg: login2.keychain-db

Then I had all my old Keychain on my new Mac but I wanted to clean up.

So, I changed the password from my old Keychain by selecting it on the sidebar going to Edit->Change Password for Keychain “login2” (not sure if going to Edit is necessary but I have crossed something online that said it was). Then type the old password and leave the new password fields blank, press CMD and click to save. Mac will complain the passwords should not be blank but after insisting it worked.

Why I am removing the password, because to copy an item from the old Keychain to the new it is necessary to type the password one time for each item and I had many.

After I selected the passwords and made copy from the old Keychain and paste on the new. Still, necessary to confirm but clicking ok and leaving the password blank was easier.

Finally, I deleted the old (login2) by right-clicking (cmd+click) on the sidebar. I choose the ‘references + files’ option.

I did run into an issues where MacOS was prompting me twice for passwords to authorise access but I was able to solve it by doing this.