Code Blog

Displaying 1-5 of 17 results.
2017/06/30 MacOSX

I was thinking about playing a bit of Go online again but the popular Korean Tygem Go server only has software support for Windows OS. I could have run it in Windows Parallells for Mac in a virtual computer but I found this link describing how to run it directly in Mac OS via Wineskin.

It works well for me, I'm currently running Mac OS Sierra v. 10.12.5. Wineskin is a utility to manage Wine engine versions and create wrappers so it appears like a normal Mac application.

2017/06/09 MacOSX,Printers

I had to do this after each big update of MacOS (latest being MacOS Sierra), so it is quite annoying. However I managed to get the printer working again (its a really good printer btw).

Step 1: Delete the current Canon LBP2900 printer in Printers & Scanners settings
Step 2: Restart your Mac (I didn't do this last time, still worked)
Step 3: Download and install the latest Canon LBP2900 CAPT Printer Driver (version 3.90 as of 2017.06.09)
Step 4: Restart your Mac
Step 5: Download and install the Canon LBP2900 Patcher
Step 6: Restart your Mac
Step 7: Connect the printer with USB, add the LBP2900 printer and manually select the printer driver

Note: CAPT is Canon's proprietary Canon Advanced Printing Technology (CAPT) driver, supporting the Canon i-Sensys series of laser printers.

Note 2: The LBP2900 patcher is a small executable that adds printer definitions for the LBP2900 printer. If this is not done the system cannot find the suitable printer driver when adding the printer. The LBP2900 printer is not supported by the Canon CAPT driver (not sure why) but the very similar printer LBP3000 is supported, so the patcher adds similar printer definitions as LBP3000 for the LBP2900.

2017/03/31 MacOSX

I had a problem when starting a new terminal window (running bash shell) that the hostname displayed was wrong, and was actually instead showing different network connected hostnames. To fix this, first check if hostname is set on the local machine, to do this type the following in the terminal:

scutil --get HostName

If there's no hostname set for the local machine, then is can be defined with this command:

sudo scutil --set HostName 'computerHostName'

After restarting the terminal window the hostname was showing correctly in my case. Another way to fix this is to just change the prompt for the shell (edit the ~/.bash_profile if running bash), but I think this is a better way to resolve it. It is a bit confusing with hostname / computer name / local hostname as they are used in different parts of Mac OS for bonjour and sharing. In this case it seems as I didn't have a hostname defined, the system instead got another hostname from the DNS server.


2017/02/10 MacOSX

A quite common scenario: An update of Mac OS X breaks some driver, usually it is the printer driver, but this time it was the USB-to-Ethernet device that stopped working (a Macally U3HUBGB). I checked for driver updates but Macally latest driver is for MacOS 10.9, however it uses a Axis chip (AX88179) and the latest driver can be downloaded directly from the suppliers website:

My problem was that Network settings showed the "cable unplugged" status. I reinstalled and rebooted multiple times but could still not get it to run.

I tried to remove the AX88179 device from the "Network settings" and then reinstall the driver. Now it didn't show up at all! After removing the NetworkInterfaces.plist I managed to get it back again, but this still didn't solve the "cable unplugged" error. 

sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist

In the end I manually removed the kext (sudo rm -rf /Library/Extensions/AX88179_178A.kext), rebooted, reinstalled the latest driver and finally rebooted again. After that it started working again (the network LEDs on the USB hub lit up directly on reboot). I am running MacOS Sierra (10.12.3) at the moment.

Debugging information:

  • Terminal command: kextstat | grep asix
  • "About This Mac" -> "System Report ..." -> "Software" -> "Extensions"
  • "About This Mac" -> "System Report ..." -> "Hardware" -> "USB"


2016/11/23 MacOSX

On Mac OS X / Unix start a terminal window and run the following commands:

Modified timedate

touch -mt YYYYMMDDhhmm filepath
touch -mt 201611231200 *

The example above will update all files in the current folder with modified datetime of 2016/11/23 12.00AM. This helped me solve some file upload sorting order problem in the past.

Create and modified timedate

Dropping the "-m" flag will update both created and modified datetime

touch -t 201611231200 *