manually bring up network on eth0

ip link set eth0 up
ip addr add broadcast dev eth0
ip route add default via
echo "nameserver" > /etc/resolv.conf


ifconfig eth0 up
ifconfig eth0 netmask broadcast
route add default gw
echo "nameserver" > /etc/resolv.conf

Only console users are allowed to run the X server

It used to be enough to create /etc/X11/Xwrapper.config with the following in it

allowed_users = anybody
needs_root_rights = no

That is no longer enough. So patch X.

Place this following in /etc/portage/patches/x11-base/xorg-server/console.diff
(version 1.20.8 tested but probably works on others ?)
If you’re not using Gentoo then you should be 😉
You’ll need to google how to patch and compile packages on your distro.

diff -Naur a/hw/xfree86/xorg-wrapper.c b/hw/xfree86/xorg-wrapper.c
--- a/hw/xfree86/xorg-wrapper.c	2020-03-29 21:21:15.000000000 +0100
+++ b/hw/xfree86/xorg-wrapper.c	2020-05-22 14:23:59.825069376 +0100
@@ -206,29 +206,6 @@
     parse_config(&allowed, &needs_root_rights);
-    /* For non root users check if they are allowed to run the X server */
-    if (getuid() != 0) {
-        switch (allowed) {
-        case ROOT_ONLY:
-            /* Already checked above */
-            fprintf(stderr, "%s: Only root is allowed to run the X server\n", argv[0]);
-            exit(1);
-            break;
-        case CONSOLE_ONLY:
-            /* Some of stdin / stdout / stderr maybe redirected to a file */
-            for (i = STDIN_FILENO; i <= STDERR_FILENO; i++) {
-                if (on_console(i))
-                    break;
-            }
-            if (i > STDERR_FILENO) {
-                fprintf(stderr, "%s: Only console users are allowed to run the X server\n", argv[0]);
-                exit(1);
-            }
-            break;
-        case ANYBODY:
-            break;
-        }
-    }
     /* Detect if we need root rights, except when overriden by the config */

dkimproxy ignores user settings

Very useful, but unmaintained, dkim email message signing program.
All the time I’ve been using it the sysvinit script to start it has been a mess and various workarounds are needed. With the refusal to accept a different location for private.key being particularly annoying.
At least on debian and ubuntu thisis the case.
Even though you are supposed to be able to override default settings in
/etc/dkimproxy/dkimproxy_out.conf it does not happen.
This is only for dkimproxy.out because that’s all I use but should be adaptable to

To do

Mask the sysvinit script. (even though there’s currently no service file for dkimproxy the below still works).

systemctl mask --now dkimproxy.service

Create /etc/systemd/system/dkimproxy-out.service

Description=dkimproxy.out slightly more sane

ExecStart=/usr/sbin/dkimproxy.out --conf_file=/etc/dkimproxy/dkimproxy_out.conf
ExecStop=/bin/kill -15 $MAINPID


Create (or edit) /etc/dkimproxy/dkimproxy_out.conf with options of your choosing which will now be honoured.

user	 			dkimproxy
group		 		dkimproxy
min_servers 		2
min_spare_servers 	1
signature 			dkim
method				relaxed
keyfile 			/etc/dkimproxy/private.key
selector 			selector1

Enable and start.

systemctl enable --now dkimproxy-out.service

rtorrent sequential download

Patch libtorrent

