Lubuntu: Settings – mouse cursor size, brightness…

Display resolution

echo “Xft.dpi: 280” > ~/.Xresources

Mouse cursor


Set the following environment variable in session settings.


Before 20.04

Taken from here.

In the .config/lxsession/Lubuntu/desktop.conf change the following line:


Brightness shortcuts


Preferences > LXQt settings > Shortcut Keys

Before 20.04


Size of menus and tool bars

Taken from here.

(1) In a new tab, type or paste about:config in the address bar and press Return. Click the button accepting the risk.
(2) In the filter box, type or paste devp and pause while the list is filtered — there should only be one preference left.
(3) The layout.css.devPixelsPerPx normally has -1.0 which follows the Windows Text Size setting.
Double-click to open a small dialog where you can type a new value.

System font scale

Taken from here.

  • open new tab
  • enter “about:config” in the address field
  • search for the option “font.size.systemFontScale” (using the search)
  • change the value from 100 to something lower, e.g. 80

Raspberry Pi: SysRq magic to reboot or shutdown headless

Based on this and this articles.

Ellipses below are short delays of a few seconds – to let your machine complete system requests after pressing the letters.

Hold Alt+SysRq and press one by one with small pauses r…e…i…s…u…b/o, b – for reboot, o – for shutdown.

Depending on your keyboard – say, it’s German, and the Right Alt is AltGr actually, then the Alt should be the Left Alt.

If SysRq is missing on your keyboard – try PrintScreen instead. The PrintScreen on multimedia keyboards sometimes is accessible in combination with a Fn button.

Functional programming: Algebraic data types

Based on this Wikipedia article.

Composite data types

Composite (or compound) data types consist of a few primitive data types or other composite types. Examples of composite data types are C/C++ structure and union.

Product data type

Let’s look at the C/C++ structure example:

struct account {
   int account_number;
   char *first_name;
   char *last_name;
   float balance;

This type contains account_number AND first_name AND last_name AND balance fields – the AND makes it a product type, where product is boolean AND.

Sum data type

Let’s now look at the following example of C/C++ union:

union number {
  int8_t i8;
  int16_t i16;
  int32_t i32;
  int64_t i64;
  float f32;
  double f64;

This type can accommodate an int8_t OR int16_t OR int32_t OR int64_t OR float OR double number – the OR makes the type a kind of sum type (not quite yet), where sum is boolean OR.

This is not the whole of the sum data type yet. The actual type of the data currently stored in a C/C++ union is only known at run time, and the program that uses the union should be able to handle that at run time.

The union can be extended to tagged union, which may look like this:

struct number {
  uint8_t tag;
  union {
    int8_t i8;
    int16_t i16;
    int32_t i32;
    int64_t i64;
    float f32;
    double f64;
  } value;

The tag specifies the type of the value at run time.

Such tagged union type is called sum data type.

Hybrid data types

Product and sum data types are the base algebraic data types. The data types composed of product and sum data types are called hybrid data types.

It probably makes not that much sense to use the struct number type for the balance field in the struct account, but here it is – a hybrid data type example:

struct account {
int account_number;
char *first_name;
char *last_name;
struct number balance;

Algebraic data types

The product, sum and hybrid data types are what is called algebraic data types.

See also

Functional Programming: Terminology

Raspberry PI: How to install Android emteria.OS, Google Play and Synthesia

