Mac OS

Prevent Mac hidden files being written to a shared storage

MacOS tends to trash mounted disks with number of useless hidden files (e.g.  ._* or .DS_Store ). There were number of recipes in the Internet, some of them were working at some of time but are not anymore.

Below notes from my fights (at a moment of writing, on MacOS High Sierra 10.13.4 (17E199).

Removing the files when they are created

I used to apply a find . -name ... -print0 | xargs rm -0  combo but found that there is an built-in command to deal with these files:

From the man:

Preventing creating the files

On the MacOS side

NOTE: None of these solutions worked for me!

As I wrote, this didn’t work at all to me.

On the SMB server side

It actually turned the only working solution for me. Just add to the share configuration section a veto file parameter, e.g.:

And restart:

Note, after applying this change you will not be able anymore to use dot_clean  command from your Mac as any requests towards these files (including deletion) will be silently ignored by your SMB server hence files will remain untouched!

Deleting unwanted time zones from Apple Calendar

When you add some timezones to your Apple Calendar, it’s somehow difficult to remove them and you end up with a list which you perhaps don’t need anymore:

 

How to remove them? Rather easy, but we need a plist editor (easiest way to get it is to install XCode). Once we have it, just type in your terminal

Find attribute RecentlyUsedTimeZones, unfold it and delete unwanted items:

(more…)

Installation of pygraphviz in MacOS 10.12 (Sierra)

First attempt to the installation failed because of missing graphviz:

 

Ok, so next obvious step was to install missing library using brew:

 

Everything looked find, however pip’ing still shown same problem with not installed library. I think the reason was in the warning show above:

 

Ok, so where we have eventually the lib?

 

So we’re almost there. Let’s convince pip to use include and lib folder mentioned above (by enforcing it by --install-option):

 

We’re done!

Belkin KVM: Falied to validate certificate

After one of JVM updates, my Belkin KVM (Remote IP Manager) has started refusing to start with “Falied to validate certificate” error followed by “PKIX path validation failed”:

I’ve found following exceptions in Java console:

 

and

 

Google says that this is pretty common problem and returned plenty of receipts how to fix it.

Scanning the system for potential locations of the java.security file, there are four candidates. However, there is a catch: we should fix Java not in the system-wide location but the Java plugin for the web browser you’re using (Safari on MacOS in my case).

 

So we can skip the last three locations and just focus on the 1st one. Change the lines as described

 

Save and restart the browser (Safari). This time the KVM applet can start (after plenty of security warnings though).

Update

The application has to be also white-listed, otherwise it will generate error as below:

Open System Preferences, Java settings and add IP address of your KVM to the list:

Add following:

Again: save and restart your browser.

Update 2

Another security exception is required (after one of Java 8 updates):

 

Edit this config file:

Add this line within the grant { }; section:

Alfred 3 workflow – Time Zone

Do you like Alfred? I like too… I’ve recently found bunch of very nice Workflows. For me, the most used one is for sure Time Zone.

The workflow has been created by Mr Carlos from New Zealand and published on the Alfred Forum. I’ve enhanced the workflow by adding a few new functionalities:

 

 

 

  • Migration to Alfred 3
  • Converting any time to all pre-defined time zones
  • Enabling 24-hrs time format
  • Displaying phone country code

After all it looks like below:

Conversion of a time in your local time to your pre-defined time-zones – “tz <time>” in formats HH, HHMM or HH:MM:

CarlosNZ, thanks for this great tool!

Workflow can be downloaded from here: Alfred-TimeZones

(more…)

Half-Life 1 on Wine

Almost 20 years after game release I wanted to play it to check if it provokes same feelings.

As I’m on MacOS now, the obvious choice was to use Wine to run the game.

After setting Wine environment and installing the game, it turned out that although the game starts up, it’s completely un-usable as we can see just 1/3 of the screen, without any option to change the resolution:

HL1

(more…)