six demon bag

Wind, fire, all that kind of thing!

2020-06-03

Disable Firefox 77 Address Bar Popout

*sigh* Another day, another Firefox fuckup. One of the more annoying new "features" in recent Firefox versions is the address bar jumping at you when it gets the focus. In Firefox 75 that misbehavior could be corrected with a couple adjustments in about:config:

browser.urlbar.openViewOnFocus false
browser.urlbar.update1 false
browser.urlbar.update1.interventions false
browser.urlbar.update1.searchTips false

However, with Firefox 77 those settings don't work anymore (you can reset/delete them). Because who would ever want to disable what Mozilla developers in their infinite wisdom decided that you must like?

See more ...

Posted 12:42 [permalink]

2020-04-30

Shell Patterns (4) - Limiting Execution Time

This is a short series describing some Bash constructs that I frequently use in my scripts.

Sometimes you want a script to give up on what it's trying to do after some period of time. The simplest way for limiting the time a given statement may take for execution is the timeout command.

$ timout 2 ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.031 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.012 ms
$ echo $?
124

However, timeout is only useful for limiting the execution time of a single (blocking) command. Consider for instance a situation where you deployed a VM or an LXD container, and need to wait for cloud-init to complete on that system. Or a situation where you sent an asynchronous request to a REST API. timeout won't help you there. You need to poll the system or API repeatedly until the respective "operation completed" indicator appears.

See more ...

Posted 22:35 [permalink]

2019-05-06

Run a time server in an LXC container

Running a network time server in an LXC container normally doesn't work even if you run the container in privileged mode. The reason is that containers drop certain capabilities upon startup for security reasons (sys_module, mac_admin, mac_override, sys_time).

See more ...

Posted 21:38 [permalink]

2017-09-29

LXD upgrade fails on Ubuntu 16.04 without Systemd

Recently I tried to install LXD (Canonical's container manager) from backports on a Ubuntu 16.04 system (running without Systemd). The version shipping with the system (2.0) doesn't suffice, because I need the new storage API that was introduced with LXD 2.15. However, upgrading to the backports package failed post-install:

invoke-rc.d: initscript lxd, action "start" failed.
dpkg: error processing package lxd (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
 lxd
E: Sub-process /usr/bin/dpkg returned an error code (1)

Which was weird, since the upgrade had worked for me before.

See more ...

Posted 13:57 [permalink]