Kate as Classic Snap

I’ve uploaded for review Kate to become a classic snap. This is in response to a bug reported by the app maintainers. Kate is has many plugins which turn it into an IDE so it uses arbitrary external apps such as revision control systems. This needs classic mode.

It also adds a dbus interface for org.kde.Kate which is needed for running kate as a QtSingleApplication


Kate acts as an IDE as much as emacs does, so I +1 this request for classic


+1 from me as well, this is necessary functionality for the app.

1 Like

Kate as classic makes sense to me as well, for the reasons given. Note to @alexmurray, @emitorino and @pfsmorigo - you can consider this publisher vetted (I and others have done so in the past).


As a Kate user LGTM.

Granting use of classic. This is now live.

1 Like

It’s still blocked for review, maybe because of the extra dbus that has been added too. Will it get reviewed?

It is blocked since the snap.yaml still includes various plugs and slots however with classic confinement these are not needed so should be removed - then the snap should pass automated review.

1 Like

@jriddell could you please update your snapcraft.yaml removing the plugs and slots sections and upload a new revision so it passes automated review?

I’m confused by plugs in classic snaps. I’ve removed all the mentioned plugs except the content snap.

The Kate snap needs to plug into the kde-frameworks-5-qt-5-15-core20 snap to get its libraries but it won’t allow upload with a plug confinement 'classic' not allowed with plugs/slots. Won’t it break if I upload without this plug?

Unfortunately classic snaps cannot use content interfaces. It is our plan to some day enable this but currently, even if you installed a classic snap with a content interface plug and connected it, nothing happens.

You could still request to have the store allow uploading your snap with this plug and then manually adjust paths to find the content interface slot side from the content snap and then load stuff from the content interface but that would not work out of the box with the extension as far as I know.

OK I’ve uploaded Kate revision 67 without the content snap, what next?

Hmm no it has some issues, hang on…

okay that’s in now (stable and candidate).

However it still doesn’t seem to be able to be called over dbus, which I thought was unrestricted with classic spans.

e.g. snap run kate
qdbus | grep kate to get the dbus name it’s using then run:

qdbus org.kde.kate-107781 /MainApplication org.kde.Kate.Application.openUrl file:///home/jr/src/kde/blinken/neongit/blinken/snapcraft.yaml utf-8

Error: org.freedesktop.DBus.Error.AccessDenied
An AppArmor policy prevents this sender from sending this message to this recipient; type=“method_call”, sender=":1.1741" (uid=1000 pid=333372 comm="/usr/lib/qt5/bin/qdbus org.kde.kate-107781 /MainAp" label=“unconfined”) interface=“org.
kde.Kate.Application” member=“openUrl” error name="(unset)" requested_reply=“0” destination=“org.kde.kate-107781” (uid=1000 pid=107781 comm="kate jenkins_jobs_update_nci.rb " label=“snap.kate.kate (enforce)”)

This means Kate runs multiple copies of itself istead of opening new files in the running instance.

@jriddel I am not able to reproduce this issue - on a fresh machine I did the following:

$ sudo snap install --classic kate
$ dbus-monitor --session # to be able to capture the dbus address
$ kate &
$ dbus-send --print-reply --session --dest=org.kde.kate-3889 /MainApplication org.kde.Kate.Application.openUrl string:file:///home/amurray/.bashrc string:utf-8
method return time=1620960710.769885 sender=:1.108 -> destination=:1.110 serial=84 reply_serial=2
   boolean true

I notice in your output the following: label=“snap.kate.kate (enforce)” - this indicates that the snap is running under confinement - however it the classic version of kate is installed this should instead be in complain mode:

$ ps Z | grep '[k]ate'
snap.kate.kate (complain)          3889 pts/1    Sl+    0:01 /snap/kate/91/usr/bin/kate

Can you perhaps try reinstalling the snap and see if this helps?

Great I agree, probably just my fault, thanks for testing