Tag: macos

How to disable Android File Transfer in Mac OSx

How to disable Android File Transfer in Mac OSx

Android File Transfer Agent conflicts with Garmin Music, so need to disable it in order to work.

Steps

Open the “Activity Monitor” and kill the “Android File Transfer Agent” process. Open “System Preferences” > “Accounts”. Go to the “Login Items” tab of your user. Remove the “Android File Transfer Agent”.

References

Avoid Android File Transfer starting automatically in Mac OS X after Android device plugin to USB port

Show dd progress in MacOS

Show dd progress in MacOS

The default dd command in MacOS doesn't have progress option.

Solution

Send SIGINFO signal to the dd command.

Press Control-T

By pressing the Control-T character in dd terminal, you are sending the same SIGINFO signal to the dd command.

Run kill command

Run following command in another Shell.

pkill -INFO -x dd

or

kill -INFO <pid>

References

How can I track progress of dd

Make keys behave like Windows on MacOS

Make keys behave like Windows on MacOS

I tried, but failed for Control Arrow Keys. Anyway I decided drop this idea, because it is a partial solution, the Control Arrow Keys doesn't work.

Steps

Create a file ~/Library/KeyBindings/DefaultKeyBinding.dict has following contents

{
  "\UF729"  = moveToBeginningOfLine:; // home
  "\UF72B"  = moveToEndOfLine:; // end
  "$\UF729" = moveToBeginningOfLineAndModifySelection:; // shift+home
  "$\UF72B" = moveToEndOfLineAndModifySelection:; // shift+end
  "^\UF729" = moveToBeginningOfDocument:; // ctrl+home
  "^\UF72B" = moveToEndOfDocument:; // ctrl+end
  "^$\UF729" = moveToBeginningOfDocumentAndModifySelection:; // ctrl+shift+home
  "^$\UF72B" = moveToEndOfDocumentAndModifySelection:; // ctrl+shift+end
  "^\UF702" = "moveWordBackward:"; // ctrl+leftarrow
  "^\UF703" = "moveWordForward:"; // ctrl+rightarrow
  "^$\UF702" = "moveWordBackwardAndModifySelection:"; // shift+ctrl+leftarrow
  "^$\UF703" = "moveWordForwardAndModifySelection:"; // shift+ctrl+rightarrow
}

Alternatively, change Line to Paragraph, depending on your prefers.

References

Make Home & End keys behave like Windows on Mac OS X

Disable Apple mouse swipe action

Disable Apple mouse swipe action

It is very easy for Apple mouse understands wrongly, and take action to back to my previous page. As the result, my few hours working on WordPress disappered.

Change mouse

Then I start using normal mouse, but hard to change between screen using keyboard, my remote control and virtual machine doesn't understand the keys, and holding keyboard actions made wrong password in login screen.

Disable swipe action

Then I found the way to disable swipe action as below

system preferences>trackpad or mouse>more gestures tab>uncheck "swipe between pages".

References

I just accidentally swiped right on my web page...how do I get it back?

Ping fails but nslookup works in MacOS

Ping fails but nslookup works

When performing nslookup, the IP can be returned. But when performing ping, return following error

ping: cannot resolve <hostname>: Unknown host

Causes

Second DNS server issue

The second DNS server isn't resolving the IP address.

Another DHCP server issue

Another DHCP server provide different DNS server.

Fix

killall -HUP mDNSResponder

References

DNS lookup fails but nslookup works

Time Machine stuck at Stopping

Time Machine stuck at Stopping

Recently upgraded my DS1812+ memory, the backup job was stuck, but I don't know whether they are related. Because I was rebooting in the morning, but the backup was stuck at 4pm.

Fix

To fix the issue, run following command

sudo killall backupd

Some people mentioned commands

sudo service com.apple.metadata.mds stop
sudo service com.apple.metadata.mds start

But there is no service command in my MacOS.

References

10.5: How to abort a stuck Time Machine backup

Macbook Pro unable to reinstall from Time Machine

Macbook Pro unable to reinstall from Time Machine

The reinstallation was hung with following message:

Preparing to restore "Machintosh HD"...

After a few hours, still the same. Hard reboot later found that no modification in old OS, even requested erasing the disk.

Actions taken

Formatted disk before retry, got same issue.

Possible issue

The possible issue could be that the Mac can not reach Time Machine backup, because there is no blinking of the backup USB disk.

Solution

Install fresh OS, then start performing OS transfer from Time Machine backup.

Install brew in MacOS 10.13.6

Install brew in MacOS 10.13.6

Steps

Download following packages, install first two packages.

Xcode_10.1.xip
Command_Line_Tools_macOS_10.13_for_Xcode_10.1.dmg
Kernel_Debug_Kit_10.13.6_build_17G10017.dmg
Swift_5_Runtime_Support_for_Command_Line_Tools.dmg
Swift_Playgrounds_Author_Template_for_Xcode_10.xip
Font_Tools_for_Xcode_11.dmg
Additional_Tools_for_Xcode_10.1.dmg

Run following command to install

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

References

All Downloads
Install Homebrew · Mac M1