Start With Raspberry pi
apt Mirror
reference: https://mirrors.tuna.tsinghua.edu.cn/help/raspbian/
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main non-free contrib deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main non-free contrib
deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ buster main ui
|
Virtual Keyboard
reference:https://www.cnblogs.com/little-kwy/p/9478961.html
sudo apt-get install matchbox-keyboard sudo apt-get install libmatchbox1 -y
|
sudo nano /usr/bin/toggle-matchbox-keyboard.sh
|
PID=`pidof matchbox-keyboard` if [ ! -e $PID ]; then killall matchbox-keyboard else matchbox-keyboard& fi
|
sudo nano /usr/share/applications/toggle-matchbox-keyboard.desktop
|
[Desktop Entry] Name=Toggle Matchbox Keyboard Comment=Toggle Matchbox Keyboard Exec=toggle-matchbox-keyboard.sh Type=Application Icon=matchbox-keyboard.png Categories=Panel;Utility;MB X-MB-INPUT-MECHANSIM=True
|
It’s failed and I don’t know why. But there is a keyboard for rasberrypi, so…
Screen Shot
sudo apt-get install scrot scrot test.png
scrot -s 0 0 100 100
scrot -d 10
|
Screen Record
sudo apt-get install vokoscreen vokoscreen
|
USB Camera
reference: https://blog.csdn.net/yjp19871013/article/details/80147803
Take a Photo
sudo apt-get install fswebcam fswebcam /dev/video0 ~/image.jpg
|
raspistill -o ugi.jpg -w 2560 -h 1440 -v
|
Stream image
sudo apt-get install luvcview luvcview -s 400x400
|
I got an error code after a lunached the command. The image poped out and crashed after about 1s.
luvcview: ../../src/xcb_io.c:165: dequeue_pending_request: 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.
自动免密码登录
sudo raspi-config 选择Boot Options Desktop / CLT console Autologin Text console int3 或者 Desktop Autologin Desktop GUI 桌面环境 finish reboot
|
开机任务
参考: yuanfujie
進入隱藏文件夾, 然後創建一個文件夾和文件, 做開機啓動腳本
cd ~/.config cd /home/pi/.config mkdir autostart cd autostart
sudo nano myapp.desktop
|
在nano
後黏貼代碼如下。重點在Exec=XXX
;
比如,我的需要執行的腳本路徑爲/home/pi/Blive
[Desktop Entry] Type=Application Exec=/home/pi/Blive Icon=ICON_PATH
|
親測有效
Enjoy~