@tbx1024, you can try to modify behavior of search bar's elements without modifying stock files. As an example,
here is how I added reaction to swiping over Menu button.
Useful links:
how to run any program with LIPC,
maybe you'll need to add DISPLAY=:0 to run Kterm.
Or just use
Kindle Menu (which includes KTerm).
EDIT: to answer you initial question, yes, it's possible to get rid of error dialog, but not without changing Kterm's sources and recompiling. Applications from
appreg.db are launched by
appmgrd.
appmgrd pings launched applications over LIPC, so Kterm shoud know how to answer on its start and how to notify
appmgrd about exit from Kterm.