Xargs -0 does not load all files at ounce to kate - Chapter 2

Chapter 1 : Xargs -0 does not load all files at ounce to kate

The solution I thought I found actually doesn’t work.

This piece of code is supposed to find and then load all the files found in Kate at once.
‘MAIN_PATH3’ contains a folder name like “/run/$USER/a/b/c…”

‘find $MAIN_PATH3 -type f’ show :

/run/media/user_install/INS_STEP2_MINI/NEW_INSTALL_LINUX_2023/2023_12_14_17h00/MY_PROJECTS/MY_INSTALL_STEP_1/2023_12_01_19h31/001_SCRIPTS/003_MAIN_SCRIPT/edit_edit_main_script.sh.keep.1
/run/media/user_install/INS_STEP2_MINI/NEW_INSTALL_LINUX_2023/2023_12_14_17h00/MY_PROJECTS/MY_INSTALL_STEP_1/2023_12_01_19h31/001_SCRIPTS/003_MAIN_SCRIPT/edit_ALL_SCRIPT_step_1_002.sh
/run/media/user_install/INS_STEP2_MINI/NEW_INSTALL_LINUX_2023/2023_12_14_17h00/MY_PROJECTS/MY_INSTALL_STEP_1/2023_12_01_19h31/001_SCRIPTS/003_MAIN_SCRIPT/edit_script_upgrade_user_script.sh
/run/media/user_install/INS_STEP2_MINI/NEW_INSTALL_LINUX_2023/2023_12_14_17h00/MY_PROJECTS/MY_INSTALL_STEP_1/2023_12_01_19h31/001_SCRIPTS/003_MAIN_SCRIPT/RUN UPGRADE USER SCRIPT.desktop
/run/media/user_install/INS_STEP2_MINI/NEW_INSTALL_LINUX_2023/2023_12_14_17h00/MY_PROJECTS/MY_INSTALL_STEP_1/2023_12_01_19h31/001_SCRIPTS/003_MAIN_SCRIPT/EDIT UPGRADE_USER SCRIPT.desktop
/run/media/user_install/INS_STEP2_MINI/NEW_INSTALL_LINUX_2023/2023_12_14_17h00/MY_PROJECTS/MY_INSTALL_STEP_1/2023_12_01_19h31/001_SCRIPTS/003_MAIN_SCRIPT/edit_edit_main_script_session.sh
/run/media/user_install/INS_STEP2_MINI/NEW_INSTALL_LINUX_2023/2023_12_14_17h00/MY_PROJECTS/MY_INSTALL_STEP_1/2023_12_01_19h31/001_SCRIPTS/003_MAIN_SCRIPT/edit_ALL_SCRIPT_step_1_001.sh
/run/media/user_install/INS_STEP2_MINI/NEW_INSTALL_LINUX_2023/2023_12_14_17h00/MY_PROJECTS/MY_INSTALL_STEP_1/2023_12_01_19h31/001_SCRIPTS/003_MAIN_SCRIPT/main_mandatory_machine_script.sh
/run/media/user_install/INS_STEP2_MINI/NEW_INSTALL_LINUX_2023/2023_12_14_17h00/MY_PROJECTS/MY_INSTALL_STEP_1/2023_12_01_19h31/001_SCRIPTS/003_MAIN_SCRIPT/edit_edit_main_script.sh~
/run/media/user_install/INS_STEP2_MINI/NEW_INSTALL_LINUX_2023/2023_12_14_17h00/MY_PROJECTS/MY_INSTALL_STEP_1/2023_12_01_19h31/001_SCRIPTS/003_MAIN_SCRIPT/edit_edit_main_script.sh
/run/media/user_install/INS_STEP2_MINI/NEW_INSTALL_LINUX_2023/2023_12_14_17h00/MY_PROJECTS/MY_INSTALL_STEP_1/2023_12_01_19h31/001_SCRIPTS/003_MAIN_SCRIPT/main_script_machine.sh
/run/media/user_install/INS_STEP2_MINI/NEW_INSTALL_LINUX_2023/2023_12_14_17h00/MY_PROJECTS/MY_INSTALL_STEP_1/2023_12_01_19h31/001_SCRIPTS/003_MAIN_SCRIPT/EDIT EDIT MAIN SCRIPT.desktop
/run/media/user_install/INS_STEP2_MINI/NEW_INSTALL_LINUX_2023/2023_12_14_17h00/MY_PROJECTS/MY_INSTALL_STEP_1/2023_12_01_19h31/001_SCRIPTS/003_MAIN_SCRIPT/edit_ALL_SCRIPT_step_1_002.sh~
/run/media/user_install/INS_STEP2_MINI/NEW_INSTALL_LINUX_2023/2023_12_14_17h00/MY_PROJECTS/MY_INSTALL_STEP_1/2023_12_01_19h31/001_SCRIPTS/003_MAIN_SCRIPT/RUN MAIN SCRIPT.desktop

