How to prevent auto start of matchbox-terminal at boot?


Dave Beal
 

Hello Yocto Community -

I am using Yocto to build a core-image-minimal image for Intel hardware.  When the system boots, it automatically starts a matchbox-terminal as root.  This is a huge security hole for this embedded system product, because anyone who plugs in a keyboard and monitor has access to this terminal.  I've spent about two days trying to figure out how to start X without this terminal appearing.  I assume there's a config file somewhere indicating that this terminal should start automatically, but I haven't been able to find it.  Any suggestions?  Thanks!

= Dave Beal
   Cardinal Peak, LLC
   Colorado, USA


Alexander Kanavin
 

Please share the log.do_rootfs for your image, otherwise it's difficult to say why the terminal ends up being there and gets autostarted.

Alex


On Sun, 30 Jan 2022 at 22:01, Dave Beal via lists.yoctoproject.org <dbeal=cardinalpeak.com@...> wrote:
Hello Yocto Community -

I am using Yocto to build a core-image-minimal image for Intel hardware.  When the system boots, it automatically starts a matchbox-terminal as root.  This is a huge security hole for this embedded system product, because anyone who plugs in a keyboard and monitor has access to this terminal.  I've spent about two days trying to figure out how to start X without this terminal appearing.  I assume there's a config file somewhere indicating that this terminal should start automatically, but I haven't been able to find it.  Any suggestions?  Thanks!

= Dave Beal
   Cardinal Peak, LLC
   Colorado, USA




Dave Beal
 

Thanks, Alex.  The log file is attached.
 
By the way, I'd be happy with a solution that involves changing a file on the target system after the Yocto build is complete.  The fix doesn't need to be in the Yocto build.
 
= Dave
 


Alexander Kanavin
 

The logs reveal that 'packagegroup-core-x11 packagegroup-core-x11-base packagegroup-core-x11-xserver' are all installed. x11-base pulls in recipes-graphics/mini-x-session/mini-x-session_0.1.bb which starts a minimal session with a terminal. You should either drop x11-base, or tweak mini-x-session script to do what you want.

Alex


On Mon, 31 Jan 2022 at 01:22, Dave Beal via lists.yoctoproject.org <dbeal=cardinalpeak.com@...> wrote:
Thanks, Alex.  The log file is attached.
 
By the way, I'd be happy with a solution that involves changing a file on the target system after the Yocto build is complete.  The fix doesn't need to be in the Yocto build.
 
= Dave
 




Dave Beal
 

Thanks, Alex!  That was it.  The script that started the matchbox-terminal is /usr/bin/mini-x-session.  I just edited this file and commented out the terminal line and another line that was setting my display to an incorrect resolution.