使用gstlaunch调用外部进程时,窗口的位置很不固定,使用如下方法修改
进入Buildroot的配置目录,该目录默认位于output/build/buildroot-xxxxxx(xxxxxx为Buildroot版本号)。
找到名为BR2_PACKAGE_XORG7的选项,该选项用于构建Xorg服务器和X11应用程序。如果Buildroot配置中没有此选项,则需要通过make menuconfig或make xconfig等命令重新配置Buildroot以启用它。
找到名为BR2_XORG7_CONFIG的选项,该选项用于指定构建Xorg服务器时使用的配置文件。将该选项设置为/etc/X11/xorg.conf.d/10-monitor.conf。
进入您指定的Xorg配置文件所在的目录,该目录应为/etc/X11/xorg.conf.d。
创建一个名为10-monitor.conf的新文件,并将以下内容复制到文件中:
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
EndSection
Section "Device"
Identifier "Configured Video Device"
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
DefaultDepth 24
Option "Position" "0 0" # 将此处修改为您想要的位置
EndSection
Section "Monitor"
Identifier "Configured Monitor"
EndSection
将文件中的“Option”行中的“Position”值更改为希望窗口出现的位置。例如,如果希望窗口出现在屏幕左上角,则将其更改为“0 0”。
将新文件复制到Buildroot文件系统镜像中。可以通过make命令编译Buildroot,并在完成后在输出目录(output/images/)中找到生成的文件系统镜像。
将文件系统镜像烧录到新板卡平台。