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 https://huf.org

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):
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
dns-domain fritz.box
dns-nameservers 192.168.1.1 8.8.8.8

…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 192.168.10.0/24 via 192.168.1.10

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

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 10.1.2.0/24 gw 10.1.1.100

where 10.1.1.100 is the router on your local network behind which the target network 10.1.2.0 with the netmask 255.255.255.0 (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 10.1.2.0/24 gw 10.1.1.100

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}
to
: ${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:

chrome://policy

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 com.google.Chrome DisablePrintPreview -bool false

…and guess what shows:

grrrr..

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

defaults delete com.google.Chrome 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.

seriously, Apple?

Pages-seriously

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!
Seriously.

System-Druckdialog in Chrome (Mac OS)

Chrome öffnet beim Drucken einer Webseite, oder eines eingebetteten Dokuments stets seinen eigenen Druckdialog. Seit heute habe ich das Problem, dass der Druckdialog für eingebettete pdf’s unterhalb des Dokumentes geöffnet wird und somit vom Bildschirm verschwindet.

Abhilfe: 1) größeren Monitor verwenden, oder 2) Chrome dazu überreden, den System-Druckdialog zu benutzen. Während Lösung 1 auch nach einem Systemupgrade noch sicher funktioniert, ist Lösung 2 ein wenig günstiger zu haben ;-)Chrome druckt

Folgender Befehl in einem “Terminal” Fenster veranlasst Chrome, seinen eigenen Druck-Dialog nicht zu verwenden:

defaults write com.google.Chrome DisablePrintPreview -bool true

ggfs. Chrome neu starten, und dann… Happy Printing!