Reply
Thread Tools
Posts: 24 | Thanked: 8 times | Joined on Dec 2009
#1
Hi,

I'm trying to run some dbus-send commands as an unprivileged user (which I called "myremote"), but none of them work.

the same commands, if issued by "root" or "user", work perfectly.

for example, I can run as root this command:
Code:
dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:"silent"
and put the phone to silent mode.

however, if trying to run it as "myremote", i get the following:
Code:
Failed to open connection to "session" message bus: (null)
i've read from here that I could try the following
Code:
eval $(dbus-launch --sh-syntax)
export DBUS_SESSION_BUS_ADDRESS
export DBUS_SESSION_BUS_PID
run-standalone.sh dbus-send <etc. etc. command here>
but still no result.

any hints?
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#2
Second paragraph here: http://www.freedesktop.org/wiki/Software/dbus

There is one session dbus and one system dbus. Your error message states that you failed to get to talk to a session dbus. You need to talk to the system dbus.
 

The Following User Says Thank You to Joorin For This Useful Post:
Posts: 24 | Thanked: 8 times | Joined on Dec 2009
#3
Thank you for your reply.

Ok, so I think adding "--system" should do it (or should have done it).

I came out with the following, but I still have an error and no effect
Code:
run-standalone.sh dbus-send --system  --print-reply --dest=com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer /com/nokia/mafw/renderer/gstrenderer com.nokia.mafw.renderer.next
Error org.freedesktop.DBus.Error.ServiceUnknown: The name com.nokia.mafw.renderer.Mafw-Gst-Renderer-Plugin.gstrenderer was not provided by any .service files
I tried also the "eval $(dbus-launch --sh-syntax) etc." part, with no luck.

Also, I'm not sure I need to talk to the system dbus: the same command run as root requires --session, it won't work with --system!
 
Posts: 44 | Thanked: 11 times | Joined on Oct 2009 @ UK, Manchester
#4
simple answer is to run your prog with root privs?
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 12:56.