slamdunk 发表于 2023-9-11 10:37:34

【米尔瑞萨RZ/G2L开发板-创新应用】显示系统添加VNC远程桌面

本帖最后由 slamdunk 于 2023-9-14 22:35 编辑

本文只编译非X11版本

1、VNC源码下载

X11VNC源码下载地址:
http://x11vnc.sourceforge.net/dev/x11vnc-0.9.14-dev.tar.gz
解压后,进入源码目录

2、配置环境变量

source /opt/poky/3.1.20/environment-setup-aarch64-poky-linux
确认一下交叉编译命令CC是否Okayaarch64-poky-linux-gcc -mtune=cortex-a55 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/poky/3.1.20/sysroots/aarch64-poky-linux


3、配置X11 vnc
切换到x11vnc解压出来的目录
cd x11vnc-0.9.14-dev/x11vnc-0.9.14
--host参数指定交叉编译
--prefix指定最终的安装目录

./configure --host=arm-poky-linux --prefix=/home/yc/vnc -without-x4、编译
make &&make install
最终编译出来的x11vnc如下:
$ tree
.
└── vnc
    ├── bin
    │   └── x11vnc
    ├── include
    │   └── rfb
    │       ├── keysym.h
    │       ├── rfbclient.h
    │       ├── rfbconfig.h
    │       ├── rfb.h
    │       ├── rfbint.h
    │       ├── rfbproto.h
    │       └── rfbregion.h
    ├── man
    │   └── man1
    │       └── x11vnc.1
    └── share
      ├── applications
      │   └── x11vnc.desktop
      └── x11vnc
            └── classes
                ├── index.vnc
                ├── ssl
                │   ├── index.vnc
                │   ├── proxy.vnc
                │   ├── README
                │   ├── SignedUltraViewerSSL.jar
                │   ├── SignedVncViewer.jar
                │   ├── ss_vncviewer
                │   ├── ultrasigned.vnc
                │   ├── UltraViewerSSL.jar
                │   ├── ultra.vnc
                │   └── VncViewer.jar
                └── VncViewer.jar

11 directories, 22 files
5、运行x11 vnc
板端作为VNC Server,PC作为VNC Viewer
通过网线连接PC和开发板
板端

