On 11/01/2024 21:10, Valerio Vanni wrote:
There is a .Quit, but for this I already have "kill" command and I have
to start it again.
Applications might handle D-Bus messages more gracefully than SIGINT or
SIGTERM signals. However in the case of kaffeine it is unlikely that
some data may be lost.
valerio@newton:~$ busctl --user introspect org.mpris.kaffeine /
I assume that "org/mpris/MediaPlayer2" after "/" was lost during copy&paste.
org.freedesktop.MediaPlayer interface - - -
.Identity method - s -
.MprisVersion method - (qq) -
.Quit method - - -
Looks quite useless. Does ".Stop" appear when kaffeine is playing some
channel?
lsof | grep /dev/dvb shows
10315 ? S 0:00
/lib/x86_64-linux-gnu/libexec/kf5/kioslave5
/usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/kio/tags.so tags
local:/run/user/1000/kaffeinerCGcGi.1.kioworker.socket
So it is baloo (former nepomuk) search framework. A crazy idea is to add
/dev to the list of directories that should not be indexed. I would try
to disable baloo completely to see if behavior in respect to rmmmod changes.
I am surprised that it dies immediately if you kill kaffeine.
Actually I run out of ideas. It seems you have a working solution and
further polishing is optional.
On 10/01/2024 01:32, Valerio Vanni wrote:
So systemd-run should talk to the systemd --user instance. I have tried to set
XDG_RUNTIME_DIR="/run/user/1000"
BUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"
in setpriv ... env, but systemd requires authentication.
I don't see authentication requests, but it still stays under system.slice.
By mistake, I tried something like (missed --user)
setpriv --reuid 1000 --regid 1000 --init-groups --reset-env -- \
env XDG_RUNTIME_DIR="/run/user/1000" \
systemd-run --slice=app.slice -- \
xterm
and I wrongly decided that systemd *user* session rejects D-Bus messages
basing on some process attributes, e.g. looking into /proc/PID/sessionid
(set by pam_loginuid) and comparing it with logind state (loginctl
list-sessions). The user is not added to any groups with higher
privileges. Fortunately proper command works and no tricks are required
besides setting the path where D-Bus socket should be found.