start kate from bash script

Hello
I have a script to start kate and open the files I need to edit.

#!/bin/bash
#
# ~/test_kate_launcher.sh
#
/usr/bin/kate  "path1/path2/file1.sh"     "path3/path4/file2.sh"   "path5/path6/file3.sh" 

I can open a terminal and type

~/test_kate_launcher.sh  &

Kate start as expected, but I need to close the terminal myself.

I can create a desktop file using create new link to application.
But I will be quickly drowned by all these desktop files installed on my desktop.

It would be nice if I could start it from dolphin right clicking on the file and choose ‘run in Konsole’

I have tried to use a launcher.

#!/bin/bash
#
# ~/test_kate_launcher_launcher.sh
#

~/test_kate_launcher.sh  &


I can open a terminal and type

~/test_kate_launcher_launcher.sh

Kate start as expected, but I need to close the terminal myself.

if I try to start it from dolphin by right clicking on the file and choose ‘run in Konsole’
That do nothing.
The first stage launcher is started, but not the second stage.

Any help is welcome.

Hi
Use xdg-open or just create a desktop file for it…

Huh? Why so complicated…make your launcher.sh file executable and simply doubleclick it in dolphin. It just opens kate with the documents/files defined in your launcher script…

The only needed content of launcher.sh:

#!/bin/bash
/usr/bin/kate  "path1/path2/file1.sh"     "path3/path4/file2.sh"   "path5/path6/file3.sh"

Hello.

I have a script to start kate and open the files I need to edit.

Kate is smart enough to do that work for you without any script!

Just open Kate and open the files you want. Save that as a session (sorry, my menus are in Spanish, so maybe there’s something different). Sessions → Save as. (my_project for example)

Then, in Settings → Configure Kate → Sesions → Load last session used, et voila!

Every time you open Kate, without scripts, Kate will open that three files (aka session my_project) for you!

Greetings

This not an option as I said

                 https://forums.opensuse.org/images/misc/quote_icon.png Originally Posted by **jcdole**](https://forums.opensuse.org/showthread.php?p=3168979#post3168979)                 I can create a desktop file using create new link to application.

But I will be quickly drowned by all these desktop files installed on my desktop.

Right-click on the shell script filename in dolphin, I got an error :

[FONT=monospace]. 
RUNNING : /run/media/user_install/16GB_CONFIG_VM/MY_SCRIPTS/2022_10_23_18h43/__files_file_EDIT_update_perm_all_usb  WITH '@' --->   
. 
LOG_USER : user_install 
. 
CALLING --> xdg-open  "/run/media/user_install/16GB_CONFIG_VM/NEW_DATA/2022_10_03_17h32/LEAP_15.4_VM_000-01/000_WORK_DIR/@2022-10-08@19:30:37@/@2022-10-08@19:30:37@/000_RE_RUN_UPDATE/RE_RUN_UPDATE_F
ILE_USB_KEY.sh" 
kf.service.services: KApplicationTrader: mimeType "x-scheme-handler/file" not found
[/FONT]

Typing directly the command in a konsole :

xdg-open  "/run/media/user_install/16GB_CONFIG_VM/NEW_DATA/2022_10_03_17h32/LEAP_15.4_VM_000-01/000_WORK_DIR/@2022-10-08@19:30:37@/@2022-10-08@19:30:37@/000_RE_RUN_UPDATE/RE_RUN_UPDATE_FILE_USB_KEY.sh"

I got the same error, but kate open with the file.

So I need to create a session for each shell scripts, which is similar to create a desktop file for each shell script.