#!/bin/bash

~/test_find_xargs.sh

######################################

MAIN_PATH3="/run/media/$(logname)/INS_STEP2_MINI/NEW_INSTALL_LINUX_2023/2023_12_14_17h00/MY_PROJECTS/MY_INSTALL_STEP_1/2023_12_01_19h31/001_SCRIPTS/003_MAIN_SCRIPT/test_find_xargs.sh

find $MAIN_PATH3 -type f -print0 | xargs -0 -I{} kate {}

Step to reproduce :

step 1
Open a konsole
step 2
Start the script
step 3
If kate open with all the files as expected ( generally after boot )
→ Close kate
→ Close konsole
→ Go to step 1
else
Only one file is open in kate
stderr print a message : Qt: Session management error: networkIdsList argument is NULL
journald show : ksmserver[3219]: Qt: Session management error: networkIdsList argument is NULL
→ Go to step 4
fi
step 4
Open a new konsole
step 5
Start the script
step 6
Now kate will open with all the files as expected.
→ Close kate
→ Close konsole
→ Go to step 4

Any help to feed kate at ounce is welcome

What desktop environment are you using?

With command like xargs -0 -I {} kate {} you open each file in new instance of kate. Just use xargs -0 kate

On host 3400g, a sibling of infamous host erlangen kate opens whatever files are specified on the command line in a single window with one tab for each file.

Step by step procedure. Make sure each step works as intended:

  1. List files:
