After a recent update, kate seems to exec a copy of itself, presumably with some parameter which prevents an endless recursion, and then exits. Presumably this was intended to help users who run kate with a command in a command window and don't want the command window blocked until the kate window is closed.
However this breaks things like git commit
and sudoedit
, since these wait for kate to exit and then check to see if the file was changed. Now that the original kate process exits immediately, the file hasn't changed. How can I stop kate from exec'ing itself?
The only way that I can think of is to move the real /usr/bin/kate
to something like /usr/bin/realkate
, and create a tiny shell script at /usr/bin/kate
which does something like
/usr/bin/realkate -b $*
, but this will get overwritten on the next upgrade.
I tried alias kate='kate -b'
in my .bashrc, but this only works if I run kate from the command line, not when git commit
or sudoedit
runs it.
Possibly this could be fixed in katerc, but there doesn't seem to be any documentation for that.
/usr/bin/realkate -b $*
will not be overwritten by any upgrades, but as a matter of principle, you should create it in/usr/local/bin
instead (see unix.stackexchange.com/questions/8656/…).