Sample Header Ad - 728x90

`kate -n new.txt %u` in Dolphin service menu saves one level up

1 vote
1 answer
174 views
When creating a new Dolphin service menu to create a new text file using Kate (given there is no shortcut for that like for folders and that the menu option is rather hidden under multiple clicks as said here ), using a desktop file like this [Desktop Entry] Type=Service Icon=kate Actions=new-file ServiceTypes=KonqPopupMenu/Plugin,inode/directory X-KDE-Priority=TopLevel [Desktop Action new-file] Name=New text file Icon=kate Exec=kate %u Kate creates the file not within the selected directory, but at the same path as that directory, one level up than expected: selecting folder /PATH/TO/MY_DIRECTORY and using the context menu service, the text file is ready to be saved at /PATH/TO instead of /PATH/TO/MY_DIRECTORY. The same happens with Exec=kate -n new.txt %u, as the file is created *and* saved. How to make Kate save or offer to save **within the selected directory**? How to do it inside the selected folder?
Asked by cipricus (1779 rep)
Oct 19, 2021, 02:23 PM
Last activity: Mar 8, 2022, 04:55 AM