karl@3400g:~> find .config/ -type f -name '*rc' -print0|xargs -0 ls
 .config/akonadi/agentsrc                                                                      .config/kconf_updaterc
 .config/akonadi/akonadiconnectionrc                                                           .config/kde5-nm-connection-editorrc
 .config/akonadi/akonadiserverrc                                                               .config/kdebugrc
 .config/akonadi_akonotes_resource_0rc                                                         .config/kded5rc
 .config/akonadi_akonotes_resource_1rc                                                         .config/kded_device_automounterrc
 .config/akonadi_archivemail_agentrc                                                           .config/kdedefaults/kcminputrc
 .config/akonadi_birthdays_resourcerc                                                          .config/kdedefaults/kscreenlockerrc
 .config/akonadiconsolerc                                                                      .config/kdedefaults/ksplashrc
 .config/akonadi_contactrc                                                                     .config/kdedefaults/kwinrc
 .config/akonadi_contacts_resource_0rc                                                         .config/kdedefaults/plasmarc
 .config/akonadi_contacts_resource_1rc                                                         .config/kdialogrc
 .config/akonadi-firstrunrc                                                                    .config/keditbookmarksrc
 .config/akonadi_followupreminder_agentrc                                                      .config/keditfiletyperc
 .config/akonadi_ical_resource_0rc                                                             .config/kfontinstuirc
 .config/akonadi_ical_resource_1rc                                                             .config/kgammarc
 .config/akonadi_indexing_agentrc                                                              .config/kglobalshortcutsrc
 .config/akonadikderc                                                                          .config/khelpcenterrc
 .config/akonadi_maildir_resource_0rc                                                          .config/khotkeysrc
 .config/akonadi_maildir_resource_26rc                                                         .config/kinfocenterrc
 .config/akonadi_maildir_resource_2rc                                                          .config/kiobookmarksrc
 .config/akonadi_maildispatcher_agent.notifyrc                                                 .config/kioclientrc
 .config/akonadi_mailfilter_agentrc                                                            .config/kio_desktoprc
 .config/akonadi_mbox_resource_0rc                                                             .config/kio_httprc
 .config/akonadi-migrationrc                                                                   .config/kiorc
 .config/akonadi_mixedmaildir_resource_0rc                                                     .config/kipirc
 .config/akonadi_newmailnotifier_agent.notifyrc                                                .config/klipperrc
 .config/akonadi_newmailnotifier_agentrc                                                       .config/kmagrc
 .config/akonadi_notes_agentrc                                                                 .config/kmahjonggrc
 .config/akonadiselftestrc                                                                     .config/kmail2.notifyrc
 .config/akonadi_sendlater_agent.notifyrc                                                      .config/kmail2rc
 .config/akonadi_sendlater_agentrc                                                             .config/kmailsearchindexingrc
 .config/akonadi_unifiedmailbox_agentrc                                                        .config/kmailsnippetrc
 .config/akregatorrc                                                                           .config/kmenueditrc
 .config/arkrc                                                                                 .config/kmixctrlrc
 .config/baloofileinformationrc                                                                .config/kmixrc
 .config/baloofilerc                                                                           .config/kmozillahelperrc
 .config/baloorc                                                                               .config/knotesrc
 .config/bluedevilglobalrc                                                                     .config/knotifyrc
 .config/bluedevilreceiverrc                                                                   .config/konquerorrc
 .config/calibrerc                                                                             .config/konsolerc
 .config/calligrarc                                                                            .config/kontactrc
 .config/calligrawordsrc                                                                       .config/kontact_summaryrc
 .config/darktable/darktablerc                                                                 .config/korgacrc
 .config/darktable/keyboardrc                                                                  .config/korganizerrc
