how I can get return code of org.gnome.SessionManager.CanShutsown in JS?

108 views Asked by At

I want to check if shutdown is available to the current user( in javascript, not shell command). I have try this command in shell:

 dbus-send --session --type=method_call --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.CanShutdown

I got the return message"boolen true"

In gnome's documentaion, I can see this line: CanShutdown (out 'b' is_available), but I don't know how to use outsignatue in js.

Can anyone tell me how to do? Or some other documentions. THANK YOU!

0

There are 0 answers