RK3399上挂机Minecraft

换源

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

sudo vim /etc/apt/sources.list

:%s/ports.ubuntu.com/mirrors.ustc.edu.cn/g

:wq

sudo apt update && sudo apt upgrade -y

安装vnc

sudo apt install vnc4server -y

上传MC

安装jdk和jfx

sudo apt install openjdk-11-jdk openjfx -y

写脚本

cd mc

touch start_vnc_for_mc.sh

echo '#!/bin/bash' >> start_vnc_for_mc.sh

echo 'vnc4server -geometry 1440x900 :1' >> start_vnc_for_mc.sh

chmod +x start_vnc_for_mc.sh

 

touch stop_vnc_for_mc.sh

echo '#!/bin/bash' >> stop_vnc_for_mc.sh

echo 'vnc4server -geometry 1440x900 :1' >> stop_vnc_for_mc.sh

chmod +x stop_vnc_for_mc.sh

 

touch launch.sh

echo '#!/bin/bash' >> launch.sh

echo 'java --module-path /usr/share/javafx/lib --add-modules javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web -jar HMCL*.jar' >> launch.sh

然后就可以在ssh中执行start_vnc_for_mc.sh后打开vnc了

 

你可能感兴趣的:(开发板应用)