'.config/DB Browser for SQLiterc'                                                              .config/kprivacyrc
 .config/defaultcalendarrc                                                                     .config/krdcrc
 .config/device_automounter_kcmrc                                                              .config/krfbrc
 .config/digikam.notifyrc                                                                      .config/krunnerrc
 .config/digikamrc                                                                             .config/kscreenlockerrc
 .config/digikam_systemrc                                                                      .config/kservicemenurc
 .config/discord/0.0.15/modules/discord_spellcheck/node_modules/underscore/modules/.eslintrc   .config/ksmserverrc
 .config/discord/0.0.15/modules/discord_utils/node_modules/call-bind/.eslintrc                 .config/ksplashrc
 .config/discord/0.0.15/modules/discord_utils/node_modules/call-bind/.nycrc                    .config/ksysguardrc
 .config/discord/0.0.15/modules/discord_utils/node_modules/function-bind/.eslintrc             .config/ktimezonedrc
 .config/discord/0.0.15/modules/discord_utils/node_modules/get-intrinsic/.eslintrc             .config/ktnefrc
 .config/discord/0.0.15/modules/discord_utils/node_modules/get-intrinsic/.nycrc                .config/ktrashrc
 .config/discord/0.0.15/modules/discord_utils/node_modules/has-symbols/.eslintrc               .config/kwalletmanager5rc
 .config/discord/0.0.15/modules/discord_utils/node_modules/has-symbols/.nycrc                  .config/kwalletrc
 .config/discord/0.0.15/modules/discord_utils/node_modules/object-inspect/.eslintrc            .config/kwinrc
 .config/discord/0.0.15/modules/discord_utils/node_modules/object-inspect/.nycrc               .config/kwinrulesrc
 .config/discord/0.0.15/modules/discord_utils/node_modules/qs/.eslintrc                        .config/kwriterc
 .config/discord/0.0.15/modules/discord_utils/node_modules/qs/.nycrc                           .config/kxkbrc
 .config/discord/0.0.15/modules/discord_utils/node_modules/side-channel/.eslintrc              .config/leafpad/leafpadrc
 .config/discord/0.0.15/modules/discord_utils/node_modules/side-channel/.nycrc                 .config/libreoffice/4-suse/user/extensions/bundled/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/Linux_X86_64rc
 .config/discord/0.0.15/modules/discord_utils/node_modules/superagent/.browserslistrc          .config/libreoffice/4-suse/user/extensions/bundled/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/Linux_x86rc
 .config/discord/0.0.15/modules/discord_voice/node_modules/require-directory/.jshintrc         .config/libreoffice/4-suse/user/extensions/bundled/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc
 .config/discoverabstractnotifier.notifyrc                                                     .config/libreoffice/4/user/extensions/bundled/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc
 .config/discoverrc                                                                            .config/mailviewerrc
 .config/dolphinrc                                                                             .config/marblerc
 .config/dragonplayerrc                                                                        .config/okularpartrc
 .config/drkonqirc                                                                             .config/okularrc
 .config/eventviewsrc                                                                          .config/org.kde.gwenviewrc
 .config/filetypesrc                                                                           .config/partitionmanagerrc
 .config/foldermailarchiverc                                                                   .config/phishingurlrc
 .config/fsviewrc                                                                              .config/pimpluginsrc
 .config/GIMP/2.10/colorrc                                                                     .config/pimsettingexporterrc
 .config/GIMP/2.10/contextrc                                                                   .config/plasma-localerc
 .config/GIMP/2.10/controllerrc                                                                .config/plasmanotifyrc
 .config/GIMP/2.10/devicerc                                                                    .config/plasma-org.kde.plasma.desktop-appletsrc
 .config/GIMP/2.10/dockrc                                                                      .config/plasmarc
 .config/GIMP/2.10/gimprc                                                                      .config/plasmashellrc
 .config/GIMP/2.10/gtkrc                                                                       .config/plasmawindowed-appletsrc
 .config/GIMP/2.10/menurc                                                                      .config/plasmawindowedrc
 .config/GIMP/2.10/parasiterc                                                                  .config/powerdevilrc
 .config/GIMP/2.10/pluginrc                                                                    .config/powermanagementprofilesrc
 .config/GIMP/2.10/sessionrc                                                                   .config/QMapShackrc
 .config/GIMP/2.10/templaterc                                                                  .config/qpdfviewrc
 .config/GIMP/2.10/themerc                                                                     .config/showfotorc
 .config/GIMP/2.10/toolrc                                                                      .config/soffice.binrc
 .config/GIMP/2.10/unitrc                                                                      .config/specialmailcollectionsrc
 .config/gtkrc                                                                                 .config/spectaclerc
 .config/gwenviewrc                                                                            .config/sweeperrc
 .config/htop/htoprc                                                                           .config/systemmonitorrc
 .config/importwizardrc                                                                        .config/systemsettingsrc
 .config/k3brc                                                                                 .config/templatesconfigurationrc
 .config/kaccessrc                                                                             .config/TeXstudiorc
 .config/kactivitymanagerd-pluginsrc                                                           .config/tokodonrc
 .config/kactivitymanagerdrc                                                                   .config/trashrc
 .config/kactivitymanagerd-statsrc                                                             .config/vlcrc
 .config/kaddressbookrc                                                                        .config/vlc/vlcrc
 .config/kaffeinerc                                                                            .config/webengineurlinterceptoradblockrc
 .config/kalendaracrc                                                                          .config/xfce4/desktop/icons.screen0-0x0.rc
 .config/katepartrc                                                                            .config/xfce4/desktop/icons.screen0-1904x1039.rc
 .config/katerc                                                                                .config/xfce4/desktop/icons.screen0-1904x1142.rc
 .config/kateschemarc                                                                          .config/xfce4/desktop/icons.screen0-1904x1143.rc
 .config/katesyntaxhighlightingrc                                                              .config/xfce4/desktop/icons.screen0-1904x1159.rc
 .config/katevirc                                                                              .config/xfce4/desktop/icons.screen0-1904x1184.rc
 .config/kcharselectrc                                                                         .config/xfce4/exo-1/helpers.rc
 .config/kcmcddbrc                                                                             .config/xfce4/helpers.rc
 .config/kcminputrc                                                                            .config/xfce4/help.rc
 .config/kcmsambarc                                                                            .config/xfce4/panel/whiskermenu-1.rc
 .config/kcmshell5rc
