分类 pocketchip 下的文章

sudo apt-get install cmake
sudo apt-get install libx11-dev

git clone https://github.com/ptitSeb/gl4es.git

cd gl4es
mkdir build
cd build
cmake .. -DCHIP=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j2

cd lib/
sudo mv libGL.so.1 /usr/lib/arm-linux-gnueabihf/libGL.so.1.2.0

如果之前安装了xf86-video-fbturbo 请先禁用
sudo nano /etc/X11/xorg.conf

#Section "Device"
#        Identifier      "Allwinner A10/A13 FBDEV"
#        Driver          "fbturbo"
#        Option          "fbdev" "/dev/fb0" 
#        Option          "SwapbuffersWait" "true"
#EndSection

然后重启

sudo apt-get install mesa-utils
glxgears

如果是GUI版会看到下图,如果是home版可能看不到齿轮,因为窗口太大……
TIM图片20200414151753.jpg

相关地址
https://github.com/ptitSeb/gl4es
https://forum.armbian.com/topic/1420-opengl-on-mali-gpu-bananapi-orangepi-pc-etc/

安装tightvncserver
sudo apt install tightvncserver
启动
vncserver :1
设置远程访问密码
修改密码
vncpasswd

用vnc登录 ip:1

关闭VNC服务
vncserver -kill :1

先备份xstartup原始文件,再编辑
sudo mv -v .vnc/xstartup .vnc/xstartup.backup
sudo nano ~/.vnc/xstartup

#!/bin/sh
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
 
exec /etc/X11/xinit/xinitrc
 
xfce4-panel &
xfsettingsd &
xfwm4 &
xfdesktop &
pcmanfm &
xfce4-terminal &
 
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
 
startxfce4 &

更改配置文件的权限:
sudo chmod +x ~/.vnc/xstartup

我这边装的桌面是 xfce4

开机自动启动
sudo nano /etc/systemd/system/vncserver@.service

[Unit]
Description=Start TightVNC server at startup
After=syslog.target network.target

[Service]
Type=simple
User=chip
PAMName=login
PIDFile=/home/%u/.vnc/%H%i.pid
ExecStart=/usr/bin/vncserver -depth 24 -geometry 1024x768 %i

[Install]
WantedBy=multi-user.target 

sudo systemctl daemon-reload
sudo systemctl enable vncserver@:1.service

关闭
vncserver -kill :1

启动
sudo systemctl start vncserver@:1.service

最后重启
sudo reboot

安装NES模拟器fceux
sudo apt install fceux
fceux

安装Doom
sudo apt install prboom doom-wad-shareware
多人
prboom-game-server
prboom -net 172.20.0.1
单机
prboom

Gmu音乐播放器(我没整明白)
https://github.com/NeoTheFox/gmu-chip.git
https://wej.k.vu/projects/gmu/

命令行播放音乐(mp3不卡顿)
sudo apt-get install sox libsox-fmt-all
chip@chip:~/Music$ play 灰澈 - 森林.mp3
play *mp3 播放当前文件夹的所有mp3
Ctrl+C 下一曲

GUI版系统电量显示
先安装xfce4-genmon-plugin
sudo apt-get install xfce4-genmon-plugin
https://github.com/editkid/chip-battery-status

GUI版系统亮度调整
sudo apt-get install xfce4-power-manager-plugins

DOSBox
sudo apt-get install -y dosbox
sudo wget -O ~/.dosbox/dosbox-0.74.conf https://ganghood.net.cn/dosbox-0.74.conf
sudo nano /home/chip/.dosbox/dosbox-0.74.conf
这个配置文件的倒数第二行是DOSBox的C盘挂载路径
比如
MOUNT C /home/chip/Documents/DOSBox
C:
Install Price of Persia
wget http://www.bestoldgames.net/download/bgames/prince-of-persia.zip
unzip prince-of-persia.zip
Install Golden Axe
wget http://www.bestoldgames.net/download/bgames/wolfenstein-3d.zip
unzip wolfenstein-3d.zip
Install Wolfenstein 3D
wget http://www.bestoldgames.net/download/bgames/golden-axe.zip
unzip golden-axe.zip

通过命令行连接wifi(双引号不能少)
sudo nmcli d wifi connect "wifi名" password "wifi密码" wlan0

键盘功能键
wget -O /home/chip/.Xmodmap http://www.ganghood.net.cn/chip/.Xmodmap
wget -O /home/chip/.xinitrc http://www.ganghood.net.cn/chip/.xinitrc

安装文泉驿正黑、文泉驿微米黑字体
sudo apt-get install ttf-wqy-zenhei

安装locales软件包
sudo apt-get install locales

配置locales软件包
sudo dpkg-reconfigure locales

界面中钩选上“zh_CN.UTF-8”
TIM截图20191019120713.jpg
空格键选择 回车确认

默认的区域选“zh_CN.UTF-8”
TIM截图201910191207132.jpg

安装中文输入法
sudo apt-get install scim-pinyin

安装屏幕校准
sudo apt-get install xinput-calibrator
执行
xinput_calibrator
出现
Section "InputClass"
Identifier "calibration"
MatchProduct "1c25000.rtp"
Option "Calibration" "3980 226 3564 343"
Option "SwapAxes" "0"
EndSection

在终端内输入:sudo nano /etc/X11/xorg.conf
将上面的6行触摸相关的添加到这个conf里,或者只改那四个数字
按ctrl+o保存 ctrl+x 退出

最后重启
sudo reboot