pi4 start up

boot in lubuntu

in the pi home dir, there is a shell script to

  • start deepface docker
  • restart AgentDVR

pi4 2021-08 + ispyconnect

copy image to SD + apt update & apt upgrade then reboot

$ dd if=2021-05-07-raspios-buster-armhf.img of=/dev/sdc bs=4M conv=fsync status=progress

open ssh + install nomachine

custom.sh

alias l='ls -lhX --group-directories-first'
alias ssh='ssh -o ServerAliveInterval=100 -Y'
alias cp='cp --preserve=xattr'
# PATH
export PATH=$PATH:~/bin
# PROMPT
if [ "$EUID" == "0" ];
then
	export PSUSERCOL=1
else
	export PSUSERCOL=2
fi
export PS1="$(tput -Txterm-256color bold ; tput -Txterm-256color setaf $PSUSERCOL)### $(tput -Txterm-256color setaf 7)\d \A  $(tput -Txterm-256color setaf $PSUSERCOL)\u $(tput -Txterm-256color setaf 3)\H $(tput -Txterm-256color setaf 2)\w $(tput -Txterm-256color sgr0)\n\$ "

install & configure ispy in ~/ispyconnect https://www.ispyconnect.com/download.aspx

  • download dotnet aspnetcore-runtime-3.1.11-linux-arm.tar.gz
  • extract dotnet in dotnet subdir: mkdir dotnet && cd dotnet && tar xf aspnet…
  • download Agent_ARM32_3_5_2_0.zip
  • extract in ~/ispyconnect
  • ffmpeg and snapd not needed
  • sudo apt install -y libtbb-dev libc6-dev gss-ntlmssp libatlas-base-dev
  • sudo apt-get install -y libvlc-dev vlc libx11-dev
  • export DOTNET_ROOT=~/ispyconnect/dotnet
  • export PATH=$PATH:~/ispyconnect/dotnet
  • dotnet Agent.dll

working!

as a service, edit AgentDVR.service

[Unit]
Description=AgentDVR

[Service]
# see https://www.ispyconnect.com/userguide-agent-service.aspx for instructions
# systemd will run this executable to start the service. AGENT_LOCATION needs to be the absolute path
# DOT_NET_LOCATION should point to where the dotnet executable is - this might be different on your computer. 
# For Raspberry Pi YOUR_USERNAME is usually pi
#
# eg for Raspberry Pi:	ExecStart=/usr/share/dotnet/dotnet /home/pi/Desktop/Agent/Agent.dll
# eg for Linux:			ExecStart=/usr/bin/dotnet /home/sean/Desktop/Agent/Agent.dll

ExecStart=/home/pi/ispyconnect/dotnet/dotnet /home/pi/ispyconnect/Agent.dll

# to query logs using journalctl, set a logical name here
SyslogIdentifier=AgentDVR

# Use your username to keep things simple.
# If you pick a different user, make sure dotnet and all permissions are set correctly to run the app
# To update permissions, use 'chown YOUR_USERNAME -R AGENT_LOCATION' to take ownership of the folder and files

User=pi

# ensure the service automatically restarts
Restart=always
# amount of time to wait before restarting the service                        
RestartSec=5

[Install]
WantedBy=multi-user.target
  • sudo cp AgentDVR.service /etc/systemd/system/AgentDVR.service
  • sudo systemctl daemon-reload
  • sudo systemctl status AgentDVR
  • sudo systemctl start AgentDVR
  • sudo systemctl enable AgentDVR

pi3 2021-07

copy image to SD

$ dd if=2021-05-07-raspios-buster-armhf.img of=/dev/sdc bs=4M conv=fsync status=progress

pi4 2020-09

Downloaded piOS.

sshfs

@inagua: generate passwordless keys names pi4e.id_rsa

ssh-keygen -f pi4e.id_rsa

append pi4e.id_rsa.pub to pi@pi4e:.ssh/authorized_keys

scp .ssh/pi4e.id_rsa.pub pi@pi4e:.ssh/
ssh pi@pi4e cat .ssh/pi4e.id_rsa.pub >> .ssh/authorized_keys'

install raspbian https://www.raspberrypi.org/downloads/ start and small config (wifi, keyboard, ssh)

upgrade to pixel

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install -y rpi-chromium-mods
sudo apt-get install -y python-sense-emu python3-sense-emu python-sense-emu-doc

remmina & VNC server

@pi change server params: unix → vnc user, add admin user

sshfs automount

sudo apt-get install sshfs autofs

added to

/etc/auto.master
/sshfs /etc/auto.sshfs  uid=1000,gid=1000,--timeout=30,--ghost

created

/etc/auto.sshfs
pendejo -fstype=fuse,rw,nodev,nonempty,noatime,allow_other,max_read=65536 :sshfs\#user@server\:/path/to/

created public/private key on pi with no password, and copied private to root@pi

ssh-keygen -t rsa

added public key to user@server:.ssh/authorized_keys2

sudo systemctl restart autofs

debugging:

sudo service autofs stop
sudo automount -f -v

usb webcam

install motion

sudo apt-get install motion

edit /etc/motion/motion.conf:

daemon on
output_pictures off
ffmpeg_output_movies off
stream_quality 75
stream_localhost off
stream_authentication username:password
webcontrol_authentication username:password

redirect port 24/8080 26/8081

sudo systemctl restart motion
sudo systemctl status motion

various

sudo apt-get install iotop
sudo apt-get install iftop
sudo apt-get install sysstat