karl@3400g:~> 
  1. Echo resulting command: xargs appends the list of file names to string “kate” command:
karl@3400g:~> find .config/ -type f -name '*rc' -print0|xargs -0 echo kate
kate .config/GIMP/2.10/gimprc .config/GIMP/2.10/gtkrc .config/GIMP/2.10/menurc .config/GIMP/2.10/themerc .config/GIMP/2.10/pluginrc .config/GIMP/2.10/sessionrc .config/GIMP/2.10/dockrc .config/GIMP/2.10/devicerc .config/GIMP/2.10/contro
llerrc .config/GIMP/2.10/contextrc .config/GIMP/2.10/toolrc .config/GIMP/2.10/colorrc .config/GIMP/2.10/templaterc .config/GIMP/2.10/parasiterc .config/GIMP/2.10/unitrc .config/akonadi/agentsrc .config/akonadi/akonadiserverrc .config/ak
onadi/akonadiconnectionrc .config/darktable/darktablerc .config/darktable/keyboardrc .config/discord/0.0.15/modules/discord_spellcheck/node_modules/underscore/modules/.eslintrc .config/discord/0.0.15/modules/discord_utils/node_modules/c
all-bind/.eslintrc .config/discord/0.0.15/modules/discord_utils/node_modules/call-bind/.nycrc .config/discord/0.0.15/modules/discord_utils/node_modules/function-bind/.eslintrc .config/discord/0.0.15/modules/discord_utils/node_modules/ge
t-intrinsic/.eslintrc .config/discord/0.0.15/modules/discord_utils/node_modules/get-intrinsic/.nycrc .config/discord/0.0.15/modules/discord_utils/node_modules/has-symbols/.eslintrc .config/discord/0.0.15/modules/discord_utils/node_modul
es/has-symbols/.nycrc .config/discord/0.0.15/modules/discord_utils/node_modules/object-inspect/.eslintrc .config/discord/0.0.15/modules/discord_utils/node_modules/object-inspect/.nycrc .config/discord/0.0.15/modules/discord_utils/node_m
odules/qs/.eslintrc .config/discord/0.0.15/modules/discord_utils/node_modules/qs/.nycrc .config/discord/0.0.15/modules/discord_utils/node_modules/side-channel/.eslintrc .config/discord/0.0.15/modules/discord_utils/node_modules/side-chan
nel/.nycrc .config/discord/0.0.15/modules/discord_utils/node_modules/superagent/.browserslistrc .config/discord/0.0.15/modules/discord_voice/node_modules/require-directory/.jshintrc .config/htop/htoprc .config/leafpad/leafpadrc .config/
libreoffice/4-suse/user/extensions/bundled/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/Linux_X86_64rc .config/libreoffice/4-suse/user/extensions/bundled/registry/com.sun.star.comp.deployment.component.PackageR
egistryBackend/Linux_x86rc .config/libreoffice/4-suse/user/extensions/bundled/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc .config/libreoffice/4/user/extensions/bundled/registry/com.sun.star.comp.deployme
nt.component.PackageRegistryBackend/unorc .config/vlc/vlcrc .config/xfce4/desktop/icons.screen0-0x0.rc .config/xfce4/desktop/icons.screen0-1904x1039.rc .config/xfce4/desktop/icons.screen0-1904x1142.rc .config/xfce4/desktop/icons.screen0
-1904x1143.rc .config/xfce4/desktop/icons.screen0-1904x1159.rc .config/xfce4/desktop/icons.screen0-1904x1184.rc .config/xfce4/exo-1/helpers.rc .config/xfce4/panel/whiskermenu-1.rc .config/xfce4/help.rc .config/xfce4/helpers.rc .config/D
B Browser for SQLiterc .config/QMapShackrc .config/TeXstudiorc .config/akonadi-firstrunrc .config/akonadi-migrationrc .config/akonadi_akonotes_resource_0rc .config/akonadi_akonotes_resource_1rc .config/akonadi_birthdays_resourcerc .conf
ig/akonadi_contactrc .config/akonadi_contacts_resource_0rc .config/akonadi_contacts_resource_1rc .config/akonadi_followupreminder_agentrc .config/akonadi_ical_resource_0rc .config/akonadi_maildir_resource_0rc .config/akonadi_maildir_res
ource_26rc .config/akonadi_maildir_resource_2rc .config/akonadi_maildispatcher_agent.notifyrc .config/akonadi_mbox_resource_0rc .config/akonadi_mixedmaildir_resource_0rc .config/akonadi_newmailnotifier_agent.notifyrc .config/akonadi_new
mailnotifier_agentrc .config/akonadi_notes_agentrc .config/akonadi_sendlater_agent.notifyrc .config/akonadi_sendlater_agentrc .config/akonadi_unifiedmailbox_agentrc .config/akonadikderc .config/akonadiselftestrc .config/baloorc .config/
bluedevilreceiverrc .config/calibrerc .config/calligrarc .config/calligrawordsrc .config/digikam.notifyrc .config/discoverabstractnotifier.notifyrc .config/dragonplayerrc .config/filetypesrc .config/foldermailarchiverc .config/fsviewrc
.config/importwizardrc .config/kaccessrc .config/kactivitymanagerd-pluginsrc .config/kactivitymanagerdrc .config/kaddressbookrc .config/katepartrc .config/kateschemarc .config/katesyntaxhighlightingrc .config/katevirc .config/kcharselec
trc .config/kcmcddbrc .config/kcmsambarc .config/kcmshell5rc .config/kde5-nm-connection-editorrc .config/kdebugrc .config/kdialogrc .config/keditbookmarksrc .config/keditfiletyperc .config/kfontinstuirc .config/kgammarc .config/kio_desk
toprc .config/kio_httprc .config/kiobookmarksrc .config/kioclientrc .config/kiorc .config/kipirc .config/kmagrc .config/kmahjonggrc .config/kmail2.notifyrc .config/kmailsnippetrc .config/kmenueditrc .config/kmixctrlrc .config/kmixrc .co
nfig/knotesrc .config/knotifyrc .config/kontact_summaryrc .config/kontactrc .config/kprivacyrc .config/krdcrc .config/krfbrc .config/kscreenlockerrc .config/kservicemenurc .config/ksplashrc .config/ktimezonedrc .config/ktnefrc .config/k
trashrc .config/kwalletmanager5rc .config/kwalletrc .config/kwinrulesrc .config/kwriterc .config/mailviewerrc .config/org.kde.gwenviewrc .config/phishingurlrc .config/pimpluginsrc .config/pimsettingexporterrc .config/plasmanotifyrc .con
fig/plasmarc .config/powerdevilrc .config/qpdfviewrc .config/showfotorc .config/soffice.binrc .config/specialmailcollectionsrc .config/sweeperrc .config/webengineurlinterceptoradblockrc .config/drkonqirc .config/kactivitymanagerd-statsr
c .config/kdedefaults/plasmarc .config/kdedefaults/kcminputrc .config/kdedefaults/kwinrc .config/kdedefaults/ksplashrc .config/kdedefaults/kscreenlockerrc .config/discoverrc .config/korgacrc .config/defaultcalendarrc .config/akonadi_ica
l_resource_1rc .config/korganizerrc .config/eventviewsrc .config/konquerorrc .config/partitionmanagerrc .config/plasmawindowedrc .config/plasmawindowed-appletsrc .config/ksmserverrc .config/templatesconfigurationrc .config/baloofileinfo
rmationrc .config/vlcrc .config/akregatorrc .config/tokodonrc .config/plasma-localerc .config/baloofilerc .config/krunnerrc .config/k3brc .config/okularpartrc .config/okularrc .config/arkrc .config/spectaclerc .config/powermanagementpro
filesrc .config/device_automounter_kcmrc .config/klipperrc .config/dolphinrc .config/trashrc .config/digikam_systemrc .config/akonadi_archivemail_agentrc .config/kded5rc .config/akonadi_indexing_agentrc .config/akonadi_mailfilter_agentr
c .config/akonadiconsolerc .config/kxkbrc .config/kcminputrc .config/khelpcenterrc .config/kaffeinerc .config/marblerc .config/plasmashellrc .config/systemmonitorrc .config/digikamrc .config/ksysguardrc .config/gwenviewrc .config/kmozil
lahelperrc .config/kmailsearchindexingrc .config/kmail2rc .config/kconf_updaterc .config/systemsettingsrc .config/bluedevilglobalrc .config/kded_device_automounterrc .config/kinfocenterrc .config/gtkrc .config/kwinrc .config/khotkeysrc
.config/plasma-org.kde.plasma.desktop-appletsrc .config/kglobalshortcutsrc .config/konsolerc .config/katerc .config/kalendaracrc
karl@3400g:~>
  1. Execute the command: kate readily starts in a new window and opens each file specified in a new tab.
