I have the problem described in I probably disallowed using the camera at some time in the past and now can’t find a way to allow it again. How can I reenable it? .
However, when I try the dbus commands in that post, I get errors indicating I don’t have any properties for a camera in that particular location. How do I search for camera properties in the entire DBus hierarchy?
[archer@kitty ~]$ dbus-send --print-reply --dest=org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop org.freedesktop.DBus.Properties.GetAll string:"org.freedesktop.portal"
Error org.freedesktop.DBus.Error.NameHasNoOwner: Could not activate remote peer 'org.freedesktop.portal.Desktop': startup job failed
[archer@kitty ~]$ dbus-send --print-reply --dest=org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop org.freedesktop.DBus.Properties.Get string:"org.freedesktop.portal.Camera" string:"IsCameraPresent"
Error org.freedesktop.DBus.Error.NameHasNoOwner: Could not activate remote peer 'org.freedesktop.portal.Desktop': startup job failed
(No, I’m not a DBus expert.)
Is there some way to look for “camera” in the entire hierarchy? Otherwise, any recommendations on what I should try next?
Edit:
If I run the first command with root, I do get a response:
[archer@kitty ~]$ sudo dbus-send --print-reply --dest=org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop org.freedesktop.DBus.Properties.Get string:"org.freedesktop.portal.Camera" string:"IsCameraPresent"
method return time=1788626662.505204 sender=:1.2 -> destination=:1.14 serial=112 reply_serial=2
variant boolean false
The camera is connected and works fine with Cheese.
Second edit:
Yes, I tried using sudo just to see if that was required. I’ll stop using it.
Journalctl log has many repetitions of the following:
Sep 05 11:25:35 kitty systemd[2426]: graphical-session.target - Current graphical user session is inactive.
Sep 05 11:25:35 kitty systemd[2426]: Dependency failed for xdg-desktop-portal.service - Portal service.
Sep 05 11:25:35 kitty systemd[2426]: xdg-desktop-portal.service: Job xdg-desktop-portal.service/start failed with result 'dependency'.
I’m digging into that now. (I’m using XFCE with lightdm instead of gnome & gdm.)
Third edit:
Based on https://bbs.archlinux.org/viewtopic.php?id=313883 , I changed the Requisites for xdg-desktop-portal.service to dbus.service .
[archer@kitty ~]$ systemctl –user edit –full xdg-desktop-portal.service
[Unit]
Description=Portal service
PartOf=graphical-session.target
#Requisite=graphical-session.target # removed = workaround
Requisite=dbus.service
After=graphical-session.target
[Service]
Type=dbus
BusName=org.freedesktop.portal.Desktop
ExecStart=/usr/libexec/xdg-desktop-portal
Slice=session.slice
[archer@kitty ~]$ systemctl –user start xdg-desktop-portal.service
Checking whether the camera is present now seems to work:
[archer@kitty ~]$ dbus-send --print-reply --dest=org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop org.freedesktop.DBus.Properties.Get string:"org.freedesktop.portal.Camera" string:"IsCameraPresent"
method return time=1788637406.234949 sender=:1.363 -> destination=:1.370 serial=132 reply_serial=2
variant boolean true
I think the application camera lookup works now:
[archer@kitty ~]$ dbus-send --print-reply --dest=org.freedesktop.impl.portal.PermissionStore /org/freedesktop/impl/portal/PermissionStore org.freedesktop.impl.portal.PermissionStore.Lookup string:"devices" string:"camera"
method return time=1788638550.302860 sender=:1.262 -> destination=:1.381 serial=38 reply_serial=2
array [
dict entry(
string "org.mozilla.firefox"
array [
string "yes"
]
)
]
variant byte 0
I’ve restarted firefox, but it still doesn’t have access to the camera.
Final edit:
Actually, since grawity answered my title question, I suspect I should mark that answer as correct and start a new question…