weston参考文档:
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
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
;;
esac
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)
其中环境变量 H O M E 是 用 户 的 主 目 录 , HOME是用户的主目录, 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
shell Desktop customization
launcher Add launcher to the panel
output Output configuration
input-method Onscreen keyboard input
keyboard Keyboard layouts
terminal Terminal application options
xwayland XWayland options
screen-share Screen sharing options
旋转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查看显示设备的名称:
[[email protected]:/]# 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的默认配置起了作用。
鼠标光标的显示和隐藏
TBC
相关内容
5718
[email protected]:~# ls /sys/class/drm/
card0/ card0-DPI-1/ card0-HDMI-A-1/ card1/ controlD64/ renderD128/ renderD129/ version
3399
[[email protected]:/]# 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