AppImage / AppImage/AppImageKit

How to properly make a program's dbus methods discoverable?

オープン
#1,050 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
言語のデータがありません
スター
9.4k
フォーク
588
PR マージ指標
PR 指標を取得中

説明

I discovered this with krita. In particular, the krita-4.2.9-x86_64.appimage with sha1sum 61933e6b86a348f155824b588ecdddf235133492.

grabbing krita's PID with xprop on its main window, then looking the peer address up in `busctl --user list` lets me get at all the "actions" that it has, which includes entries in the menus, and buttons on toolbars i think.

I can now do silly things like

```
busctl --user set-property :1.20637 /krita/MainWindow_1/actions/options_configure org.qtproject.Qt.QAction text s "what even is this"
busctl --user set-property :1.20637 /krita/MainWindow_1/actions/options_configure_toolbars org.qtproject.Qt.QAction text s "why are you making my krita unusable like this"
```

resulting in the menus changing their texts:

![image](https://user-images.githubusercontent.com/25167/82486332-f90bbc80-9adc-11ea-8af3-df123ddc311d.png)

However, having to find krita by obtaining its PID, and then the peer address on the user bus is much less convenient than accessing it via a proper name.

For one, the entry shows up with the name "AppRun", where i would expect "krita".

Compare how krita and the xfce4-appfinder (not an appimage) show up in `busctl --user list`

```
NAME PID PROCESS USER CONNECTION
:1.20637 17624 AppRun timo :1.20637
:1.19664 5312 xfce4-appfinder timo :1.19664
org.xfce.Appfinder 5312 xfce4-appfinder timo :1.19664
```

and i can call it with its "proper name" as well:

`busctl --user call org.xfce.Appfinder /org/xfce/Appfinder org.xfce.Appfinder OpenWindow bs 0 ""`

I'm not exactly sure what can or has to be done, but at the very least the process name should be fixed to read "krita". In order to have the proper name, I believe some kind of schema would have to be installed on the system. Going even further, the service could be made activatable, so that when a dbus message is sent, it gets launched if it's not running yet.

Thanks for your time.

PS:
![image](https://user-images.githubusercontent.com/25167/82487630-eeeabd80-9ade-11ea-9441-49c6b1ba00c1.png)

why? because i can.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。