When kate is launched from the terminal kate outputs a lot of debug info and doesn't detach from the terminal session.kate should have a flag to detach from the session when launched An example of this behavior is how visual studio code(and the numerous foss forks) launch from the terminal(code filename) 0 output unless requested or something causes code to crash
If you're working in a terminal often I'd suggest picking up a few tips like "&" If you want to open kate and have it detach run "kate &" or if you want to open a file straight away "kate myfile.c &` You might get output still in your terminal but you can close that terminal at any time and kate will continue to run. This works for any application you launch from a terminal.
I do use that but it would be nice to be able to use the same terminal session to open multiple projects/files in kate
(In reply to advaith from comment #2) > I do use that but it would be nice to be able to use the same terminal > session to open multiple projects/files in kate The process is the same for opening the next file. kate myfile1 & kate myfile2 &
quite frankly using & every time you open a file isn't a solution. its a workaround. there needs to be a at least a flag that can be used to allow kate to detach from a terminal and not output debug info
There's nothing really "wrong" with the current behaviour, however I do agree with this changing simply to make things more consistent Currently Kate will detach if there's a running instance but won't if there's no running instance, and that can just throw some users off since the behaviour is just not consistent, or at least not as consistent as it could be, so I can see why some would want the default behaviour changed and move the current behaviour to a flag.
I have no issue if we have this as option, one can then still think about what should be the default. For the debugging output: with the latest frameworks release of this month and some recent Kate, normally there shall be no output for release builds. But in previous versions there was always some crap output ;) (and there might still be some if you run outside of a KDE Plasma session)
Also when you want to launch a KDE app from the terminal, the best way is to do `kstart5 <app>` This goes through the standard startup sequence, which means yu get launch feedback and the app gets put into its own cgroup slice so that it appears correctly in System Monitor. Perhaps kate could do this automatically and re-launch itself when run directly?
Starting kate with kstart5 gives some warning output: `Omitting both --window and --windowclass arguments is not recommended` As this automatically forks kate into it's own process instead of running inside the terminal an alias would then do it fine. alias kate='kstart5 kate` Have tested with kstart5 kate myfile and that opens the file correctly.
https://invent.kde.org/utilities/kate/-/merge_requests/1151
(In reply to Waqar Ahmed from comment #9) > https://invent.kde.org/utilities/kate/-/merge_requests/1151 Apparently this feature was merged and made the default silently. It apparently is in the version that my distro has recently started shipping. This new ‘feature’ breaks my setup, where I launch kate from a Python script using subprocess as part of a kmail filter. Because subprocess now thinks kate has finished (it gets the pid of the intermediate process, not of the kate instance itself), it doesn't block anymore and the script does not work anymore. :-( (In reply to Christoph Cullmann from comment #6) > I have no issue if we have this as option, one can then still think about > what should be the default. I do hope there is an option to get the previous behavior back, as otherwise a regression was introduced breaking functionality just for the sake of getting rid of some visual annoyance. From the help, I see no option that would be the one I need. Please advise to at least get a workaround until the regression reverted or an option is added (which'll still take months to propagate to my distro).
You can just check the help command, it would have saved you from writing such a long comment. kate -b # run in blocking mode
(In reply to Waqar Ahmed from comment #11) > You can just check the help command, it would have saved you from writing > such a long comment. > > kate -b # run in blocking mode Thanks for pointing out that is the option I need. For the record: (In reply to Erik Quaeghebeur from comment #10) > […] From the help, I see no option that would be the one I need. […] I did read the help. It did not help me, as I explicitly mentioned. The help text for that option (translated from Dutch) is “If using an already running kate process, block until ready, if URLs to open have been given.” and not “Run in blocking mode.”. In the context of my comment, there is no ‘already running kate process’. So I guess the help text could be improved.