Signal-cli on N900/maemo

How can i run signal-cli on my n900. Here it is…

First download ejdk-8u211-linux-arm-sflt.tar.gz from https://www.oracle.com/java/technologies/javase-embedded-downloads.html and extract to /opt/java.

tar zxvf  ejdk-8u211-linux-arm-sflt.tar.gz

Secound uncommand this line in lib/security/java.security:

 #crypto.policy=unlimited 

Third link bin/java to /usr/bin

ln -s /opt/java/..../bin/java /usr/bin/java

Fourth download latest version from https://github.com/AsamK/signal-cli/releases/latest and extract it to /opt/signal

tar  zxvf signal-cli-0.6.4.tar.gz

Libreelec dual boot…

Now i want to describe, how to created dual boot on my media-box to run libreelec AND xubuntu. First i always install xubuntu on any computer i setup – always the same partition schema.

  1. Partition is 8GB and labeled SYSTEM
  2. Partition is 8GB and labeled SYSTEM2
  3. Partition is 8GB and labeled SWAP
  4. Partition is REST and labeled STORAGE

On the first 2 partitions i normaly install xubuntu, but i want to change the first to hold the image for libreelec. Boot into SYSTEM2 and download the latest Libreelec…img.gz. Than reformated the first partition as FAT32 and copy the image.

# gzip -d LibreELEC-Generic.x86_64-9.0.1.img.gz
# mkdir /tmp/le1; mount -v -o offset=4194304 -t vfat LibreELEC-Generic.x86_64-9.0.1.img /tmp/le1
# mkfs.fat -F32 -v -I -n 'SYSTEM ' /dev/sda1
# mkdir /libreelec; mount /dev/sda1 /libreelec
# cp -a /tmp/le1/* /libreelec/.

Now create a new grub-boot-option, to boot SYSTEM partition. Therefor create the file: /etc/grub.d/40_libreelec and run the command #update-grub

menuentry "LibreELEC" {
search --set=root --label SYSTEM --hint hd0,msdos3
linux /KERNEL boot=LABEL=SYSTEM disk=LABEL=STORAGE quiet
}
menuentry "LibreELEC debugging" {
search --set=root --label SYSTEM --hint hd0,msdos3
linux /KERNEL boot=LABEL=SYSTEM disk=LABEL=STORAGE debugging
}

The basic configuration on STORAGE is automaticaly created on first boot…

Libreelec network usage

I have troubles with the wlan connection of my media box. I have tried all buffer settings i found, but nothing helps. To find the reason, i came up, that there is no way to check network troughput in libreelec. So i decided to make a script which will do this….

#!/bin/sh
IF=$1;IF=${IF:=wlan0};SD=3;let K=1024*$SD
STAT () { awk -v IF=$1: '$0~IF { print ($1,$2,$10) }' < /proc/net/dev; }
USED () { awk -v K=$K '{T[NR]=($2+$3)/K}END{print $0,int(T[2]-T[1])}'; }
GRAF () { awk '{S="**********";print $0,substr(S S S S S S,1,$4/10)}'; }
echo -e "IF\tRX/TX-Bytes\tUSED-kB/s"
OT="STAT $IF" && sleep $SD
while (true);do
ST="STAT $IF"
echo -e "$OT\n$ST" | USED | GRAF
OT=$ST && sleep $SD
done

My ultimate mediabox

I resently got a small HTPC – a Fujitsu Esprimo Q9000 – and desided to build a ultimate mediabox with this hardware. What should the box be able to do:

  • play DVDs and audio CDs with the slot-in drive
  • send SOUND to any bluetooth SPEAKER or headset
  • display OUTPUT on the device directly or on a BEAMER
  • show and play ANY media as FILE (mp3,mkv,mp4,…)
  • control all software with a singe REMOTE CONTOL
  • get live stream from any TV or RADIO station
  • setup video and audio from AMAZON and NETFLIX
  • stream series and movies from any source (bs.to,youtube,…)
  • alternate use the device a normal linux computer (dual boot)

Interessted? Stay tuned to read how this works…

Libreelec BT autoconnect

I finaly configured my PC in dual boot with XUBUNTU 18.04 and LIBRELEC 9. But it was annoying that i have to reconnect my bluetooth speaker in Libreelec each time i start it. So i made a autoconnect script. Copy this code to /storage/.config/autostart.sh and change whatever your BT device ID is. Find out with “bluetoothctl devices“…

#!/bin/bash
( bluetoothctl scan on &
for i in 7 6 5 4 3 2 1;do
BTD=bluetoothctl paired-devices
Device A4:77:58:12:6F:7C Anker SoundCore
Device FC:58:FA:AA:27:A9 Areal Bar 350
for ID in A4:77:58:12:6F:7C FC:58:FA:AA:27:A9;do
if [ "echo $BTD|grep $ID" ];then
[ "bluetoothctl info $ID|grep 'Connected: yes'" ] || bluetoothctl connect $ID
fi
done
sleep $i
done
pkill bluetoothctl ) &