[*]将上述编译出来的~/opt/vnc整个目录通过scp传输到板端
[*]配置板子的IP地址为192.168.1.1
[*]直接运行
./vnc_install/bin/x11vnc -rawfb /dev/fb0
root@myir-yg2lx:/home/test/test# ./vnc_install/bin/x11vnc -rawfb /dev/fb0
###############################################################
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
#@                                                         @#
#@**WARNING**WARNING**WARNING**WARNING**   @#
#@                                                         @#
#@      YOU ARE RUNNING X11VNC WITHOUT A PASSWORD!!      @#
#@                                                         @#
#@This means anyone with network access to this computer   @#
#@may be able to view and control your desktop.            @#
#@                                                         @#
#@ >>> If you did not mean to do this Press CTRL-C now!! <<< @#
#@                                                         @#
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
#@                                                         @#
#@You can create an x11vnc password file by running:       @#
#@                                                         @#
#@       x11vnc -storepasswd password /path/to/passfile      @#
#@or   x11vnc -storepasswd /path/to/passfile               @#
#@or   x11vnc -storepasswd                                 @#
#@                                                         @#
#@(the last one will use ~/.vnc/passwd)                  @#
#@                                                         @#
#@and then starting x11vnc via:                            @#
#@                                                         @#
#@      x11vnc -rfbauth /path/to/passfile                  @#
#@                                                         @#
#@an existing ~/.vnc/passwd file from another VNC          @#
#@application will work fine too.                        @#
#@                                                         @#
#@You can also use the -passwdfile or -passwd options.   @#
#@(note -passwd is unsafe if local users are not trusted)@#
#@                                                         @#
#@Make sure any -rfbauth and -passwdfile password files    @#
#@cannot be read by untrusted users.                     @#
#@                                                         @#
#@Use x11vnc -usepw to automatically use your            @#
#@~/.vnc/passwd or ~/.vnc/passwdfile password files.       @#
#@(and prompt you to create ~/.vnc/passwd if neither       @#
#@file exists.)Under -usepw, x11vnc will exit if it      @#
#@cannot find a password to use.                           @#
#@                                                         @#
#@                                                         @#
#@Even with a password, the subsequent VNC traffic is      @#
#@sent in the clear.Consider tunnelling via ssh(1):      @#
#@                                                         @#
#@    http://www.karlrunge.com/x11vnc/#tunnelling            @#
#@                                                         @#
#@Or using the x11vnc SSL options: -ssl and -stunnel       @#
#@                                                         @#
#@Please Read the documention for more info about          @#
#@passwords, security, and encryption.                     @#
#@                                                         @#
#@    http://www.karlrunge.com/x11vnc/faq.html#faq-passwd    @#
#@                                                         @#
#@To disable this warning use the -nopw option, or put   @#
#@'nopw' on a line in your ~/.x11vncrc file.               @#
#@                                                         @#
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
### input: x11vnc injector as /devices/virtual/input/input4
############################################################
01/01/2066 00:04:27 x11vnc version: 0.9.14 lastmod: 2013-11-21pid: 619
01/01/2066 00:04:27 Not opening DISPLAY in -rawfb mode (force via -rawfb +str)
01/01/2066 00:04:27 Continuing without X display in -rawfb mode.
01/01/2066 00:04:27 console_guess: file is /dev/fb0
01/01/2066 00:04:27 console_guess: file pipeinput UINPUT
01/01/2066 00:04:27 initialize_uinput: using: /dev/uinput 4
01/01/2066 00:04:27 console_guess returned: map:/dev/fb0@1920x1080x32:ff0000/ff00/ff
01/01/2066 00:04:27 raw fb is non-regular file: /dev/fb0
01/01/2066 00:04:27 rawfb: mmap file: /dev/fb0
01/01/2066 00:04:27    w: 1920 h: 1080 b: 32 addr: 0xffffa97bb000 sz: 8294400
evdevmouse: Could not read from input device (No such device)
evdevmouse: Could not read from input device (No such device)
evdevkeyboard: Could not read from input device (No such device)
evdevkeyboard: Could not read from input device (No such device)
01/01/2066 00:04 input: x11vnc injector as /devices/virtual/input/input5
:27 initialize_uinput: using: /dev/uinput 4
evdevkeyboard: Failed to query led states
evdevkeyboard: Failed to query led states
01/01/2066 00:04:27 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/7680
01/01/2066 00:04:27
01/01/2066 00:04:27 Raw fb at addr 0xffffa97bb000 is 32bpp depth=24 true color
01/01/2066 00:04:27
01/01/2066 00:04:27 Autoprobing TCP port
01/01/2066 00:04:27 Autoprobing selected port 5900
01/01/2066 00:04:27 Listening also on IPv6 port 5900 (socket 6)
01/01/2066 00:04:28 fb read rate: 63 MB/sec
01/01/2066 00:04:28 screen setup finished.
01/01/2066 00:04:28
01/01/2066 00:04:28 WARNING: You are running x11vnc WITHOUT a password.See
01/01/2066 00:04:28 WARNING: the warning message printed above for more info.
01/01/2066 00:04:28

The VNC desktop is:      myir-yg2lx:0
PORT=5900

PC端

[*]PC端安装好VNC viewer工具(下载链接 https://www.realvnc.com/en/connect/download/vnc/)
[*]配置PC的IP地址为192.168.11.2
[*]设置好需要连接的远端桌面的IP(板端)1920.168.1.1











ILoveTec 发表于 2024-3-1 09:31:35

消灭0回复
页: [1]
查看完整版本: 【米尔瑞萨RZ/G2L开发板-创新应用】显示系统添加VNC远程桌面