Running Brave Browser Incognito from MacOS CLI

You can start the Brave Browser on a Mac in incognito mode from the CLI (Terminal) using the “open -a” command:

open -a "Brave Browser" -n --args --incognito --new-window

open -a : opens the Application
-n : Open a new instance of the application even if one is already running
--args : the following arguments go to Brave
--incognito : what do you think?
--new-window : don't reuse an already existing browser window

looking at the manual page with “man open” will help you here.

adding static ip and routes to /etc/interface in debian 10 “buster”

“The times they are a-changing” – Bob Dylan

however grave the problems were that dylan addressed in his song and 1963 album, he certainly didn’t envision how linux distributions like debian are a-changing the way in which we have to configure our network settings. if we look at how we define static ip addresses, we can see quite some dylan-esque transitions. and when you need to persistently define static routes, keeping up-to-date can be at least hard.

it’s been hardly nine months since my post about static routes in debian 9 when that method has been marked as “deprecated” and won’t actually work anymore in debian 10 “buster”. So here’s how to do both static ip and static routes in buster:

the good thing is, it’s now all in one file. just edit /etc/network/interfaces. for the not-so daring types, make a backup before the edit:

> sudo cp /etc/network/interfaces /etc/network/interfaces.orig

> sudo vi /etc/network/interfaces

an out-of-the-box install will most certainly have dhcp configured. So for static ip, we comment out (or delete) these lines:

# allow-hotplug ens18
# iface ens18 inet dhcp

ens18 is the interface name in this example. that can be eth0 or en0 or something else in your case.

In order to set the static ipv4 address for the machine, insert this:

# static ip address on interface ens18 (or whatever the name):

…of course you have to adapt the adress scheme to your network setup.

right after this we’ll add the static route which has been moved from the route system command to the more general ip tool:

# for a network route:
up /bin/ip route add via

# and for a host route:
up /bin/ip route add via

of course you know that the latter – a host route – is merely a special case of the more general classless routing notation above…

ok, my little furry creatures. till next time in our series “fun with the a-changing linux concept of static routes”.

raspberry pi: make routes persistent with dhcpcd

routing decisions…

so, the other day I needed to add a static route to my raspberry’s route table. the critter is running raspbian 9 (“jessie”). this version of debianesque linux uses dhcpcd for the network configuration.

you can find a whole lot of info on how to configure the box with a static ip address. however, there are few examples for configuring a static routing table entry that will persist after a reboot.

as we all know by now, you can enter a manual route using the command:

# /sbin/route add -net gw

where is the router on your local network behind which the target network with the netmask (the “/24”) is to be found!

this entry will be lost after a reboot. in order to make it persistent, you have to edit/create a so-called “exit hook”. that’s a file that gets executed by dhcpd at various occasions, e.g. after the network interface has been configured with a valid address.

here’s how to do it:

edit the exit hook file. the command will create it, if it’s not there already:

# sudo vi /etc/dhcpcd.exit-hook

add the routing command, just as you’d type it on the command line (first line is for documentation):

## adding the persistent route from the example above:
/sbin/route add -net gw

now, in order to activate the hook file, you can try:

# sudo service dhcpcd restart

for a definitive test issue the reboot command.

if something goes wrong, you can debug the dhcpcd hooks by editing the file /lib/dhcpcd/dhcpcd-run-hooks and change the line

: ${syslog_debug:=false}
: ${syslog_debug:=true}

you can then “tail /var/syslog” in order to see the debug output.

happy routing!

Chrome on Mac: solving the “this browser is managed by your organization” message.

The other day i had this message in my chrome settings: “your browser is managed by your organization”. well, it was actually in german language, so it’s more like this one:

starting with chrome version 73 this warning comes up if one or more of chromes built-in policies differ from the default settings.

so you google the problem and you may find some solutions … for windows! (gasp) — or you come across the ‘solution’ to simply suppress the message without fixing the real problem…

most of us are not part of a browser-managing organization. therefore it would be nice to see which policy elements are set. you can see them with the browser-internal url:


this should bring up something like this:

