10:11, Lukas

It seems that I lost some notes. I will investigate this, because they describe how I installed Alpine Linux in the end, and actually include some important commands. It works now!

Important for now:

usr: (redacted) pwd: (redacted)

Today I am trying to get the little display working.

To start with, I am creating a user though. For this we use

# adduser [-g "<Full Name>"] <username>

I went with

(redacted)

This creates a /home folder. We need to make sure it's persistant, meaning the changes in this folder need to be saved to the SD card when we commit. We can just include the /home directory in the lbu backup for this. We do this with:

# lbu include /home
# lbu commit

We can double check if this worked by rebooting and seeing if the folder with our username still exists after rebooting. After reboot we can log directly into that user.

I also installed sudo, to be able to use it from that user account, and gave it rights with:

# apk add sudo
# NEWUSER='yourUserName'
# echo "$NEWUSER ALL=(ALL) ALL" > /etc/sudoers.d/$NEWUSER && chmod 0440 /etc/sudoers.d/$NEWUSER
# lbu commit

Lastly, we need to install git

# apk install git

From now on we will work in the (redacted) user. There are instructions at http://www.lcdwiki.com/3.5inch_RPi_Display but they don't work for alpine linux. Instead, I first install xorg and manually install endev-input, because the setup scripts try to install those with apt-get, which is ubuntu etc, while we need to use apk.

setup-xorg-base
apk add xf86-input-endev

Now we download the script:

wget http://www.lcdwiki.com/res/MHS3528/kali-linux/LCD-show.tar.gz

we put it into whatever folder we want (i made one called driver), and extract it, and make the script executable

tar -xvzf LCD-show.tar.gz
chmod -R 755 LCD-show
cd LCD-show/

Now we have to open the script with nano, and remove the last line which wants to reboot, because of course we need to save the changes we make first. Also, we need to change the shebang from bash to sh, or install bash. I chose to change it to sh. I used nano for this:

nano MHS35-show

14:33, Lukas

It didn't work. I admitted defeat. And installed Raspbian. Instructions for this are here: https://www.raspberrypi.com/documentation/computers/getting-started.html. It's very easy, and worked straight away. For now I set it to run on the HDMI port again using the guide here: https://www.waveshare.com/wiki/3.5inch_RPiLCD(A)

cd LCD-show/
 ./LCD-hdmi

afterwards we can toggle back with

 ./LCD35-show

16:26, Lukas

I started building a script that automatically will play videos from a folder over and over once it's run. I plan to run it every hour or so.

sudo apt-get install vlc

I created a directory in the Documents folder with a script file and a folder for the videos:

mkdir videoscript
cd videoscript
touch videoscript.sh
mkdir files

The script I wrote is:

#!/bin/bash

# close all instances of vlc
killall -SIGTERM vlc

# get all the video files in the folder, make into one list
MP4=$(find . -iname '*.mp4')

# run  the vlc command with repeat (L) and on shuffle (Z)
vlc -ZL --fullscreen $MP4 &