Prevent Mac OSX ssh from disconnecting (also on any Linux/BSD/*nix system)

To prevent ssh from disconnecting while idle, add the following to ~/.ssh/config:

Host *
    ServerAliveInterval 30
    TCPKeepAlive no

This solution is alse useable in any Linux/BSD/*nix environment. If you want to implement this not only on your own user, as a sysadmin, add the above to /etc/ssh/ssh_config instead.

Zello

How to run Zello on Mac OSX

Unfortunately there is no version of Zello available for Mac OSX but it is possible to run the Windows version using Wine.

  • Download and install XQuartz version >= 2.7.7
  • Log out and log back in on your Mac
  • Download and install “Wine stable
  • Download “Zello for PC
  • Launch Finder, go to Programs and run “Wine stable”
  • In the wine terminal window do
    cd Downloads
    wine ZelloSetup.exe
  • The Zello setup process will install Zello and launch it. The next time you want to run Zello, launch Finder, go to Programs and run “Wine stable” and enter
    wine C:\\Program\ Files\ \(x86\)\\Zello\\Zello.exe
Netbeans and git over ssh

Netbeans 8.2, git clone over ssh “Incorrect credentials for repository at ssh://”

Trying to git clone a repository over ssh in Netbeans 8.2 displaying an error message saying “Incorrect credentials for repository at ssh://” gave me a bit of a headache. I could successfully connect to the repository server using ssh from the terminal in my Mac running OSX.

Netbeans and git over ssh

After spending some time troubleshooting I tried to check for updates in Netbeans and that gave me an error message saying Netbeans could connect to the Internet in order to check for updates.

It turned out the problem was not incorrect credentials for SSH when trying to git clone, but in reality Netbeans could just not access the Internet. This was caused by the TripMode application I am using to control which applications can access the Internet when I am on mobile broadband where data rates applies.

So the error message “Incorrect credentials for repository at ssh://” in Netbeans can be misleading. It can be caused by the fact Netbeans just can’t connect at all to the repository server.

iPhone, iPad or Mac computers unable to connect to wifi network

The Apple products, iPhone, iPad and Mac computers sometimes has problems when connecting to a wifi network where other devices have no problems. The problem seems to be in the encryption used.

Make sure the router doesn’t have WPA/WPA2 mixed mode enabled, i.e. set it to WPA2 only. If encryption is configurable, use AES (not TKIP or TKIP/AES).

You can also read more about Apple recommendet wifi router settings here: https://support.apple.com/en-us/HT202068

Mac OSX installing software update

Mac OSX “El Capitan” software update stuck on “11 minutes remaining”

When installing a software update for Mac OSX “El Capitan” that required a system reboot to install, it seemed stuck on the white screen displaying a text “Installing software update: About 11 minutes”.

Mac OSX installing software update

Mac OSX installing software update

The solution was quite simple – just wait. It seems the time calculation is really off. After about an hour it stepped down to 10 minutes, so it’s not stuck. It just takes a lot longer than the system calculates.

How to disable iCloud sync on Mac while on mobile data

When you are connected to the Internet through a network with limited bandwidth or restricted data plan it is desirable to reduce the data consumption. In this case, disabling iCloud sync is something you want to do.

In Windows, you can easily mark a wifi network as limited by data plan and this will automatically inhibit Windows updates to download and it will also make cloud services not to sync.

In the world of Apple and Mac OSX, it seems like Apple assumes that when you are on a wireless or wired network, bandwidth is unlimited. Period. If this only was true, what a great world to live in! The news is that this is not how it works in the real world. Unfortunaly, because of this there is no function to disable or pause iCloud syncing at all. A simple feature present in all other cloud services like One-drive, Dropbox etc.

The solution, which works excellent is called TripMode. This piece of software gives you the control you want over any application using your Internet data.

 

What is eating my disc and fontworker is eating my CPU (in OSX)?

A Mac suddenly displayed the message “Your startup disk is almost full” to the user. However, there should be plenty of space left on the disk. Something was eating up the disk rapidly.

Some investigation using Activity Monitor showed that a process called fontworker was also eating a large chunk of the CPU as well. In the Terminal I entered the command:

cd /
sudo du -sm *

to find out what folder was using most space (the command requires admin privileges so it will prompt you for the administrator password). I then entered:

cd the-folder-name
sudo du -sm *

to find out what was using most space in the largest folder (replaced by “the-folder-name” in the example above). I repead the steps until I found a large file containing the fonts database occupying about 85 GB which is way more than normal.

It turned out the fonts cache had become corrupt.

To rebuild the font cache was easy. By simply restarting the computer into Safe mode and then reboot it back into normal mode, the font cache was cleared and rebuilt, solving both the disc and CPU problem.

Problem with the fonts sometimes occurs after OSX reinstall which in this particular case had been performed about a week ago.

How to read a Mac disk or memory stick in a Windows computer

USB memory sticks or external disks that has been formatted on a Mac might not be readable if you connect it to a Windows computer. The reason is that the Mac has formatted it using a file system unknown by Windows.

To read the disk you can use the free tool hfsexplorer.

hfsexlorer

hfsexlorer