here we go again… wasn’t it months ago when you were fed up with that chrome cloud printing dialog?

you wanted apples’ standard dialog window with chrome! you wanted back control!! you wanted reven… – whatever!

so you updated the policy above (DisablePrintPreview=true) and lived happily ever after since… until now: “your browser is being managed by someone else!” – you want to get rid of that message, for zarquon’s sake!

the thing is, when you set the policy element back to “false”, this still counts as a modified policy.

you can set the propery back with this command in a terminal window and restarting chrome:

defaults write DisablePrintPreview -bool false

…and guess what shows:


ok, so setting the property to “false” obviously leads nowhere. the trick is, to delete the property like this:

defaults delete DisablePrintPreview

et abracadabra: after a chrome restart your browser belongs to you again. no evil corp controlling whatever sleazy (or not) policies are set.

jokes aside: this method is a good way to see if this policy you deleted is actually the reason for the nefarious message. if the message persists after deleting the policy, there’s still another policy active.

overriding the low-light switch on a “lidl” solar outdoor lamp

I bought a solar lamp at “LIDL” a few days ago. at €9.99 this was a steal. it even includes a pir movement sensor. (see the LIVARNO LUX LED-Solarstrahler)

sadly, the lamp had an integrated low-light switch: the pir mode would only be active when the light shining on the solar panel was low (night). however, I planned to use the light in a fairly dim environment (carport extension). at the same time I wanted to keep the panel outside (sun!). this wold switch the light on at night only (and not in the late afternoon, when I’d need it inside because there may be enough light shining on the panel, outside.

so I opened the enclosure and looked for a way to remove the low-light sensor circuit. spoiler: you can do this by removing one resistor!

the livarno is a beast!









after opening the case, unscrew the circuit board. on the back side you will have to remove resistor R2 as shown in the pix (blue circle):


as you can see, I kinda “parked” the resistor in case I may want to restore the low-light function at a later point in time.

et voilá: solar powered battery led light with a movement sensor and working just the way you’d expect it to.

seriously, Apple?


Seriously, Apple? Seriously?

You know, people are actually using Pages to get some work done – and you don’t bother with a consistent converter across document versions?

And on top of that, the new Software is perfectly able to read the old document when I manually change the version number in the metadata! That’s BS.

Fuck you Apple!

archiving my old floppy disks

the other day i stumbled upon those boxes with the 3.5″ floppy disks from  about 20 years ago (blyme! is it 20 years already?). so i decided to get rid of them. w4floppies-4hile browsing through the disks with the handwritten labels, i remembered all that time that went into the programs, documents and other data on there. i was on the verge of packing them away again, not being able to simply thrash them, when i decided to solve the dilemma once and for all: i would be brave and back up all that was on there!

the first challenge was to find the hardware to read 3.5 floppies: merely two weeks earlier i had thrown away the last pc capable of connecting a floppy drive. sifting through the treasure trove in my dungeon, i unearthed my very first laptop computer: a dell dpi-a 366xt, outfitted with a pentium-II and a multifunction bay for a cd-rom or a floppy drive. the laptop now runs a console version of linux (some outdated ubuntu). the only reason, this machine had not been auctioned off at ebay years ago was my emotional attachment to it….


I wanted to put as little effort as necessary into the workflow. however, i was not ready to build myself a full-blown auto ripper like this guy did. in the end, i counted only around 250 floppy disks that i wanted to backup.

i started to hack together a short bash script that will allow for the following tasks:

  • take a description for the current floppy. at best this was something from the label (if it was still readable) or from the floppy’s directory listing.
  • if the user gives no description, the script creates a unique one (the current date and time).
  • maintain and increase a running number for the backup. this comes in handy later on when referencing the label pix (see below)
  • create a target directory on the local hdd with the information above
  • copy all the files from the disk to the target directory
  • create a block image from the floppy and save it in the target directory as well
  • create a text file with the original directory listing
  • record all the errors we’re running into, during the process

after reading dweller’s writeup (in the link above), i saw that he also took a picture of the floppy label. after looking at my disks, i decided to go the same way. labels tend to hold additional information like licenses or serial numbers. an automatic match between label pic and floppy data seemed pretty hard, so i decided to just snap a photo of each of the labels and match them manually afterwards. i set up a camera on a tripod, looking down on the floppies and slightly ahead in order to minimize flash glare on the labels.

the workflow

  • take the floppies out of the boxes and stack them in front of the camera
  • take a photo of the topmost floppy
  • read the label and/or run a directory listing for the description
  • put the floppy into the disk drive and start the script with a floppy name/description on the command line
  • wait until the script finishes doing its magic, praying the gods of magnetic data storage have been merciful to your digital treasures.
  • take the disk out and throw it away
  • GOTO 10


pitfalls encountered in the process:

  • the script requires a fair amount of mounting and unmounting of devices. i therefore run it in an su’d shell (sudo -i)
  • some floppies were partially or completely dead. those lead to a non responding or endlessly looping script. In that case … well ^C and move on.
  • the hardware is a standard pc floppy drive. i have a few amiga and old macintosh  formatted floppies. the dell was of course not able to read those. i will keep them for now.

creating the floppy image through the dd utility requires the floppy to be dismounted. this may be a problem when you run the  directory listing in order to grasp an idea on the content. the dir list command therefore includes mounting/dismounting the floppy:

mount /media/floppy0 ; ls -la /media/floppy0 ; umount /media/floppy0


using this workflow and the simple script below i was able to harvest the data from about 200 floppy disks, now hogging a moot 240 megabytes on my nas device. this doesn’t include the the label pics with an additional 270 mb.


so without further ado, here’s ..

the script:

# Floppy disk copy script
# 2015-08-22 Oliver Huf

## where the floppy images end up
export targetroot="/root/fdstack"
## where your floppy gets mounted to
export fdd=/media/floppy0
## this is where we store the last number
export cntf=cnt.txt

## get, increase and write back running number
export counter=`cat $cntf`
## leading zeroes on the directory names allows for cleaner sorting later on
## padding to 4 digits. YMMV
export lz=`printf "%04d" $counter`
## write the current number to disk:
echo $counter > $cntf

## in case we forget to add a name on the command line, we want at least a time-stamped directory name:
export datetime=`date +%Y-%m-%d_%H-%M`
export dname=$1
if test -z $dname; then
 export dname=$datetime

## adding the padded number to the directory name:
## setting up the directories
export targetdir=$targetroot/$dname
mkdir -p $targetroot
mkdir -p $targetdir
## the directory listing
export dirfile=$targetdir/_FloppyDir.txt
## the error log
export errfile=$targetdir/_FloppyERR.txt

## Say Hello!
echo Diskname= $dname

## aaand they're off..

## we're mounting the floppy read-only. This saves us from an annoying warning, when the floppy is write-protected.
mount -r $fdd

## we output the start timestamp and the dir listing 
echo $datetime > $dirfile
echo "" >> $dirfile
ls -laR $fdd >> $dirfile

## while a simple 'cp' would work, I like to use rsync for this
## option -t retains the original timestamp on the files
## all output (stdout as well as stderr) goes to the errfile
rsync -avtz $fdd/ $targetdir 2>&1 | tee -a $errfile

## in order to create the floppy image, we need to unmount the floppy...
umount $fdd
echo creating image...
dd if=/dev/fd0 of=$targetdir/_Floppy${counter}IMG.DD

## show what we did:
ls -laR $targetdir

echo "Disk $dname successfully copied!"


one more thing

depending on the confidentiality of the data, it’s never enough to just trash the floppies. someone could try to salvage the data (and nobody wants to see their ex -spouses pics on 4chan … well … different story).

in order to make sure the data is unusable you should destroy the floppies: you could snip them apart with some scissors, shoot at them … again: YMMV


living in an environmentally aware culture, I wanted to make the best out of it. taking the floppies apart is not too hard. even a nine year-old can do it:


the extraction leaves you with a lot of plastics from the casing. some metal from the protective slider, a tiny spring and the center nave and the magnetic film-disc.

the discs can be cut up or fed into a shredder.


that’s all.. let me know when you use it or improve on it.