Re: dbus-send examples
- From: 代尔欣 <daierxin gmail com>
- To: Kiran Bhat <kiranbail yahoo co in>
- Cc: networkmanager-list gnome org
- Subject: Re: dbus-send examples
- Date: Mon, 25 Jan 2010 09:52:23 +0800
Hi,
I paste some I ever used. Hope can help you.
It's base on the NM0.7.0
echo "GetDevices"
dbus-send --system --print-reply --reply-timeout=120000 --type=method_call --dest='org.freedesktop.NetworkManager' '/org/freedesktop/NetworkManager' org.freedesktop.NetworkManager.GetDevices
echo "ActivateConnection"
echo "service name:$1"
echo "connection path:$2"
echo "device object path:$3"
dbus-send --system --print-reply --reply-timeout=120000 --type=method_call --dest='org.freedesktop.NetworkManager' '/org/freedesktop/NetworkManager' org.freedesktop.NetworkManager.ActivateConnection string:"$1" objpath:"$2" objpath:"$3"
echo "DeactivateConnection"
echo "active connection:$1"
dbus-send --system --print-reply --reply-timeout=120000 --type=method_call --dest='org.freedesktop.NetworkManager' '/org/freedesktop/NetworkManager' org.freedesktop.NetworkManager.DeactivateConnection objpath:$1
echo "Sleep"
dbus-send --system --print-reply --reply-timeout=120000 --type=method_call --dest='org.freedesktop.NetworkManager' '/org/freedesktop/NetworkManager' org.freedesktop.NetworkManager.Sleep boolean:$2
echo "Get org.freedesktop.NetworkManager Property"
echo "Interface:$2 property:$3"
dbus-send --system --print-reply --reply-timeout=120000 --type=method_call --dest='org.freedesktop.NetworkManager' /org/freedesktop/NetworkManager org.freedesktop.DBus.Properties.Get string:"$2" string:"$3"
echo "List user connections"
dbus-send --system --print-reply --reply-timeout=120000 --type=method_call --dest='org.freedesktop.NetworkManagerUserSettings' '/org/freedesktop/NetworkManagerSettings' org.freedesktop.NetworkManagerSettings.ListConnections
echo "List system connections"
dbus-send --system --print-reply --reply-timeout=120000 --type=method_call --dest='org.freedesktop.NetworkManagerSystemSettings' '/org/freedesktop/NetworkManagerSettings' org.freedesktop.NetworkManagerSettings.ListConnections
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]