Categories
General MacOS

Show FileVault status

Show FileVault encryption status:

#apfs volumes (look/grep for "Encryption Progress")
diskutil apfs list

#hfs
diskutil cs list

Categories
General MacOS

MacOS Java 13 installation

Using homebrew finding and installing the right java runtime is an easy task:

brew cask install java

Yes, sometimes I still need java on my desktop, like for designing load tests using JMeter.

Categories
General MacOS

MacOS Catalina and Fujitsu ScanSnap S300

The quite old, but still perfectly working ADF scanner ScanSnap S300 is not supported anymore by Fujitsu. With MacOS Mojave the scanner worked very well using the ScanSnap S1300i driver. But not so with Catalina – the new ScanSnap Home software checks the connected Device IDs.

Only solution: Fujitsu wants me to buy a new Scanner although the current one is still working fine (hardware wise)…

I could not find a simple solution. Yes, there are some solutions live VueScan or ExactScan, but for me they feel too expensive.

In the end I’m using now my existing Parallels Windows 10 virtual machine to scan. On that platform the ScanSnap Manager Software is still supported – also in a 64bit version (why not on Mac Fujitsu?). You can use the newer Version from the S1500 (Download)!

Finally I am able to scan again. Without spending valuable resources into a new scanner (just because of a missing switch in a software).

Categories
General MacOS

MacOS keychain with AWS CodeCommit

Using temporary credentials (access-tokens) with AWS CodeCommit and git clients can be hard with MacOS. The Keychain saves those credentials and after ~15min you must renew them (remove them manually from the keychain). And if you have also to work with repositories other than AWS (like GitHub, GitLab) its even worse. But since recent git versions (>2.9) it is possible to reset the credential helper by Git-Host!

Using the git credential-helper for CodeCommit repositories only:

[credential "https://git-codecommit.eu-central-1.amazonaws.com"]
  helper=
  helper=!aws codecommit --profile developer-cloudformation credential-helper $@
        UseHttpPath = true

It’s important to add that “helper=” line. Regularly the global git config contains a “helper=osxkeychain” line and those helper-directives are additive – but the “helper=” line breaks/resets that inheritance.

Categories
Allgemein MacOS Programmierung

MacOS Photos and AppleScript

Just about to move from Adobe Lightroom (CC) to native Apple Photo App/iCloud (but thats another story).

Unfortunately most of the old AVI videos got a wrong date during the import (not the file-creation date but the date of import). Not helpful. Fortunately Lightroom had set the date/time into the filename, so I should be able to set it from there.

In the end I spent my first night with with AppleScript – thats the outcome:

tell application "Photos"
  activate
  set imageSel to (get selection)
  if imageSel is {} then
    error "Please select some images."
  else
    repeat with im in imageSel
      tell im
        set imageFilename to filename of im as string
        set d to current date

        -- filename format: 20030316_160816_03498.avi
        set the year of d to text 1 thru 4 of imageFilename
        set the month of d to text 5 thru 6 of imageFilename
        set the day of d to text 7 thru 8 of imageFilename
        set the hours of d to text 10 thru 11 of imageFilename
        set the minutes of d to text 12 thru 13 of imageFilename
        set the seconds of d to text 14 thru 15 of imageFilename

        set the date of im to d
      end tell
    end repeat
  end if
end tell
return input
Categories
Allgemein MacOS

MacOS Mojave font rendering

MacOS Mojave made my fonts look terrible when using the non-retina, old fashioned “Apple Thunderbold Display”. However Ahmad Awais fixed the issue for me:

defaults write -g CGFontRenderingFontSmoothingDisabled -bool FALSE
Categories
Linux MacOS

macOS: ignore hostkeys of some hosts

To ignore hostkey checking for a subnet (i.e. when hosts got changed/provisioned/scaled often) use the following snippet:

# ~/.ssh/config

Host 172.18.*
   StrictHostKeyChecking no
   UserKnownHostsFile=/dev/null

But use with care, in general hostkey checking is a good idea!

Categories
MacOS

macOS: add ssh-keys to agent

Since macOS sierra the system don’t adds ssh-keys to the agent automatically anymore. Add the following ssh-config file to restore the previous behaviour:

# ~/.ssh/config

Host *
    UseKeychain yes
    AddKeysToAgent yes

after connecting to a remote shell and typing the passphrase once the key/passphrase will be remembered in the macOS keychain.

Categories
Linux MacOS Networking

Custom routes in OpenVPN client

Um vom Server gepushte Routen zu ignorieren und nur eigene im VPN-Client zu verwenden, genügen folgende Zeilen in der openvpn.conf des Clients:

route-nopull
route 192.168.23.0 255.255.255.0

Ich nutze dies hier mit Tunnelblick auf dem Mac um bei der OpenVPN Config der Astaro wahlweise nicht den gesamten Traffic durchs VPN zu schicken.

Categories
Linux MacOS Tools

MacOS rsync: Zeichensalat

Ähnliches Problem wir hier.

Insbesondere beim Verwenden von “–delete” kommt die von MacOS mitgelieferte rsync-Version nicht mit Sonderzeichen klar. Daten mit Umlauten werden jedes mal gelöscht und danach erneut übertragen. Die mitgelieferte Version (2.6.9) hat noch keinen iconv-Support zum Konvertieren der Zeichensätze.

Abhilfe schafft es rsync 3.x zu installieren: Entweder selbst kompilieren oder ein Binary von z.B. hier verwenden. Rsync liegt danach unter /usr/local/bin/.

Für den Zeichensatz des Macs gibt es ein pseudo-UTF8: “UTF8-MAC”. So klappt es dann endlich mit dem rsync (hier Mac <=> Linux):

/usr/local/bin/rsync -av --delete --iconv=UTF8-MAC,UTF8 -e ssh otto@192.168.24.27:/home/otto/data/ data/