相关文章推荐
谦虚好学的消炎药  ·  chatgpt - ...·  7 月前    · 
谦虚好学的消炎药  ·  View topic - ...·  8 月前    · 
威武的香瓜  ·  [转]Entity Framework ...·  7 小时前    · 
https://www.mankier.com/5/weston.ini https://www.mankier.com/7/weston-drm http://manpages.org/westonini/5 weston的使用 https://blog.csdn.net/u012080932/article/details/114373675 weston设置 https://blog.csdn.net/weixin_42892101/article/details/107696652 https://www.mankier.com/7/xkeyboard-config

RK3399平台weston桌面

平台:RK3399
系统:Linux4.4+buildroot

/etc/init.d/S31weston 			//weston自启动程序
/etc/xdg/weston/weston.ini		//weston配置文件
/etc/profile.d/env.sh			//环境变量配置
/etc/init.d/S31weston 
#!/bin/sh
# Start linux launcher...
case "$1" in
  start)
                printf "Starting weston"
                source /etc/profile.d/env.sh
                weston -c /etc/xdg/weston/weston.ini --tty=2 --idle-time=0 --log=/var/log/weston.log &
  stop)
                killall weston
                printf "stop finished"
        echo "Usage: $0 {start|stop}"
        exit 1
exit 0
/etc/xdg/weston/weston.ini
[core]
# Boards could have not any input device, and only use
# removable input device like usb(keyboard, mouse).
#require-input=false
[shell]
panel-position=none
/etc/profile.d/env.sh 
#!/bin/sh 
export LC_ALL='zh_CN.utf8'
export QT_QPA_PLATFORM=wayland
#export WESTON_DRM_MIRROR=1
export WESTON_DRM_KEEP_RATIO=1
export QT_GSTREAMER_WINDOW_VIDEOSINK=waylandsink
mkdir -p /tmp/.xdg &&  chmod 0700 /tmp/.xdg
export XDG_RUNTIME_DIR=/tmp/.xdg
export PATH=$PATH:/usr/bin/cmd
export QT_QPA_GENERIC_PLUGINS=evdevkeyboard

weston配置文件解析

weston是可以从命令行和配置文件(weston.ini)这两部分获取配置信息的。

weston.ini文件的位置:

$XDG_CONFIG_HOME/weston.ini   (if $XDG_CONFIG_HOME is set)
$HOME/.config/weston.ini      (if $HOME is set)
weston/weston.ini in each
    $XDG_CONFIG_DIR           (if $XDG_CONFIG_DIRS is set)
/etc/xdg/weston/weston.ini    (if $XDG_CONFIG_DIRS is not set)

其中环境变量HOME是用户的主目录,XDG_CONFIG_HOME是用户特定的配置目录,XDG_CONFIG_DIRS是冒号“:”分隔的配置基目录列表,例如/etc/xdg-foo:/etc/xdg .

weston.ini文件的组成部分

weston.ini文件由多个部分(section)组成,可存在于任何顺序的,或者省略(使用默认配置)
section如下:

core           The core modules and options(核心部分用于选择启动合成器模块和常规选项。)
libinput       Input device configuration(libinput 部分用于在使用 libinput 输入设备后端时配置输入设备。 默认值由 libinput 确定,并根据对任何给定设备最合理的方式而有所不同。)
shell          Desktop customization(shell 部分用于自定义合成器。 某些键可能无法由不同的 shell 插件处理。)
launcher       Add launcher to the panel(可以有多个启动器部分,每个启动器一个。)
output         Output configuration(可以有多个输出部分,每个部分对应一个输出。 它目前仅被 drm 和 x11 后端识别。)
input-method   Onscreen keyboard input(设置屏幕键盘输入法(字符串)的路径。)
keyboard       Keyboard layouts(设置键盘格式等参数)
terminal       Terminal application options(包含 Weston 终端应用程序 (weston-terminal) 的设置。 它允许自定义命令行界面的字体和shell。)
xwayland       XWayland options(设置要运行的 xserver 的路径(字符串)。)
screen-share   Screen sharing options(设置命令以启动全屏shell服务器以进行屏幕共享(字符串)。)

旋转weston渲染的qt程序

配置output字段,添加显示设备的名称和旋转角度。
前面weston通过如下指令启动:

weston -c /etc/xdg/weston/weston.ini --tty=2 --idle-time=0 --log=/var/log/weston.log &

所以weston的启动log保存在/var/log/weston.log文件中,通过cat /var/log/weston.log | grep Output查看显示设备的名称:

[root@rk3399:/]# cat  /var/log/weston.log | grep Output
[06:35:51.270] Output repaint window is 15 ms maximum.
[06:35:51.510] Output DSI-1, (connector 91, crtc 83)

在weston.ini中添加如下配置即可旋转weston上跑的qt程序:

[output]
name=DSI-1
transform=90

经测试,触摸也跟着显示一起旋转了,猜测应该是weston的默认配置起了作用。

鼠标光标的显示和隐藏

