【MYS-6ULX-IoT试用体验】yocto x11vnc远程桌面 - 问答 - 电子技术论坛 - 最好最受欢迎电子论坛!

【MYS-6ULX-IoT试用体验】yocto x11vnc远程桌面

`最近试着搞搞远程桌面,需要配置conf文件。
  1. # i.MX DISTRO for X11 with no wayland

  2. include conf/distro/include/myir-imx-base.inc
  3. include conf/distro/include/myir-imx-preferred-env.inc

  4. DISTRO = "myir-imx-x11"

  5. # Remove conflicting backends.
  6. DISTRO_FEATURES_remove = "wayland"

  7. # These are X11 specific
  8. DISTRO_FEATURES_append = " x11"
复制代码
保存为myir-imx-x11.conf 存放在sourcesmeta-myir-imx6ulxconfdistro文件夹下。
然后
DISTRO=myir-imx-x11 MACHINE=mys6ull14x14 source fsl-setup-release.sh  

接下来修改local.conf文件
  1. MACHINE ??= 'mys6ull14x14'
  2. DISTRO ?= 'myir-imx-x11'
  3. PACKAGE_CLASSES ?= "package_rpm"
  4. EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
  5. USER_CLASSES ?= "buildstats image-mklibs"
  6. PATCHRESOLVE = "noop"
  7. BB_DISKMON_DIRS = "
  8.     STOPTASKS,${TMPDIR},1G,100K
  9.     STOPTASKS,${DL_DIR},1G,100K
  10.     STOPTASKS,${SSTATE_DIR},1G,100K
  11.     STOPTASKS,/tmp,100M,100K
  12.     ABORT,${TMPDIR},100M,1K
  13.     ABORT,${DL_DIR},100M,1K
  14.     ABORT,${SSTATE_DIR},100M,1K
  15.     ABORT,/tmp,10M,1K"
  16. PACKAGECONFIG_append_pn-qemu-native = " sdl"
  17. PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
  18. CONF_VERSION = "1"

  19. DL_DIR ?= "${BSPDIR}/downloads/"
  20. ACCEPT_FSL_EULA = "1"

  21. CORE_IMAGE_EXTRA_INSTALL += "openssh
  22.                                                         x11vnc"
复制代码
添加x11vnc。
截下来要添加一个补丁文件“remove-redundant-RPATH.patch”。
  1. From 7be055c13c7d0d640941830a3291af3b404928c1 Mon Sep 17 00:00:00 2001
  2. From: Hongxu Jia
  3. Date: Mon, 27 Jun 2016 04:44:14 -0400
  4. Subject: [PATCH] configure.ac: remove redundant RPATH

  5. It caused oe QA issue:
  6. ...
  7. |ERROR: QA Issue: x11vnc: work/i586-poky-linux/x11vnc/0.9.13-r0/packages-split/
  8. x11vnc/usr/bin/x11vnc contains probably-redundant RPATH /usr/lib [useless-rpaths]
  9. ...

  10. Upstream-Status: Inappropriate [oe specific]

  11. Signed-off-by: Hongxu Jia
  12. ---
  13. configure.ac | 21 +++++----------------
  14. 1 file changed, 5 insertions(+), 16 deletions(-)

  15. diff --git a/configure.ac b/configure.ac
  16. index 6f664d0..f986686 100644
  17. --- a/configure.ac
  18. +++ b/configure.ac
  19. [url=home.php?mod=space&uid=1999721]@@[/url] -330,10 +330,8 @@ if test "x$with_crypto" != "xno" -a "x$with_ssl" != "xno"; then
  20.                 saved_LDFLAGS="$LDFLAGS"
  21.                 CPPFLAGS="$CPPFLAGS -I$with_ssl/include"
  22.                 LDFLAGS="$LDFLAGS -L$with_ssl/lib"
  23. -                if test "x$ld_minus_R" = "xno"; then
  24. +                if test "x$ld_minus_R" = "xno" -o "x$GCC" = "xyes"; then
  25.                         :
  26. -                elif test "x$GCC" = "xyes"; then
  27. -                        LDFLAGS="$LDFLAGS -Xlinker -R$with_ssl/lib"
  28.                 else
  29.                         LDFLAGS="$LDFLAGS -R$with_ssl/lib"
  30.                 fi
  31. @@ -447,10 +445,8 @@ if test ! -z "$with_system_libvncserver" -a "x$with_system_libvncserver" != "xno
  32.         fi
  33.         if test "x$with_system_libvncserver" != "xyes"; then
  34.                 rflag=""
  35. -                if test "x$ld_minus_R" = "xno"; then
  36. +                if test "x$ld_minus_R" = "xno" -o "x$GCC" = "xyes"; then
  37.                         :
  38. -                elif test "x$GCC" = "xyes"; then
  39. -                        rflag="-Xlinker -R$with_system_libvncserver/lib"
  40.                 else
  41.                         rflag="-R$with_system_libvncserver/lib"
  42.                 fi
  43. @@ -484,10 +480,8 @@ new enough.
  44.         elif libvncserver-config --version 1>/dev/null 2>&1; then
  45.                 rflag=""
  46.                 rprefix=`libvncserver-config --prefix`
  47. -                if test "x$ld_minus_R" = "xno"; then
  48. +                if test "x$ld_minus_R" = "xno" -o "x$GCC" = "xyes"; then
  49.                         :
  50. -                elif test "x$GCC" = "xyes"; then
  51. -                        rflag=" -Xlinker -R$rprefix/lib "
  52.                 else
  53.                         rflag=" -R$rprefix/lib "
  54.                 fi
  55. @@ -541,11 +535,8 @@ if test "x$with_jpeg" != "xno"; then
  56.                 saved_LDFLAGS="$LDFLAGS"
  57.                 CPPFLAGS="$CPPFLAGS -I$with_jpeg/include"
  58.                 LDFLAGS="$LDFLAGS -L$with_jpeg/lib"
  59. -                if test "x$ld_minus_R" = "xno"; then
  60. +                if test "x$ld_minus_R" = "xno" -o "x$GCC" = "xyes"; then
  61.                         :
  62. -                elif test "x$GCC" = "xyes"; then
  63. -                        # this is not complete... in general a rat's nest.
  64. -                        LDFLAGS="$LDFLAGS -Xlinker -R$with_jpeg/lib"
  65.                 else
  66.                         LDFLAGS="$LDFLAGS -R$with_jpeg/lib"
  67.                 fi
  68. @@ -590,10 +581,8 @@ if test "x$with_zlib" != "xno" -a "x$with_libz" != "xno"; then
  69.                 saved_LDFLAGS="$LDFLAGS"
  70.                 CPPFLAGS="$CPPFLAGS -I$with_zlib/include"
  71.                 LDFLAGS="$LDFLAGS -L$with_zlib/lib"
  72. -                if test "x$ld_minus_R" = "xno"; then
  73. +                if test "x$ld_minus_R" = "xno" -o "x$GCC" = "xyes"; then
  74.                         :
  75. -                elif test "x$GCC" = "xyes"; then
  76. -                        LDFLAGS="$LDFLAGS -Xlinker -R$with_zlib/lib"
  77.                 else
  78.                         LDFLAGS="$LDFLAGS -R$with_zlib/lib"
  79.                 fi
  80. --
  81. 2.8.1

复制代码
然后存放在sourcesmeta-openembeddedmeta-oe
ecipes-graphicsx11vncfiles
修改x11vnc_0.9.13.bb文件
  1. SUMMARY = "Exports your X session on-the-fly via VNC"
  2. HOMEPAGE = "http://www.karlrunge.com/x11vnc/"

  3. SECTION = "x11/utils"
  4. AUTHOR = "Karl Runge"
  5. LICENSE = "GPLv2+"
  6. LIC_FILES_CHKSUM = "file://COPYING;md5=361b6b837cad26c6900a926b62aada5f
  7.                     file://x11vnc/x11vnc.h;endline=33;md5=6f95dc6535467d7ee1563fd434fb372e"

  8. SRC_URI = "${SOURCEFORGE_MIRROR}/libvncserver/x11vnc/${PV}/x11vnc-${PV}.tar.gz
  9.            file://starting-fix.patch
  10.            file://endian-fix.patch
  11.            file://remove-redundant-RPATH.patch "

  12. SRC_URI[md5sum] = "a372ec4fe8211221547b1c108cf56e4c"
  13. SRC_URI[sha256sum] = "f6829f2e629667a5284de62b080b13126a0736499fe47cdb447aedb07a59f13b"

  14. DEPENDS = "openssl virtual/libx11 libxext jpeg zlib libxfixes libxrandr libxdamage libxtst libtasn1 p11-kit"

  15. inherit autotools-brokensep distro_features_check
  16. # depends on virtual/libx11
  17. REQUIRED_DISTRO_FEATURES = "x11"

  18. PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} libvncserver"
  19. PACKAGECONFIG[avahi] = "--with-avahi,--without-avahi,avahi"
  20. PACKAGECONFIG[xinerama] = "--with-xinerama,--without-xinerama,libxinerama"
  21. PACKAGECONFIG[libvncserver] = "--with-system-libvncserver,--without-system-libvncserver,libvncserver"

  22. do_prepare_sources () {
  23.     # Remove old libtool macros from acinclude.m4
  24.     sed -i -e '/^# libtool.m4/q' ${S}/acinclude.m4
  25. }
  26. do_patch[postfuncs] += "do_prepare_sources"
复制代码
修改如下:
SRC_URI = "${SOURCEFORGE_MIRROR}/libvncserver/x11vnc/${PV}/x11vnc-${PV}.tar.gz
file://starting-fix.patch
file://endian-fix.patch
file://remove-redundant-RPATH.patch "
添加:file://remove-redundant-RPATH.patch
接下来就可以正常编译了!!
最后说说如何启动vnc
设置密码:x11vnc -storepasswd
启动:x11vnc -display :0 -auth /var/run/lightdm/root/:0 -forever -bg -o /var/log/x11vnc.log -rfbauth .vnc/passwd -rfbport 5900
启动.vnc/passwd是设置密码时生成的文件。
最后附上效果图:


`

0个回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则


关闭

站长推荐上一条 /6 下一条

小黑屋|手机版|Archiver|电子发烧友 ( 湘ICP备2023018690号 )

GMT+8, 2024-11-26 08:24 , Processed in 0.701584 second(s), Total 70, Slave 49 queries .

Powered by 电子发烧友网

© 2015 bbs.elecfans.com

微信扫描
快速回复 返回顶部 返回列表