I have a script that build a list of files (full path) to be edited in the same kate process.
Some of the file may need to be edited as root ( configuration file in /etc )
The command use in the script to start kate is :
[Desktop Entry]
Comment[en_US]=EDIT ALL IN ONE NVIDIA
Comment=EDIT ALL IN ONE NVIDIA
Exec=sh -c "/run/media/$USER/NVIDIA_OPTIMUS/EDIT_ALL_IN_ONE.sh"
GenericName[en_US]=EDIT ALL IN ONE NVIDIA
GenericName=EDIT ALL IN ONE NVIDIA
Icon=preferences-desktop-menu-edit
MimeType=
Name[en_US]=EDIT ALL IN ONE NVIDIA
Name=EDIT ALL IN ONE NVIDIA
Path=
StartupNotify=true
Terminal=true
TerminalOptions=\s--noclose
Type=Application
X-KDE-SubstituteUID=false
X-KDE-Username=
Because I don’t want to create a session for all the cases I need.
All case are generated by scripts so there is no need to create a session.
And as I said I use theses kind of scripts for many years and they stop working to day because I am using now 15.6.
If, cat "$OUTPUT_PATH"
outputs any blanks or newlines then …
Because Unix filenames can contain blanks and newlines, this default behaviour is often problematic; filenames containing blanks and/or newlines are incorrectly processed by xargs. In these situations it is better to use the -0 option, which prevents such problems. When using this option you will need to ensure that the program which produces the input for xargs also uses a null character as a separator. If that program is GNU find for example, the -print0 option does this for you.