This forum has been archived. All content is frozen. Please use KDE Discuss instead.

qdbus and ssh

Tags: None
(comma "," separated)
novazur
Registered Member
Posts
41
Karma
0
OS

qdbus and ssh

Mon Mar 26, 2018 11:11 pm
Hi,

For several years, I use my own script to Inhibit/UnInhibit power management by ssh, to disable automatic suspend during update process. All work fine (initiated here viewtopic.php?f=66&t=118646)
Now, I'm installing a new laptop, always with gentoo.
Locally, I can do :
Code: Select all
inhibit_cookie=$(qdbus org.freedesktop.PowerManagement.Inhibit /org/freedesktop/PowerManagement/Inhibit Inhibit "suspend" "need")
to Inhibit, then
Code: Select all
qdbus org.freedesktop.PowerManagement.Inhibit /org/freedesktop/PowerManagement/Inhibit UnInhibit $inhibit_cookie
to UnInhibit.
But, if I do it by ssh, I get
Code: Select all
Cannot find '.Inhibit' in object /org/freedesktop/PowerManagement/Inhibit at org.freedesktop.PowerManagement.Inhibit

Service 'org.freedesktop.PowerManagement.Inhibit' does not exist.


My simple code to test is :
Code: Select all
christophe@svs15 ~ $ cat /home/christophe/tmp/test.sh
#!/bin/bash
export DISPLAY=":0"
echo "$USER"
inhibit_cookie=$(qdbus org.freedesktop.PowerManagement.Inhibit /org/freedesktop/PowerManagement/Inhibit Inhibit "suspend" "need")
echo $inhibit_cookie
qdbus org.freedesktop.PowerManagement.Inhibit /org/freedesktop/PowerManagement/Inhibit UnInhibit $inhibit_cookie

And I call it from another PC with :
Code: Select all
ssh -x christophe@svs15 /home/christophe/tmp/test.sh


That's not a problem with the USER, the command, or the script because all of this work on others PC, and /home is a nfs mount.
So that's a problem with my new install, and I can't find what I've forgot. Surely something very stupid.
consolekit and dbus services running (And inhibit *works* locally in my plasma session)

Thanks for you help.
novazur
Registered Member
Posts
41
Karma
0
OS

Re: qdbus and ssh

Fri Mar 30, 2018 4:07 pm
More simple, X session opened each time, /home is a nfs mount, centralized authentication with ldap :
Code: Select all
$ ssh regine@medion "qdbus org.freedesktop.PowerManagement"
/
/MainApplication
/local
/local/org_kde_powerdevil
/org
/org/freedesktop
/org/freedesktop/PowerManagement
/org/freedesktop/PowerManagement/Inhibit
/org/kde
/org/kde/Solid
/org/kde/Solid/PowerManagement
/org/kde/Solid/PowerManagement/Actions
/org/kde/Solid/PowerManagement/Actions/HandleButtonEvents
/org/kde/Solid/PowerManagement/Actions/SuspendSession
/org/kde/Solid/PowerManagement/PolicyAgent

Code: Select all
$ ssh regine@svs15 "qdbus org.freedesktop.PowerManagement"
Service 'org.freedesktop.PowerManagement' does not exist.

diff medion://etc and svs15://etc doesn't show anything really different to explain that.
novazur
Registered Member
Posts
41
Karma
0
OS

Re: qdbus and ssh

Tue Jun 25, 2019 12:09 am
One year later, no more idea ?


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]