karl@3400g:~> find .config/ -type f -name '*rc' -print0|xargs -0 kate
karl@3400g:~> 

What happens if you simply run

kate /path/to/some/file

Are you returned to the shell prompt or kate is running in forground?

This is correct behavior. When kate finds an active instance it will ask this instance to open file(s) and exit.

I use KDE :

echo $XDG_CURRENT_DESKTOP
KDE

The file is load normally.
Then returned to the shell prompt
But with an error :

user_install@15-4—G731GV:~> kate ~/test_001.sh
Qt: Session management error: networkIdsList argument is NULL

Same error for me (see end of my step 3 in #1

I will try that and give news

I do not see any shell prompt.

Effectively.
I redo the test.
File opened but no return to prompt.

user_install@15-4—G731GV:~> kate ~/test_A_001.sh
Qt: Session management error: networkIdsList argument is NULL

Which explains all your results. In Tumbleweed kate command will invoke editor in background. I do not know whether KDE in Leap 15.4 is too old or if there are some settings affecting it. You may try asking on KDE support channels.

A simple test
1°) ~/test_A_001.sh is a file that exists in $HOME
2°) ! -name ‘*~’ to exclude backup old file

the test itself
3°) find ~/test_A_001.sh -type f ! -name ‘*~’ -print0|xargs -0 kate

