设为首页收藏本站
查看: 523|回复: 1

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

[复制链接]

9

主题

15

回帖

161

积分

注册会员

积分
161
slamdunk 发表于 2023-9-11 10:37:34 | 显示全部楼层 |阅读模式
本帖最后由 slamdunk 于 2023-9-14 22:35 编辑

本文只编译非X11版本

1、VNC源码下载

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

2、配置环境变量

  1. source /opt/poky/3.1.20/environment-setup-aarch64-poky-linux
复制代码

确认一下交叉编译命令CC是否Okay
  1. aarch64-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指定最终的安装目录


  1. ./configure --host=arm-poky-linux --prefix=/home/yc/vnc -without-x
复制代码
4、编译

make &&make install

最终编译出来的x11vnc如下:

  1. $ tree
  2. .
  3. └── vnc
  4.     ├── bin
  5.     │   └── x11vnc
  6.     ├── include
  7.     │   └── rfb
  8.     │       ├── keysym.h
  9.     │       ├── rfbclient.h
  10.     │       ├── rfbconfig.h
  11.     │       ├── rfb.h
  12.     │       ├── rfbint.h
  13.     │       ├── rfbproto.h
  14.     │       └── rfbregion.h
  15.     ├── man
  16.     │   └── man1
  17.     │       └── x11vnc.1
  18.     └── share
  19.         ├── applications
  20.         │   └── x11vnc.desktop
  21.         └── x11vnc
  22.             └── classes
  23.                 ├── index.vnc
  24.                 ├── ssl
  25.                 │   ├── index.vnc
  26.                 │   ├── proxy.vnc
  27.                 │   ├── README
  28.                 │   ├── SignedUltraViewerSSL.jar
  29.                 │   ├── SignedVncViewer.jar
  30.                 │   ├── ss_vncviewer
  31.                 │   ├── ultrasigned.vnc
  32.                 │   ├── UltraViewerSSL.jar
  33.                 │   ├── ultra.vnc
  34.                 │   └── VncViewer.jar
  35.                 └── VncViewer.jar

  36. 11 directories, 22 files
复制代码

5、运行x11 vnc

板端作为VNC Server,PC作为VNC Viewer

通过网线连接PC和开发板

板端

  • 将上述编译出来的~/opt/vnc整个目录通过scp传输到板端
  • 配置板子的IP地址为192.168.1.1
  • 直接运行
  1. ./vnc_install/bin/x11vnc -rawfb /dev/fb0
