論壇總覽 MP500系列微型電腦討論區 請教一下如何正確的安裝VNC Server套件 回覆至:請教一下如何正確的安裝VNC Server套件

#1512
Huang Jia-Bin
管理員
    @jb

    MP510-50 Ubuntu-mate VNC Server 和 Viewer 最新版自動安裝方法:

    $ nano VNC_server_viewer_install.sh
    
    #!/bin/bash
    if [ "$EUID" -ne 0 ]
      then echo "Please run as root"
      exit
    fi
    
    if [ ! -f /usr/lib/aarch64-linux-gnu/libbcm_host.so.0 ]
    then
      sudo ln -s /usr/lib/aarch64-linux-gnu/libbcm_host.so /usr/lib/aarch64-linux-gnu/libbcm_host.so.0
    fi
    if [ ! -f /usr/lib/aarch64-linux-gnu/libvcos.so.0 ]
    then
      sudo ln -s /usr/lib/aarch64-linux-gnu/libvcos.so /usr/lib/aarch64-linux-gnu/libvcos.so.0
    fi
    if [ ! -f /usr/lib/aarch64-linux-gnu/libvchiq_arm.so.0 ]
    then
      sudo ln -s /usr/lib/aarch64-linux-gnu/libvchiq_arm.so /usr/lib/aarch64-linux-gnu/libvchiq_arm.so.0
    fi
    
    cd /tmp
    echo "***** Begin to install VNC server ... *****"
    wget https://downloads.realvnc.com/download/file/vnc.files/VNC-Server-7.5.1-Linux-ARM64.deb
    sudo apt install -y /tmp/VNC-Server-7.5.1-Linux-ARM64.deb
    rm VNC-Server-7.5.1-Linux-ARM64.deb
    
    echo "***** Begin to install VNC viewer ... *****"
    wget https://downloads.realvnc.com/download/file/viewer.files/VNC-Viewer-7.5.1-Linux-ARM64.deb
    sudo apt install -y /tmp/VNC-Viewer-7.5.1-Linux-ARM64.deb
    rm VNC-Viewer-7.5.1-Linux-ARM64.deb
    
    echo "***** Installation completed. *****"
    

    然後將 VNC_server_viewer_install.sh 改成執行檔:

    $ chmod +x VNC_server_viewer_install.sh
    

    執行自動安裝 VNC server 和 viewer:

    $ sudo ./VNC_server_viewer_install.sh