Result : open the file with an error and do not return to prompt
Qt: Session management error: networkIdsList argument is NULL

A real test :
1°) ${FILE_ALL} is a variable which containns a list of 25 files (Length : 4729)
find ${FILE_ALL} -type f ! -name “~"
echo
echo
find ${FILE_ALL} -type f ! -name "
~” | wc -l

Result :
a) list of 24 files
b) Nb files : 24

2°) YOUR COMMAND 1 : find .config/ -type f -name 'rc’ -print0|xargs -0 ls
Converted to :
echo
find ${FILE_ALL} -type f ! -name "
~" -print0|xargs -0 ls
echo
echo
find ${FILE_ALL} -type f ! -name “*~” -print0|xargs -0 ls | wc -l
echo

Result :
a) list of 24 files
b) Nb files : 24

3°) YOUR COMMAND 2 : find .config/ -type f -name 'rc’ -print0|xargs -0 echo kate
Converted to :
echo
find ${FILE_ALL} -type f ! -name "
~" -print0|xargs -0 echo kate
echo
echo
find ${FILE_ALL} -type f ! -name “*~” -print0|xargs -0 echo kate | wc -l
echo

Result :
a) kate follow by a list of 24 files

kate /run/media/user_install/INS_STEP2_MINI/NEW_INSTALL_LINUX_2023/2023_12_14_17h00/MY_PROJECTS/MY_INSTALL_STEP_1/2023_12_01_19h31/001_SCRIPTS/003_MAIN_SCRIPT/edit_edit_main_script.sh /run/media/user_install/INS_STEP2_MINI/NEW_INSTALL_LINUX_2023/2023_12_14_17h00/MY_PROJECTS/MY_INSTALL_STEP_1/2023_12_01_19h31/001_SCRIPTS/003_MAIN_SCRIPT/edit_script_upgrade_user_script.sh /run/media/user_install/INS_STEP2_MINI/NEW_INSTALL_LINUX_2023/2023_12_14_17h00/MY_PROJECTS/MY_INSTALL_STEP_1/2023_12_01_19h31/001_SCRIPTS/003_MAIN_SCRIPT/main_mandatory_machine_script.sh
… …/run/media/user_install/INS_STEP2_MINI/NEW_INSTALL_LINUX_2023/2023_12_14_17h00/MY_PROJECTS/MY_INSTALL_STEP_1/2023_12_01_19h31/902_INSTALL_HPLIP/RUN/SCRIPT/000_param_value_make_hplip_install_initial_list

