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