How to add a new virtual console resolution for a VirtualBox VM?

On VirtualBox host:

$ VBoxManage setextradata "VM name" "CustomVideoMode1" "1400x1050x16"

On VirtualBox VM’s grub boot loader stage, press ‘e’ and add “vga=864” as a new kernel parameter.

If you add an invalid value for vga, i.e. vga=871, you’ll get the list of available resolutions.

Edit 20180316: It seems that vga= expects the value in decimal but the Linux kernel converts the value to hex.

How to convert values from decimal to hex:

$ echo -e "obase=16 \n 864 \n" | bc -l


Ubuntu killed rc.local in 17.10

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.4 LTS
Release:        16.04
Codename:       xenial
$ pwd
$ cat rc-local.service
#  This file is part of systemd.
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

# This unit gets pulled automatically into by
# systemd-rc-local-generator if /etc/rc.local is executable.
Description=/etc/rc.local Compatibility

ExecStart=/etc/rc.local start

Short guide on how to install Oracle VirtualBox 5.2 on Ubuntu 16.04

These are the steps used to install Oracle VirtualBox.

Continue reading “Short guide on how to install Oracle VirtualBox 5.2 on Ubuntu 16.04”

How to configure your WLAN interface in the interfaces file?(take 2)

Getting back to the topic of wireless interface configuration in /etc/network/interfaces, I wrote this blog post earlier in 2015:

Continue reading “How to configure your WLAN interface in the interfaces file?(take 2)”

copy/paste adds newlines on paste?

Add to $HOME/.bashrc:

/bin/stty icrnl
export LESS=-XFR

Add to $HOME/.inputrc:

set enable-bracketed-paste on

Prefer less instead of more.

How to start xorg apps from root account to your user account’s xorg session?

# env DISPLAY=:0.0 XAUTHORITY=/home/username/.Xauthority xterm -e su - username

How to create custom udev rules for usb devices?

See the usb device path on insert/remove:

$ sudo udevadm monitor --udev --subsystem-match=usb
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing

UDEV  [2575.915449] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
UDEV  [2575.930220] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
UDEV  [2625.506972] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
UDEV  [2625.513461] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)

Continue reading “How to create custom udev rules for usb devices?”

How to configure a new wireless connection through the CLI? (Ubuntu)

$ nmcli device wifi connect wlan_ssid password your_password

How to use sudo under Wayland to open graphical applications?

Wayland’s security model is different from Xorg.

Continue reading “How to use sudo under Wayland to open graphical applications?”

Blog at

Up ↑