4°) YOUR COMMAND 3 : find .config/ -type f -name ‘*rc’ -print0|xargs -0 kate
Converted to :

Result :
All files opens with 1 error and no return to prompt until I close kate.
Qt: Session management error: networkIdsList argument is NULL

4 ===================================================

Qt: Session management error: networkIdsList argument is NULL

4 ===================================================
user_install@15-4—G731GV:~>

See full result here : Test result

I will make a test on a VM running 15.5

kate is broken on your system. You need to fix it’s issue first. It works here:

KDE-Plasma-Version: 5.27.9
KDE-Frameworks-Version: 5.103.0
Qt-Version: 5.15.8
Kernel-Version: 5.14.21-150500.55.19-default (64-bit)
Grafik-Plattform: X11
Prozessoren: 8 × AMD Ryzen 5 3400G with Radeon Vega Graphics
Speicher: 29,3 GiB Arbeitsspeicher
Grafikprozessor: AMD Radeon Vega 11 Graphics

Comparizon between leap 15.5 ( fresh install nothing added ) and leap 15.4
All running on the same computer
All running in Virtualbox VM 7.0.10
Running the adapted command from karlmistelberger

find ${FILE_ALL} -type f ! -name “*~” -print0|xargs -0 kate

  1. Starting command from terminal (konsole) :
    1-a) 15.4
    All files opens with 1 error and no return to prompt until I close kate.
    Qt: Session management error: networkIdsList argument is NULL
    1-b) 15.5
    All files opens, no error and no return to prompt until I close kate.

  2. Starting command from desktop launcher
    1-a) 15.4
    All files opens with 1 error and no return to prompt until I close kate.
    Qt: Session management error: networkIdsList argument is NULL
    1-b) 15.5
    All files opens, no error and no return to prompt until I close kate.

Reinstalling kate on 15.4 does not change behavior.

As we migrate to 15.5 , it remains a disturbing point concerning the fact that the return to the prompt is not done until kate is closed.
When launching a DESKTOP file, I have to test the behavior in the middle of a script to install one of our applications.

This thread can be considered closed.
Thank you all for your great help.

Isn‘t this quite standard that if you start a program via terminal, you won‘t return to a prompt until you close the program?
The terminal recieves all output/informations/logging from the program until it is closed…