weston设置

屏幕旋转180度方法

编辑 /etc/xdg/weston/weston.ini文件,增加如下语句

[output]
name=DSI-1
transform=180

其中name为你的显示屏名称,可以通过如下命令来查看显示屏名称:
在这里插入图片描述
card0-DSI-1 后面的 DSI-1 即为当前显示屏名称,修改后重启即可……

修改标题栏位置

具体配置为:取消状态工具栏 和 将背景图片置透明

vi /etc/xdg/weston/weston.ini

追加如下:

[shell]
panel-position=none
background-color=0x00FFFFFF

panel-position表示面板工具栏的位置,这里设置为none,表示没有该面板工具栏

background-color表示背景颜色,这里设置为0x00FFFFFF,表示完全透明,即没有该背景图

然后我们在开机启动时就不会再看到该weston的桌面而直接启动应用程序。

#无标题栏
panel-positon=none
#标题栏位于顶部
panel-positon=top                                     
#标题栏位于左侧
panel-positon=left
#标题栏位于底部
panel-positon=bottom                                    
#标题栏位于右侧
panel-positon=right

更加详细的配置weston.ini可参考相关手册
参考博客1
参考博客2

启动配置文件

#!/bin/sh
#
# Start linux launcher...
#

case "$1" in
  start)
		printf "Starting launcher: "
		export LC_ALL='zh_CN.utf8'
		export QT_QPA_PLATFORM=wayland

    	# music
    	/usr/bin/audioservice &

		# bt
		/usr/libexec/bluetooth/bluetoothd --compat &

		#for kmssink
		#export QT_GSTREAMER_WINDOW_VIDEOSINK=kmssink

		#for rkisp plugin
		export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/gstreamer-1.0

		#for waylandsink
		export QT_GSTREAMER_WINDOW_VIDEOSINK=waylandsink

		#for dual display with morror mode by default
		export WESTON_DRM_MIRROR=1
		export WESTON_DRM_KEEP_RATIO=1

		#for QLauncher wayland
		mkdir -p /tmp/.xdg &&  chmod 0700 /tmp/.xdg
		export XDG_RUNTIME_DIR=/tmp/.xdg
		weston --tty=2 --idle-time=0&
		sleep 1
		#/usr/local/QLauncher/QLauncher &
    //opt/opencv/bin/opencv &
		#for Carmachine wayland
		#/usr/bin/Carmachine -platform wayland -plugin EvdevTouch -plugin EvdevKeyboard &

	;;
  stop)
		killall QLauncher
		#killall CarMachine
		killall weston
		printf "stop finished"
        ;;
  *)
        echo "Usage: $0 {start|stop}"
        exit 1
        ;;
esac
exit 0

猜你喜欢

转载自blog.csdn.net/weixin_42892101/article/details/107696652