diff --git a/src/download/ b/src/download/
index 850fec0f..248a29f9 100644
--- a/src/download/
+++ b/src/download/
@@ -82,7 +82,7 @@ ChunkSelector::update_priorities() {
   if (m_position == invalid_chunk)
-    m_position = random() % size();
+    m_position = 0;
@@ -100,14 +100,6 @@ ChunkSelector::find(PeerChunks* pc, __UNUSED bool highPriority) {
   // set.
   rak::partial_queue* queue = pc->is_seeder() ? &m_sharedQueue : pc->download_cache();
-  // Randomize position on average every 16 chunks to prevent
-  // inefficient distribution with a slow seed and fast peers
-  // all arriving at the same position.
-  if ((random() & 63) == 0) {
-    m_position = random() % size();
-    queue->clear();
-  }
   if (queue->is_enabled()) {
     // First check the cached queue.

Libvirt – Auto resize does not work on most linux guests

It is left to the DM to resize after being informed by libvirt there has been a change. Many don’t.
Poor design decision IMHO.

xrandr --output Virtual-1 --auto

Will resize to the window size you have chosen. The Virtual-1 part might need adjusting. You can find out by using


on it’s own. In the case of a Manjero VM I just installed

$ xrandr
Screen 0: minimum 320 x 200, current 1256 x 869, maximum 8192 x 8192
Virtual-1 connected primary 1256x869+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1256x869      59.98*+
   2560x1600     59.99    59.97  ....................................

So it’s Virtual-1.

Make a script and link it to a hotkey and it’s less of an annoyance.

Note: spice-vdagent may need to be installed and running for this to work ?

Bezel correction and multiple displays with Nvidia driver on Linux – Metamode seems to be ignored

In theory it should be as easy as using offsets in a ‘metamode’ line. in he screen section of xorg.conf eg.

	Option         "metamodes" "DP-0: 1920x1080_75 +0+0,DP-2: 1920x1080_75 +1962+0, DP-4: 1920x1080_75 +3924+0

Where +0+0 , +1962+0 and +3924+0 is adding 42 pixels between monitors to account for the size of my bezels. But it doesn’t work. The metamode line is ignored and the nvidia driver make it’s own metamode line, as seen in Xorg.log

[ 40517.093] (**) NVIDIA(0): Option "MetaModes" "DP-2: 1920x1080_75 +1920+0, DP-0: 1920x1080_75 +0+0, DP-4: 1920x1080_75 +3840+0"

I can change the absolute positions in the nvidia-settings GUI. Press apply and it works. I have my bezel correction. But then click ‘Save to Xconfig file’, Fire up an xserver with that .conf and it overrides the custom metamode again.

Work around:

Use nvidia-settings gui to position the displays with the offsets you want. Click apply.
On the command line
nvidia-settings –query Currentmetamode
Which gave me

Attribute ‘CurrentMetaMode’ (gent:1.0): id=50, switchable=no, source=nv-control :: DPY-3: 1920x1080_75 @1920x1080
+1962+0 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0}, DPY-0: 1920x1080_75 @1920x1080 +0+0
{ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0}, DPY-5: 1920x1080_75 @1920x1080 +3924+0 {ViewPortIn=1920x1080,

You’ll need to clean up newlines and extra white space so its all on one line . Get rid of the “(gent:1.0): id=50, switchable=no, source=nv-control ::” bit (when I didn’t the command succeeded but I lost my middle display). Get rid of Attribute, put an = after ‘CurrentMetaMode’ and double quotes around every following, and nvidia-settings –assign at the start and you should be left with some thing like this

nvidia-settings --assign 'CurrentMetaMode'="DPY-3: 1920x1080_75 @1920x1080 +1962+0  {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0}, DPY-0: 1920x1080_75 @1920x1080 +0+0 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0}, DPY-5: 1920x1080_75 @1920x1080 +3924+0 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0}"

So that command is run before playing a game where bezel correction is required. Run it again without the offsets to go back to normal.

Steam – Set launch option from command line

Some games have various options when started from within Steam. For exmaple with F1 2019 you can choose dx12 or dx11.
This choice does not appear when you start the game from the command line in the form

steam steam://launch/928600

In the case of F1 2019 the dx12 exe will be started. which is no good on Linux. To set our choice to dx11 just append /option2 to the end of the command.

steam steam://launch/928600/option2

It does not work for the



If you need to find which option number is the write one you can work it out within


(adjust if your Steam dir is elsewhere)
Not easy to read but try searching for the name of the executable you want to start and the correct option number should be close by. Or search for the games name.