复制代码
  1. root@myir-yg2lx:/home/test/test# ./vnc_install/bin/x11vnc -rawfb /dev/fb0
  2. ###############################################################
  3. #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
  4. #@                                                           @#
  5. #@  **  WARNING  **  WARNING  **  WARNING  **  WARNING  **   @#
  6. #@                                                           @#
  7. #@        YOU ARE RUNNING X11VNC WITHOUT A PASSWORD!!        @#
  8. #@                                                           @#
  9. #@  This means anyone with network access to this computer   @#
  10. #@  may be able to view and control your desktop.            @#
  11. #@                                                           @#
  12. #@ >>> If you did not mean to do this Press CTRL-C now!! <<< @#
  13. #@                                                           @#
  14. #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
  15. #@                                                           @#
  16. #@  You can create an x11vnc password file by running:       @#
  17. #@                                                           @#
  18. #@       x11vnc -storepasswd password /path/to/passfile      @#
  19. #@  or   x11vnc -storepasswd /path/to/passfile               @#
  20. #@  or   x11vnc -storepasswd                                 @#
  21. #@                                                           @#
  22. #@  (the last one will use ~/.vnc/passwd)                    @#
  23. #@                                                           @#
  24. #@  and then starting x11vnc via:                            @#
  25. #@                                                           @#
  26. #@      x11vnc -rfbauth /path/to/passfile                    @#
  27. #@                                                           @#
  28. #@  an existing ~/.vnc/passwd file from another VNC          @#
  29. #@  application will work fine too.                          @#
  30. #@                                                           @#
  31. #@  You can also use the -passwdfile or -passwd options.     @#
  32. #@  (note -passwd is unsafe if local users are not trusted)  @#
  33. #@                                                           @#
  34. #@  Make sure any -rfbauth and -passwdfile password files    @#
  35. #@  cannot be read by untrusted users.                       @#
  36. #@                                                           @#
  37. #@  Use x11vnc -usepw to automatically use your              @#
  38. #@  ~/.vnc/passwd or ~/.vnc/passwdfile password files.       @#
  39. #@  (and prompt you to create ~/.vnc/passwd if neither       @#
  40. #@  file exists.)  Under -usepw, x11vnc will exit if it      @#
  41. #@  cannot find a password to use.                           @#
  42. #@                                                           @#
  43. #@                                                           @#
  44. #@  Even with a password, the subsequent VNC traffic is      @#
  45. #@  sent in the clear.  Consider tunnelling via ssh(1):      @#
  46. #@                                                           @#
  47. #@    http://www.karlrunge.com/x11vnc/#tunnelling            @#
  48. #@                                                           @#
  49. #@  Or using the x11vnc SSL options: -ssl and -stunnel       @#
  50. #@                                                           @#
  51. #@  Please Read the documention for more info about          @#
  52. #@  passwords, security, and encryption.                     @#
  53. #@                                                           @#
  54. #@    http://www.karlrunge.com/x11vnc/faq.html#faq-passwd    @#
  55. #@                                                           @#
  56. #@  To disable this warning use the -nopw option, or put     @#
  57. #@  'nopw' on a line in your ~/.x11vncrc file.               @#
  58. #@                                                           @#
  59. #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
  60. ###[  270.940064] input: x11vnc injector as /devices/virtual/input/input4
  61. ############################################################
  62. 01/01/2066 00:04:27 x11vnc version: 0.9.14 lastmod: 2013-11-21  pid: 619
  63. 01/01/2066 00:04:27 Not opening DISPLAY in -rawfb mode (force via -rawfb +str)
  64. 01/01/2066 00:04:27 Continuing without X display in -rawfb mode.
  65. 01/01/2066 00:04:27 console_guess: file is /dev/fb0
  66. 01/01/2066 00:04:27 console_guess: file pipeinput UINPUT
  67. 01/01/2066 00:04:27 initialize_uinput: using: /dev/uinput 4
  68. 01/01/2066 00:04:27 console_guess returned: map:/dev/fb0@1920x1080x32:ff0000/ff00/ff
  69. 01/01/2066 00:04:27 raw fb is non-regular file: /dev/fb0
  70. 01/01/2066 00:04:27 rawfb: mmap file: /dev/fb0
  71. 01/01/2066 00:04:27    w: 1920 h: 1080 b: 32 addr: 0xffffa97bb000 sz: 8294400
  72. evdevmouse: Could not read from input device (No such device)
  73. evdevmouse: Could not read from input device (No such device)
  74. evdevkeyboard: Could not read from input device (No such device)
  75. evdevkeyboard: Could not read from input device (No such device)
  76. 01/01/2066 00:04[  271.145195] input: x11vnc injector as /devices/virtual/input/input5
  77. :27 initialize_uinput: using: /dev/uinput 4
  78. evdevkeyboard: Failed to query led states
  79. evdevkeyboard: Failed to query led states
  80. 01/01/2066 00:04:27 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/7680
  81. 01/01/2066 00:04:27
  82. 01/01/2066 00:04:27 Raw fb at addr 0xffffa97bb000 is 32bpp depth=24 true color
  83. 01/01/2066 00:04:27
  84. 01/01/2066 00:04:27 Autoprobing TCP port
  85. 01/01/2066 00:04:27 Autoprobing selected port 5900
  86. 01/01/2066 00:04:27 Listening also on IPv6 port 5900 (socket 6)
  87. 01/01/2066 00:04:28 fb read rate: 63 MB/sec
  88. 01/01/2066 00:04:28 screen setup finished.
  89. 01/01/2066 00:04:28
  90. 01/01/2066 00:04:28 WARNING: You are running x11vnc WITHOUT a password.  See
  91. 01/01/2066 00:04:28 WARNING: the warning message printed above for more info.
  92. 01/01/2066 00:04:28

  93. The VNC desktop is:      myir-yg2lx:0
  94. PORT=5900
复制代码


PC端

vnc0.png vnc.png

vnc1.png
vnc2.png



微信图片_20230910230926.jpg




vnc_install.zip (2.78 MB, 下载次数: 92)
回复

使用道具 举报

您需要登录后才可以回帖 登录

本版积分规则

Archiver|手机版|小黑屋|米尔科技论坛   

GMT+8, 2024-4-28 11:34 , Processed in 0.055026 second(s), 22 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表