  • Raspberry Pi 3 Model B, 32GB SD-card, Flatron IPS231 display, Rii i8 mini wireless keyboard/touchpad
  • Roland FP-30 piano
  • Ubuntu 18.04 LTS
  • Emteria.OS_Installer-v0.6-13.AppImage (Android 7.1)
  • Synthesia 10.5

Please keep in mind that the sequence described below presumes certain level of Linux and Android knowledge, e.g. how to mount SD-cards in Linux, how to edit  Android boot configuration settings, or how to use Android Debug Bridge.

Make emteria.OS SD-card

Follow emteria.OS download and install instructions – you will be asked to create an Emteria account.

Emteria.OS license

If you decide to not yet pay for emteria.OS personal or business license, and use free evaluation license – be prepared to system reboots after 8 hours, and an evaluation license notice pop up now and then.

Modify HDMI settings in /boot/config.txt

Mount the SD-card in your Linux box, edit emteria.OS’s /boot/config.txt, enable safe HDMI configuration:


#hdmi_cvt=1024 768 60 6 0 0 0





Save the changed /boot/config.txt file, unmount the SD-card.

Alternatively, you might want to configure all HDMI parameters manually – this is a rather tricky process which only worked for me with a dated non-HD resolution display.

Boot emteria.OS

Insert the emteria.OS SD-card into your Raspberry Pi, connect display, keyboard and mouse, power up.

For the next step your Raspberry Pi has to be connected to internet – via ethernet or wifi. In case of wifi – choose your wifi network and enter password, as usually in Android. Check internet connectivity in the emteria.OS browser.

Install Google Play

The emteria.OS comes without Google Play Store which we will need in the next step to install and unlock Synthesia. To install Google Play Store – follow the process explained here:

Google Play installation

  • In the EmteriaOS/Raspberry PI browser go to
  • Select ARM, 7.1, pico, and click the Download button
  • When download is finished – click the Emteria.OS Power Off app icon, then Recovery
  • After Android reboots Swipe to Allow Modifications
  • Click Install
  • Go to the Download folder and click the downloaded
  • Swipe to Confirm Flash
  • Click Reboot System after flashing is finished

After reboot – start Google Play and configure your Google account

You have to be patient while Android is busy with “System optimization in progress, please wait…” – it takes quite some time (longer than 1 day) and a few reboots, Android will be rather unresponsive all that time.

That might be that the “Sytem optimization…” message, the evaluation license pop ups, and Android’s lack of responsiveness would feel a bit frustrating, and you would probably want to try to reboot your Raspberry Pi – just to check that it did not go south incidentally. Here is a way how to do that (please also see the screenshots further below):

  • Go to Android Settings – Emteria, and switch on the “Enable ADB over Ethernet”
  • Note the IP address of your Raspberry Pi
  • On your Linux box:
### Connect
$ adb connect
connected to
### Just checking if it's there
$ adb devices
List of devices attached	device
### Reboot
$ adb reboot

Install Synthesia

I downloaded and installed  Synthesia APK manually in the emteria.OS browser – to do that you need to go to generate Synthesia APK download link – the APK will be downloaded and installed.

Alternatively, you can install Synthesia from Google Play Store.

Unlock Synthesia

If you have Synthesia unlock key – unlock Synthesia as usually. For that you will need Google Play Store installed and your Google account configured, otherwise Synthesia complains it has no internet connection.


Synthesia installed

Evaluation version pop-up


Emteria settings

Disabling auto-update Goolge apps

Google Play

Synthesia unlock

Play demo

YouTube streaming

Raspberry Pi: How to debug Dart command line applications in IntelliJ

How to debug with gdb on command line – see Raspberry Pi: gdb debugging, command line.

How to debug with gdb in Eclipse – see Raspberry Pi: gdb debugging in Eclipse.

  • Ubuntu 18.04 LTS
  • IntelliJ IDEA Community 2018.3
  • Raspberry Pi 3 Model B

Create Dart Remote Debug configuration for your Dart application:

Ubuntu terminal

Copy your application and open an ssh session to Raspberry Pi :

$ scp -r dartapp/ pi@
$ ssh pi@
SSH session on Raspberry Pi
$ cd ~/dartapp
$ pub get
Resolving dependencies... (1.9s)
Got dependencies!
$ dart --enable-vm-service:5858/ --pause_isolates_on_start bin/main.dart 
Observatory listening on

Now you can start debugging your application in IntelliJ.

Ubuntu: How to reschedule mlocate

What is mlocate can be found here.

By default it is scheduled to execute daily – that might not meet your expectations what you computer should do when you power it on.

Here is how to reschedule it to execute weekly:

### In the terminal
sudo chmod -x /etc/cron.daily/mlocate
sudo cp /etc/cron.daily/mlocate /etc/cron.weekly/mlocate
sudo chmod +x /etc/cron.weekly/mlocate

This has been checked with Ubuntu 18.04 LTS.