dbus-send 명령을 사용하면 시스템에서 사용 가능한 서비스를 출력할 수 있다.
Session 버스 :
dbus-send --session \
--dest=org.freedesktop.DBus \
--type=method_call \
--print-reply \
/org/freedesktop/DBus \
org.freedesktop.DBus.ListNames
System 버스 :
dbus-send --system \
--dest=org.freedesktop.DBus \
--type=method_call \
--print-reply \
/org/freedesktop/DBus \
org.freedesktop.DBus.ListNames
다음과 같은 결과를 출력해 준다.
method return time=1672301936.016979 sender=org.freedesktop.DBus -> destination=:1.28 serial=3 reply_serial=2
array [
string "org.freedesktop.DBus"
string "org.freedesktop.login1"
string "org.freedesktop.timesync1"
string "org.freedesktop.systemd1"
string "org.freedesktop.Avahi"
string "org.bluez"
string ":1.12"
string ":1.0"
string ":1.1"
string ":1.2"
string ":1.3"
string ":1.28"
string "fi.epitest.hostap.WPASupplicant"
string ":1.4"
string "fi.w1.wpa_supplicant1"
string ":1.5"
]
특히 유용한 D-Bus
기본 인터페이스
org.freedesktop.DBus.Introspectable.Introspect
를 호출하면 관심있는 서비스의 인터페이스를 검사할 수 있다
:
dbus-send --system --type=method_call --print-reply \
--dest=org.bluez \
/ \
org.freedesktop.DBus.Introspectable.Introspect
결과는 다음과 같다.
method return time=1672302110.949720 sender=:1.5 -> destination=:1.31 serial=30 reply_serial=2
string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node><interface name="org.freedesktop.DBus.Introspectable"><method name="Introspect"><arg name="xml" type="s" direction="out"/>
</method></interface><interface name="org.freedesktop.DBus.ObjectManager"><method name="GetManagedObjects"><arg name="objects" type="a{oa{sa{sv}}}" direction="out"/>
</method><signal name="InterfacesAdded"><arg name="object" type="o"/>
<arg name="interfaces" type="a{sa{sv}}"/>
</signal>
<signal name="InterfacesRemoved"><arg name="object" type="o"/>
<arg name="interfaces" type="as"/>
</signal>
</interface><node name="org"/></node>"
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
45 | [IPC]D-Bus 소개 | makersweb | 2015.02.28 | 29823 |
44 | mmap() 함수, munmap() 함수 | pjk | 2014.02.05 | 15651 |
43 | ioctl() 함수 | makersweb | 2014.02.27 | 14197 |
42 | read() 함수, write() 함수 | makersweb | 2014.03.04 | 11360 |
41 | SocketCAN 유틸 사용방법 | makersweb | 2022.02.05 | 7794 |
40 | 리눅스 프레임버퍼(Linux Frame Buffer) | makersweb | 2015.02.15 | 7525 |
39 | Ubuntu Linux에서 dbus-c++바인딩 D-Bus 테스트 | makersweb | 2018.03.07 | 7133 |
38 | 키패드 드라이버 | pjk | 2014.02.12 | 6538 |
37 | 리눅스 커널 소스코드 구성도 | makersweb | 2014.03.04 | 5506 |
36 | Build Qt 4.7.0 for Embedded Linux | makersweb | 2015.05.25 | 5436 |
35 | 플랫폼 디바이스 드라이버 개발 시 많이 사용되는 커널 API 및 매크로 | makersweb | 2020.01.28 | 4904 |
34 | 리눅스 데스크탑 환경 종류 | pjk | 2015.02.11 | 4628 |
33 | 디바이스 드라이버에 대해서 | makersweb | 2014.04.19 | 4143 |
32 | Wayland에 대한 간단한 소개 | makersweb | 2017.12.29 | 3435 |
31 | file_operations | makersweb | 2014.02.27 | 3300 |
30 | 리눅스 디렉터리 구조 | makersweb | 2014.02.28 | 3242 |
29 | 4. Makefile를 작성할 때 알면 좋은 것들 | pjk | 2014.02.05 | 3073 |
28 | 리눅스 오디오 스택과 아키텍처 | makersweb | 2020.09.02 | 3034 |
27 | 리눅스에서 네트워크 구성 | makersweb | 2022.06.11 | 3029 |
26 | Weston 의 설명 및 관련 컴포넌트 | makersweb | 2020.06.03 | 2663 |