Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#1,050 6 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
linux

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện hành vi với Krita AppImage được tham chiếu và các lệnh busctl --user list và busctl --user call. Xác định cách việc đóng gói AppImage nên cung cấp một tên D-Bus ổn định và khả năng kích hoạt dịch vụ tùy chọn; công việc được hoàn tất khi ứng dụng đã đóng gói có thể được phát hiện bằng một tên phù hợp thay vì chỉ bằng địa chỉ peer của nó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

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

why? because i can.

Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
9.5k
Fork
586
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của AppImage/AppImageKit

Tất cả issue của AppImage/AppImageKit

Issue tương tự

Thêm issue về Desktop Dev

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.