root@ok5718-idk:~# ls /sys/class/drm/
card0/          card0-DPI-1/    card0-HDMI-A-1/ card1/          controlD64/     renderD128/     renderD129/     version
[root@rk3399:/]# ls /sys/class/drm/
card0-DSI-1/     card0/           renderD128/
card0-HDMI-A-1/  controlD64/      version
[output]      
name=HDMI-A-1 
virtualIndex=0
[output]      
name=DSI-1    
virtualIndex=1
                    weston参考文档:https://www.mankier.com/5/weston.ini#Screen-Share_Sectionhttps://www.mankier.com/7/weston-drmhttps://blog.csdn.net/u012080932/article/details/114373675https://blog.csdn.net/weixin_42892101/article/details/1076966525718root@ok5718-idk:~# 
Orbital是Wayland的合成器和外壳,使用Qt5和Weston。 该项目的目标是构建一个简单但灵活且外观漂亮的Wayland桌面。 它不是成熟的DE,而是X11世界中WM的类似物,例如Awesome或Fluxbox。
轨道取决于两件事:WestonQt5。由于它使用QtQuick 2绘制界面,所以它将使用OpenGL,因此建议使用合适的图形驱动程序,否则性能将不佳。 目前,Orbital需要从分支libweston取得补丁的weston。 您还需要QtWayland,它从5.4版本开始随Qt一起提供。 您不需要QtCompositor,平台插件就足够了。 还有一些可选的依赖项:当前,Orbital可以使用KDE Frameworks 5,ALSA和Logined中的Solid,但是如果没有它们,它也可以工作,从而失去了某些功能。 您可以通过向cmake传递一些选
				
文章目录获取源代码和编译参考:移植Qt应用程序已知问题获得帮助和报告问题 简 述: 翻译一篇关于和 wayland 有关的技术文章, 其英文标题为 Qt 5 on Wayland. Qt 5工具箱中的Wayland支持在Qt Platform Abstraction(QPA) Wayland插件中进行。构建和使用QtWayland的最低要求是Wayland(和Weston)1.0.0。 如果您还想构建qtwebkit浏览器,则最好遵循从git构建Qt 5的说明,该指南可生成更多内容。init-repo
Neon(ARM架构处理器扩展结构) Neon是适用于ARM Cortex-A系列处理器的一种128位SIMD(Single Instruction, Multiple Data,单指令、多数据)扩展结构。 FPU:(Float Point Unit,浮点运算单元) FPU是专用于浮点运算的处理器,以前的FPU是一种单独芯片,在486之后,英特尔把FPU集成在CPU之内。 -mfpu -mfloat-abi arm-linux-gcc -march=armv7-a -mfpu=neon -mfloat-ab
是的,OpenCV可以在Weston桌面上显示图像。在Weston环境下,您可以使用OpenCV自带的Highgui模块来显示图像,或者使用其他的显示库,比如GTK、Qt等。 使用Highgui模块显示图像的示例代码如下: ```c++ #include <opencv2/opencv.hpp> int main() cv::Mat image = cv::imread("test.png"); if (image.empty()) { std::cerr << "Failed to load image!" << std::endl; return -1; cv::namedWindow("Image", cv::WINDOW_AUTOSIZE); cv::imshow("Image", image); cv::waitKey(0); 在上面的示例中,我们使用`cv::imread`函数读取一张图像,然后使用`cv::namedWindow`函数创建一个窗口,并使用`cv::imshow`函数将图像显示在窗口中,最后使用`cv::waitKey`函数等待用户按下键盘上的任意键。 如果您想使用GTK或Qt等其他的显示库,在编译OpenCV时需要指定相关的选项。在使用这些库时,您需要创建一个窗口,并将图像绘制在窗口中,具体实现方式取决于您使用的库和编程语言。
yimuyilin: 用camke软件进行交叉编译,然后用控制台构建时,提示g++无法识别'-mfpu=vfpv3-d16,请问如何处理?是g++版本太低了吗/ ANDROID_ABI = armeabi-v7a ANDROID_NATIVE_API_LEVEL = 15 camke版本是3.22.1 NDK版本是R12 编译配置(1)——ARMv7,ARMv8(AArch64) 浮点配置等相关知识 yimuyilin: [code=plain] E:\OCCT\android-occt\androidbuild>mingw32-make [ 0%] Building CXX object src/TKernel/CMakeFiles/TKernel.dir/__/FSD/FSD_Base64.cxx.o g++.exe: error: unrecognized command line option '-mfloat-abi=softfp' g++.exe: error: unrecognized command line option '-mfpu=vfpv3-d16' g++.exe: error: unrecognized command line option '-mthumb'; did you mean '-mtbm'? mingw32-make[2]: *** [src\TKernel\CMakeFiles\TKernel.dir\build.make:75: src/TKernel/CMakeFiles/TKernel.dir/__/FSD/FSD_Base64.cxx.o] Error 1 mingw32-make[1]: *** [CMakeFiles\Makefile2:1015: src/TKernel/CMakeFiles/TKernel.dir/all] Error 2 mingw32-make: *** [Makefile:123: all] Error 2 Git仓库管理(1)——基本操作 CSDN-Ada助手: 哇, 你的文章质量真不错,值得学习!不过这么高质量的文章, 还值得进一步提升, 以下的改进点你可以参考下: (1)增加除了各种控件外,文章正文的字数;(2)提升标题与正文的相关性;(3)使用更多的站内链接。 网络服务(1)——uboot设置tftp 大佬如果下载了但是按回车退出不了怎么办啊 Ubuntu应用拓展(5)——Ubuntu18.04安装qtcharts(RK3399) 及时行乐: 你好 qmake显示找不到 怎么办?
 
推荐文章