Java versions on macOS

On macOS you can use /usr/libexec/java_home command to control your used Java version. As a lot of applications and/or projects still require Java 1.8 or you might want to use an alternative JDK/JRE let’s look into managing those different versions. $ /usr/libexec/java_home -h Usage: java_home [options...] Returns the path to a Java home directory from the current user's settings. Options: [-v/--version <version>] Filter Java versions in the "JVMVersion" form 1.X(+ or *). [-a/--arch <architecture>] Filter JVMs matching architecture (i386, x86_64, etc). [-d/--datamodel <datamodel>] Filter JVMs capable of -d32 or -d64 [-t/--task <task>] Use the JVM list for a specific task (Applets, WebStart, BundledApp, JNI, or CommandLine) [-F/--failfast] Fail when filters return no JVMs, do not continue with default. [ --exec <command> ...] Execute the $JAVA_HOME/bin/<command> with the remaining arguments. [-R/--request] Request installation of a Java Runtime if not installed. [-X/--xml] Print full JVM list and additional data as XML plist. [-V/--verbose] Print full JVM list with architectures. [-h/--help] This usage information. Manual installation For this post I’ve decided to use AdoptOpenJDK as it’s actively maintained. ...

February 21, 2020 · 3 min · 601 words · dw

How to run Mikrotik's Winbox on macOS

Some time ago m0n0wall burried their project and my firewall went out of maintenance. Back in 2008 m0n0wall really had its great time but unfortunately the recommended successor project opnsense required more hardware (cpu/memory) than my alix routerboard alix2c3 was equipped with. I didn’t want to invest or assemble a new alix routerboard with encosure and antennas. So after doing some research online I decided Mikrotik would be my next internet entry point. So I got a hAP AC from Mikrotik. ...

January 24, 2018 · 2 min · 348 words · dw

Change umask in Docker containers

Problem You’re mounting volumes into Docker containers and running into permission issues while accessing volume from other Docker containers. Docker installation required Docker must be installed on your system. $ docker version Client: Docker Engine - Community Version: 19.03.5 API version: 1.40 Go version: go1.12.12 Git commit: 633a0ea Built: Wed Nov 13 07:22:34 2019 OS/Arch: darwin/amd64 Experimental: false Server: Docker Engine - Community Engine: Version: 19.03.5 API version: 1.40 (minimum version 1.12) Go version: go1.12.12 Git commit: 633a0ea Built: Wed Nov 13 07:29:19 2019 OS/Arch: linux/amd64 Experimental: false containerd: Version: v1.2.10 GitCommit: b34a5c8af56e510852c35414db4c1f4fa6172339 runc: Version: 1.0.0-rc8+dev GitCommit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657 docker-init: Version: 0.18.0 GitCommit: fec3683 umask umask is set to 0022 on most linux sytems by default. This umask allows group and others to read but not write your files, see below: ...

January 25, 2016 · 2 min · 339 words · Daniel

Private docker-registry within docker

Sometimes you need your own docker-registry to just try out new things or to avoid downloading stuff again and again from the internet. I tried to build a docker-compose recipe to setup my own private registry. Docker installation required Docker must be installed on your system. $ docker version Client: Docker Engine - Community Version: 19.03.5 API version: 1.40 Go version: go1.12.12 Git commit: 633a0ea Built: Wed Nov 13 07:22:34 2019 OS/Arch: darwin/amd64 Experimental: false Server: Docker Engine - Community Engine: Version: 19.03.5 API version: 1.40 (minimum version 1.12) Go version: go1.12.12 Git commit: 633a0ea Built: Wed Nov 13 07:29:19 2019 OS/Arch: linux/amd64 Experimental: false containerd: Version: v1.2.10 GitCommit: b34a5c8af56e510852c35414db4c1f4fa6172339 runc: Version: 1.0.0-rc8+dev GitCommit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657 docker-init: Version: 0.18.0 GitCommit: fec3683 You’ll need a working directory where docker-compose.yml file and certificates are stored in, so please create a folder my-registry as shown below: ...

January 7, 2016 · 3 min · 454 words · dw

Plone test development with robotframework and RIDE

Running acceptance tests in Plone Test driven development (TDD) can be a pain. If you are working with Zope and Plone most of time gets consumed starting up Zope running setUp method and rolling back transaction in tearDown method. So why not use a running already set-up instance for test-development? Today I will show you how to reach that goal. It’s not as hard as it seems. Use buildout Of course we use buildout to get a custom script which we can run through RIDE. I configured a new pybot script, the basic idea has been implemented in plone.act1 module already. ...

November 29, 2012 · 2 min · 256 words · dw

Install Robot Framework RIDE through homebrew

Python, wxPython and robotframework RIDE on your macOS. Update 2016, 23 Feb Fixed wxPython installation so it works with most recent versions available today. Update 2017, 03 Jul Seems this installation method no longer works on >= MacOS Sierra. Please use a docker image and Ride in browser. wxPython Since wxPython is available on homebrew you don’t have to install the package provided on the wxPython website. $ brew info wxpython wxPython: stable 3.0.2.0 (bottled) Python bindings for wxWidgets https://www.wxwidgets.org/ /usr/local/Cellar/wxPython/3.0.2.0 (1,107 files, 38.2M) Poured from bottle From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/wxpython.rb ==> Dependencies Required: wxmac ✔ ==> Options --universal $ brew install wxpython This will take some time so be patient. ...

October 16, 2012 · 2 min · 364 words · Daniel

Secure your Dropbox

Quick guide howto get an encFs encrypted Dropbox subfolder automounted on login in macOS and indexed in Spotlight. Introduction First of all, Dropbox is a really useful piece of software. Your data is stored unencrypted inside an online storage and in this case it’s not suitable for secret data. You can bypass this disadvantage by encrypting a folder inside Dropbox. Prerequisits The following instructions expect you using a macOS but may also inspire Unix or Linux users. ...

October 10, 2012 · 6 min · 1264 words · Daniel

Howto send mails from localhost through a smarthost on macOS

You’re getting weird errors like “Connection refused” from your smtp library? By reconfiguring your local mailer to send mails through a smarthost you can solve this issue. Setting up a smarthost Setting up your macOS to use a smarthost to forward mails to is not very hard. I found a nice tutorial on fuerstnet.de which was the base of this blog post. Copy the lines: $ sudo postconf -e relayhost=your.isps.mailserver smtp_use_tls=yes smtp_sasl_auth_enable=yes smtp_sasl_password_maps=hash:/etc/postfix/smtp_auth tls_random_source=dev:/dev/urandom smtp_sasl_security_options=noanonymous $ sudo sh -c 'echo "your.isps.mailserver username:password" >> /etc/postfix/smtp_auth' $ sudo chown root:wheel /etc/postfix/smtp_auth $ sudo chmod 600 /etc/postfix/smtp_auth $ sudo postmap hash:/etc/postfix/smtp_auth Problems I noticed postfix is quitting after 60 seconds. So if you send yourself a test email using: echo "test" | mail -s "test" your@email the postfix daemon will quit after 60 seconds and you’ll get these errors when trying to send mails through localhost in (for example) Plone: ...

April 7, 2010 · 2 min · 357 words · dw