由於語法渲染問題而影響閱讀體驗, 請移步博客閱讀~
本文GitPage地址

Start With Raspberry pi

apt Mirror

reference: https://mirrors.tuna.tsinghua.edu.cn/help/raspbian/

  1. ## 编辑 `/etc/apt/sources.list` 文件,删除原文件所有内容,用以下内容取代:
  2. deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main non-free contrib
  3. deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main non-free contrib
  4. ## 编辑 `/etc/apt/sources.list.d/raspi.list` 文件,删除原文件所有内容,用以下内容取代:
  5. deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ buster main ui

Virtual Keyboard

reference:https://www.cnblogs.com/little-kwy/p/9478961.html

  1. sudo apt-get install matchbox-keyboard
  2. sudo apt-get install libmatchbox1 -y
  1. sudo nano /usr/bin/toggle-matchbox-keyboard.sh
  1. ##!/bin/bash
  2. ##This script toggle the virtual keyboard
  3. PID=`pidof matchbox-keyboard`
  4. if [ ! -e $PID ]; then
  5. killall matchbox-keyboard
  6. else
  7. matchbox-keyboard&
  8. fi
  1. sudo nano /usr/share/applications/toggle-matchbox-keyboard.desktop
  1. [Desktop Entry]
  2. Name=Toggle Matchbox Keyboard
  3. Comment=Toggle Matchbox Keyboard
  4. Exec=toggle-matchbox-keyboard.sh
  5. Type=Application
  6. Icon=matchbox-keyboard.png
  7. Categories=Panel;Utility;MB
  8. X-MB-INPUT-MECHANSIM=True

It’s failed and I don’t know why. But there is a keyboard for rasberrypi, so…
Start With Raspberry pi - 图1

Screen Shot

  1. sudo apt-get install scrot
  2. scrot test.png
  3. ## screen shot for
  4. scrot -s 0 0 100 100
  5. ## Screen shot after 10s
  6. scrot -d 10

Screen Record

  1. sudo apt-get install vokoscreen
  2. vokoscreen

USB Camera

reference: https://blog.csdn.net/yjp19871013/article/details/80147803

Take a Photo

  1. sudo apt-get install fswebcam
  2. fswebcam /dev/video0 ~/image.jpg #/dev/vedio0 is the vedio
  1. raspistill -o ugi.jpg -w 2560 -h 1440 -v # -vf

Stream image

  1. sudo apt-get install luvcview
  2. luvcview -s 400x400

I got an error code after a lunached the command. The image poped out and crashed after about 1s.

  1. luvcview: ../../src/xcb_io.c:165: dequeue_pending_request:
  2. Assertion `!xcb_xlib_unknown_req_in_deq' failed.

But I find that once you launched your camera, you need to keep the camera moving for a while and so, it can run smoothly.

自动免密码登录

  1. ##https://blog.csdn.net/zexzex_/article/details/78490054
  2. sudo raspi-config
  3. 选择Boot Options
  4. Desktop / CLT
  5. console Autologin Text console int3 或者 Desktop Autologin Desktop GUI 桌面环境
  6. finish
  7. reboot

开机任务

参考: yuanfujie

進入隱藏文件夾, 然後創建一個文件夾和文件, 做開機啓動腳本

  1. cd ~/.config
  2. cd /home/pi/.config
  3. mkdir autostart
  4. cd autostart
  5. ## 創建自啓腳本
  6. sudo nano myapp.desktop

nano後黏貼代碼如下。重點在Exec=XXX;
比如,我的需要執行的腳本路徑爲/home/pi/Blive

  1. [Desktop Entry]
  2. Type=Application
  3. Exec=/home/pi/Blive
  4. Icon=ICON_PATH

親測有效

Enjoy~


Enjoy~

本文由Python腳本GitHub/語雀自動更新

由於語法渲染問題而影響閱讀體驗, 請移步博客閱讀~
本文GitPage地址

GitHub: Karobben
Blog:Karobben
BiliBili:史上最不正經的生物狗