Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
0 answers
17 views
Why doesn't org.bluez.MediaPlayer1 appear when my Raspberry Pi connects to my iPhone via Bluetooth?
I'm using a Raspberry Pi with BlueZ 5.66 and Linux 6.6. I want to use the Pi as a Bluetooth audio sink (A2DP) and AVRCP controller so I can stream audio from an iPhone and control playback (play/pause/next/etc) via D-Bus using the `org.bluez.MediaPlayer1` interface. This works correctly when the iPh...
I'm using a Raspberry Pi with BlueZ 5.66 and Linux 6.6. I want to use the Pi as a Bluetooth audio sink (A2DP) and AVRCP controller so I can stream audio from an iPhone and control playback (play/pause/next/etc) via D-Bus using the org.bluez.MediaPlayer1 interface. This works correctly when the iPhone initiates the Bluetooth connection to the Pi. I can see the MediaPlayer1 interface under the device path on D-Bus, and playback control works. However, if I initiate the connection from the Pi using:
bluetoothctl connect XX:XX:XX:XX:XX:XX
…the connection succeeds, but org.bluez.MediaPlayer1 never appears. Even if I start playback on the iPhone afterward, the interface is still missing. I'm using BlueZ as the Bluetooth stack and BlueALSA for audio. I'm not using PulseAudio and would prefer to avoid it due to its complexity. From what I understand, MediaPlayer1 is exposed by BlueZ when acting as an AVRCP controller and detecting a remote media player. Is there a way to force or trigger org.bluez.MediaPlayer1 to appear when the Pi initiates the Bluetooth connection to the iPhone? Are there any known limitations, timing issues, or configuration-based workarounds that would allow this to work more reliably (ideally without switching to PulseAudio)? **Steps to reproduce:** 1. Pair and trust the iPhone:
bluetoothctl
   power on
   agent on
   default-agent
   pair XX:XX:XX:XX:XX:XX
   trust XX:XX:XX:XX:XX:XX
   connect XX:XX:XX:XX:XX:XX
2. Start music playback on the iPhone. 3. Check D-Bus for /player0:
busctl tree org.bluez
**Expected:** A /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/player0 path should appear, with org.bluez.MediaPlayer1 exposed. **Actual:** That path and interface only appear if the iPhone initiates the Bluetooth connection to the Pi. They never appear if the Pi initiates the connection.
joeyvanlierop (1 rep)
Jul 28, 2025, 07:05 PM
3 votes
0 answers
81 views
Hibernation does not work under normal user
I have a problem with hibernating my computer. Everything was working before an update. The update installed Plasma 6.3.5. Hibernating from the start menu doesn't work either. After the update, the following command reports an error under normal user: ``` $ loginctl hibernate Error registering authe...
I have a problem with hibernating my computer. Everything was working before an update. The update installed Plasma 6.3.5. Hibernating from the start menu doesn't work either. After the update, the following command reports an error under normal user:
$ loginctl hibernate
Error registering authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot determine user of subject (polkit-error-quark, 0)
However, under root, the
$ loginctl hibernate
works as expected. A normal user is a member of these groups:
$ id
uid=1000(ibarina) gid=1000(ibarina) groups=1000(ibarina),6(disk),7(lp),10(wheel),18(audio),27(video),85(usb),100(users),106(lpadmin),250(portage),272(plugdev),377(pcap)
Moreover,
grep loginctl /var/log/everything/current
gives
Jul 17 17:22:49 [loginctl] Failed to hibernate system via elogind: Interactive authentication required.
Installed versions: sys-auth/polkit-126-r1 sys-auth/elogind-255.5-r2
DaBler (101 rep)
Jul 23, 2025, 10:16 AM • Last activity: Jul 28, 2025, 10:10 AM
7 votes
3 answers
3998 views
debian without dbus: login/systemd complains about failing to connect to d-bus after motd
I have barebones raspbian, i.e. basically Debian 8, with systemd and no X. I removed dbus with "apt-get remove dbus". It deinstalled cleanly, with no apparent programs depending on it. Now, whenever I login on the console after the motd I get this line: > Failed to get D-Bus connection: No such file...
I have barebones raspbian, i.e. basically Debian 8, with systemd and no X. I removed dbus with "apt-get remove dbus". It deinstalled cleanly, with no apparent programs depending on it. Now, whenever I login on the console after the motd I get this line: > Failed to get D-Bus connection: No such file or directory What's the source of that message, and how can I make it stop? Must be something somewhere in /etc I can set, right? It looks like systemd still thinks there is a dbus. There is still a dbus.service which I manually disabled with systemctl, just to be sure. It complained (inserv warning current start runlevel(s) (empty) of script dbus overrides LSB defaults ....) but, all my services do seem normal; I don't know for sure. Running "systemctl start anythinghere" as non-root produces the same error. So user-level privilege systemd, whatever it is called, appears to be the source but I don't have systemd-logind running on my system, and I don't understand how /bin/login is calling systemd.
Tibinah (71 rep)
Dec 21, 2016, 03:42 AM • Last activity: Jul 7, 2025, 01:04 AM
4 votes
1 answers
197 views
How does BusCtl compare to QDBus?
`busctl` is from `systemd`, whereas `dbus-qt6` (and `dbus`) are from `qt6-qttools`. These are very different projects, yet these tools perform the same purpose. Considering that both are fundamentally necessary to have installed at the same time as a user of a SystemD-based Linux distribution (Fedor...
busctl is from systemd, whereas dbus-qt6 (and dbus) are from qt6-qttools. These are very different projects, yet these tools perform the same purpose. Considering that both are fundamentally necessary to have installed at the same time as a user of a SystemD-based Linux distribution (Fedora) and Qt-based DE (KDE Plasma), which should I utilise, and when? If an example is necessary, consider: 1. busctl --user call org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver Lock 1. qdbus-qt6 org.freedesktop.ScreenSaver /ScreenSaver Lock
RokeJulianLockhart (541 rep)
Jul 4, 2025, 01:51 PM • Last activity: Jul 4, 2025, 05:23 PM
0 votes
2 answers
3043 views
NetworkManager does not save wifi passwords
I'm trying to use D-bus method `AddAndActivate` connection on interface `org.freedesktop.NetworkManager` to create a wifi connection. I definitely pass a PreSharedKey field with the password, but NetworkManager ignores this field, fails on connection activation and asks for a password when I try to...
I'm trying to use D-bus method AddAndActivate connection on interface org.freedesktop.NetworkManager to create a wifi connection. I definitely pass a PreSharedKey field with the password, but NetworkManager ignores this field, fails on connection activation and asks for a password when I try to use nmcli c up . Any ideas how to force it to save the password?
Edward (101 rep)
May 16, 2020, 05:44 PM • Last activity: Jun 15, 2025, 11:04 AM
2 votes
1 answers
2271 views
Setup .pkla rule for polkit
I'd like to start a systemd service using DBus in one of my apps which is run as non-root user `myuser`. For that I need to set up a PolicyKit where I'm using polkit 0.105 and added the following .pkla file to `/etc/polkit-1/localauthority/50-local.d` ```[Test polkit] Identity=unix-user:myuser Actio...
I'd like to start a systemd service using DBus in one of my apps which is run as non-root user myuser. For that I need to set up a PolicyKit where I'm using polkit 0.105 and added the following .pkla file to /etc/polkit-1/localauthority/50-local.d
[Test polkit]
Identity=unix-user:myuser
Action=org.freedesktop.systemd1.manage-unit-files;org.freedesktop.systemd1.manage-units
ResultActive=yes
ResultInactive=yes
Hoewever, that somehow didn't help it as I'm still getting the error Permission denied from DBus when it's runned as myuser where it works when started by root. As I understood polkit so far that's actually the way to set it up. What wonders me as well is that when executing pkaction it just returns nothing. Does polkit need some further setup? I just installed it via apt-get on an ubunutu 19.04 box.
plazmakeks (191 rep)
Jun 21, 2019, 10:10 AM • Last activity: Jun 14, 2025, 03:06 PM
2 votes
1 answers
5308 views
How to list all object paths under a dbus service only usign dbus command-line utility?
How can I list the object path under a dbus services using ONLY `dbus-send` command line utility? For now, I can only list services: dbus-send --system --dest=org.freedesktop.DBus --type=method_call --print-reply /org/freedesktop/DBus org.freedesktop.DBus.ListNames or interfaces: dbus-send --system...
How can I list the object path under a dbus services using ONLY dbus-send command line utility? For now, I can only list services: dbus-send --system --dest=org.freedesktop.DBus --type=method_call --print-reply /org/freedesktop/DBus org.freedesktop.DBus.ListNames or interfaces: dbus-send --system --dest=org.freedesktop.DBus --type=method_call --print-reply /org/freedesktop/DBus org.freedesktop.DBus.Introspectable.Introspect This question is very similar to: https://unix.stackexchange.com/questions/203410/how-to-list-all-object-paths-under-a-dbus-service but it requires to use some utilities that are not available to me. I use a closed embedded system and I cannot install anything, so I cannot use any of the following utilities: - qdbusviewer - qdbus - d-feet - python
Luis (21 rep)
May 12, 2022, 07:31 AM • Last activity: Jun 9, 2025, 06:04 AM
5 votes
2 answers
5617 views
GCP: Debian stuck at setting up dbus
I have been trying to install GUI, i.e. gnome and lxde, into Debian 9 stretch in google cloud computing instance. I have even increased the cpu, ram, harddisk size. However, the installation is always stuck at "Setting up dbus (1.10.26-0+deb9u1)" My last attempt is letting it sit for 6 hours now. It...
I have been trying to install GUI, i.e. gnome and lxde, into Debian 9 stretch in google cloud computing instance. I have even increased the cpu, ram, harddisk size. However, the installation is always stuck at "Setting up dbus (1.10.26-0+deb9u1)" My last attempt is letting it sit for 6 hours now. It's still stuck there. What can I do? Thanks and Regards Edit1: I found this line. Does this have to do with this error? Setting up rtkit (0.11-4+b1) ... Created symlink /etc/systemd/system/graphical.target.wants/rtkit-daemon.service → /lib/systemd/system/rtkit-daemon.service. Job for rtkit-daemon.service failed because a timeout was exceeded. See "systemctl status rtkit-daemon.service" and "journalctl -xe" for details. rtkit-daemon.service couldn't start. Edit2: I shutdown the instance and get thefollowing. Not sure if this may mean anything or not related at all - again because I forced shutdown the system. Setting up dbus (1.10.26-0+deb9u1) ... Job for dbus.service canceled. invoke-rc.d: initscript dbus, action "start" failed. ● dbus.service - D-Bus System Message Bus Loaded: loaded (/lib/systemd/system/dbus.service; static; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2018-05-02 21:38:17 UTC; 31min ago Docs: man:dbus-daemon(1) Main PID: 15748 (code=exited, status=1/FAILURE) May 02 21:37:52 instance-2 systemd: Started D-Bus System Message Bus. May 02 21:37:52 instance-2 dbus-daemon: Failed to start message bus: Could not get UID and GID for username "messagebus" May 02 21:38:17 instance-2 systemd: dbus.service: Main process exited, code=exited, status=1/FAILURE May 02 21:38:17 instance-2 systemd: dbus.service: Unit entered failed state. May 02 21:38:17 instance-2 systemd: dbus.service: Failed with result 'exit-code'. dpkg: error processing package dbus (--configure): subprocess installed post-installation script returned error exit status 1
Call Me Hi Hi (201 rep)
May 3, 2018, 03:01 AM • Last activity: Jun 7, 2025, 10:01 PM
0 votes
0 answers
31 views
GDbus service not found but exists
I tried running Vinegar by `flatpak run org.vinegarhq.Vinegar` but it spits out the error when I click "login with browser" (should launch browser with login url) ``` WINE Failed to call portal: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.portal.Desktop was not pr...
I tried running Vinegar by flatpak run org.vinegarhq.Vinegar but it spits out the error when I click "login with browser" (should launch browser with login url)
WINE Failed to call portal: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.portal.Desktop was not provided by any .service files
but it is provided by a .service file! /usr/share/dbus-1/services/org.freedesktop.portal.Desktop.service
[D-BUS Service]
Name=org.freedesktop.portal.Desktop
Exec=/usr/lib/xdg-desktop-portal
SystemdService=xdg-desktop-portal.service
AssumedAppArmorLabel=unconfined
I am on Artix Linux Plasma with both xdg-desktop-portal and xdg-desktop-portal-kde installed.
ickylizardcolin (1 rep)
Jun 5, 2025, 02:05 PM
0 votes
1 answers
545 views
Singularity on RHEL-8: failed to connect to dbus
I am using Singularity on RHEL-8. I just upgraded to cgroupsv2 so that I could throttle resource usage. I also delegate CPU controller permissions in my `/etc/systemd/system/user@.service.d/override.conf` as described [here](https://github.com/systemd/systemd/issues/18293). So far, so good. So I try...
I am using Singularity on RHEL-8. I just upgraded to cgroupsv2 so that I could throttle resource usage. I also delegate CPU controller permissions in my /etc/systemd/system/user@.service.d/override.conf as described [here](https://github.com/systemd/systemd/issues/18293) . So far, so good. So I try to run: singularity run --cpus 0.8 container.sif. I get the following error (some of the random strings randomized and shortened): > FATAL: container creation failed: while applying cgroups config: while creating cgroup manager: failed to connect to dbus (hint: for rootless containers, maybe you need to install dbus-user-session package, see https://github.com/opencontainers/runc/blob/master/docs/cgroup-v2.md) : could not execute busctl --user --no-pager status (output: "Failed to get credentials: No such process\nBusAddress=unix:abstract=/tmp/dbus-4843,guid=35345\nBusScope=user\nBusID=343345\n"): exit status 1 Indeed, if I try busctl --user status, I get a connection refused error. There are some related questions like [this one](https://superuser.com/questions/1561076/systemctl-user-failed-to-connect-to-bus-no-such-file-or-directory-debian-9) and [this one](https://unix.stackexchange.com/questions/615917/failed-to-get-d-bus-connection-connection-refused) , but my dbus session seems to be running fine, and I am not trying to run this as root. What gives?
cag51 (101 rep)
Jun 14, 2024, 08:51 PM • Last activity: May 25, 2025, 08:26 AM
0 votes
0 answers
85 views
DBus Maximum Number of Connections
I normally use playerctl on a daily basis, but recently it has stopped working, giving me the error: Could not connect to players: GDBus.Error:org.freedesktop.DBus.Error.LimitsExceeded: The maximum number of active connections for UID 1000 has been reached How do I check how many connections are act...
I normally use playerctl on a daily basis, but recently it has stopped working, giving me the error: Could not connect to players: GDBus.Error:org.freedesktop.DBus.Error.LimitsExceeded: The maximum number of active connections for UID 1000 has been reached How do I check how many connections are active? How do I increase this limit without rebooting or restarting x.org?
cat pants (167 rep)
Apr 25, 2025, 05:47 AM
3 votes
1 answers
2034 views
Setroubleshoot dbus access error
When running setroubleshootd in fedora, I get this error: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.79" is not allowed to own the service "org.fedoraProject.Setroubleshootd" due to security policies in the configuration file Now I know this has something to do with the dbus policy, eit...
When running setroubleshootd in fedora, I get this error: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.79" is not allowed to own the service "org.fedoraProject.Setroubleshootd" due to security policies in the configuration file Now I know this has something to do with the dbus policy, either in /etc/dbus-1/system.conf or a file in /etc/dbus-1/system.d/ or in /etc/dbus-1/session.conf or a file in /etc/dbus-1/session.d/* But I have no idea what exactly the problem is, what file I need to look at. what policy I need to modify or how I am suposed to modify it.
Mouse.The.Lucky.Dog (2057 rep)
May 6, 2015, 07:39 PM • Last activity: Apr 17, 2025, 05:08 AM
1 votes
1 answers
100 views
Problems with systemd-logind & d-bus on a busy SFTP server
We recently upgraded a high volume CentOS 7 SFTP server running `openssh/internal-sftp` to Rocky Linux 8. However, since the upgrade we are experiencing login timeout issues after the server has been running for 1-2 hours. This seems to be related to the number of open SFTP sessions and/or `systemd...
We recently upgraded a high volume CentOS 7 SFTP server running openssh/internal-sftp to Rocky Linux 8. However, since the upgrade we are experiencing login timeout issues after the server has been running for 1-2 hours. This seems to be related to the number of open SFTP sessions and/or systemd --user processes. After 1-2 hours new SFTP logins become extremely slow and we start seeing these messages in the log
Apr 14 12:16:58 sftp sshd: pam_systemd(sshd:session): Failed to create session: Connection timed out
Sometimes it clears up if enough SFTP sessions are closed fast enough, but more often we have to reboot the server to restore normal service. Would it be advisable to disable systemd-logind as this doesn't seem needed for SSH? **UPDATE**\ Not sure if this is relevant, but systemctl list-units --state=abandoned returns 100's of abandoned sessions. **UPDATE 2**\ After disabling pam_systemd.so system is running normally again. This effectively disables systemd-logind for SSH sessions. 80% reduced system load indicates massive performance penalty using systemd-logind. Is this normal?!
drjeep (125 rep)
Apr 14, 2025, 03:10 PM • Last activity: Apr 15, 2025, 10:39 AM
0 votes
0 answers
204 views
Dbus issue when trying to run Wayland session
My distro is based on Slackware, therefore it doesn't have systemd, but SysVinit + elogind. I'm trying to use LightDM to initiliaze my desktop environment sessions, but I have either dbus services working properly or Wayland working. My `/etc/lightdm/Xsession` file is like this: ``` [ -z "$BASH" ] &...
My distro is based on Slackware, therefore it doesn't have systemd, but SysVinit + elogind. I'm trying to use LightDM to initiliaze my desktop environment sessions, but I have either dbus services working properly or Wayland working. My /etc/lightdm/Xsession file is like this:
[ -z "$BASH" ] && exec $SHELL --login $0 "$@"
shopt -q login_shell || exec $SHELL --login $0 "$@"
set +o posix

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

[ -f $sysresources ] && xrdb -merge $sysresources
[ -f $sysmodmap ] && xmodmap $sysmodmap
[ -f $userresources ] && xrdb -merge $userresources
[ -f $usermodmap ] && xmodmap $usermodmap

dbus-launch --exit-with-session $@
It works fine, except if I want to start a Wayland session, which in this case it doesn't load in LXQt 2.1.0 or Cinnamon 6.4.9. The log ~/.xsession-errors says something like:
dbus-update-activation-environment: error: unable to connect to D-Bus: Failed to connect to socket /tmp/dbus-6WcQhFZXE2: No such file or directory
If I change the last line of /etc/lightdm/Xsession to dbus-run-session -- $@, then the Wayland sessions work, however some services stop working properly due to a dbus problem. For instance, cron daemon (crond), which is executed in a boot script that runs before Xsession: if cron is set to shutdown my Xfce session, it doesn't find the Xfce dbus session: cron error due to dbus problem Also, when using Wayland the error above always happens. Is there a clean solution that fixes the issues I'm facing?
Fulalas (119 rep)
Apr 5, 2025, 10:59 AM • Last activity: Apr 5, 2025, 11:29 AM
0 votes
0 answers
111 views
How to wait the end of a non-child process?
I have here a not really fine app, partially out of my control. Sometimes it stops and I want to restart it, and some extra options. So, if it exists, I want to start my script. Poor man solution would be to check it in a loop, if it runs. I am thinking on a better solution. If it would be a child p...
I have here a not really fine app, partially out of my control. Sometimes it stops and I want to restart it, and some extra options. So, if it exists, I want to start my script. Poor man solution would be to check it in a loop, if it runs. I am thinking on a better solution. If it would be a child process, or it would have at least some console-only debug mode, that would be very simple. But it has not. It actually daemonizes itself into a dbus service, and it is doing that as a closed source app... However, fortunately I have a shell environment to deal with it. But I really, really don't like to poll the process if it is still running. So it would be trivial. But I want to *wait for the event that is had exited*. I repeat, I have no control over it, it is a closed source tool, restarting itself as a dbus service. I can find it with a script, and then I could wait its exit, but how? How can I wait for the exit of a non-child process?
peterh (10448 rep)
Feb 24, 2025, 01:37 PM • Last activity: Feb 24, 2025, 08:23 PM
2 votes
1 answers
351 views
DBus Policy that Allows Group to Access System Service
I wrote a dbus service and have it listening on the system bus, under the bus name "org.jfhbrook.plusdeck" and the path "/". That seems to be working fine. I have a corresponding dbus client that I'd like to use to interact with that system bus service, either if I'm the root user (called with sudo)...
I wrote a dbus service and have it listening on the system bus, under the bus name "org.jfhbrook.plusdeck" and the path "/". That seems to be working fine. I have a corresponding dbus client that I'd like to use to interact with that system bus service, either if I'm the root user (called with sudo) or if I'm in a particular group (in this case, the "plusdeck" group). I currently have this policy file, based on [the dbus-daemon docs](https://dbus.freedesktop.org/doc/dbus-daemon.1.html) and cribbing from whatever examples I could find:
This works when I use sudo. However, when I use the same client with my user, which is a member of the plusdeck group, I get an error:
ERROR:plusdeck.dbus.client:org.freedesktop.DBus.Error.AccessDenied: Access to org.jfhbrook.plusdeck.Eject() not permitted.
Note that this is a different error than I'd get if I didn't have access to the bus - that would be ERROR:plusdeck.dbus.client:org.freedesktop.DBus.Error.AccessDenied: Sender is not authorized to send message. It seems I'm authorized to send messages, but not to call that method. I've tried combinations of everything I can think of, including setting send_member="*" in the allow tag, as well as ``. I'm at my wit's end. Any help or guidance would be appreciated. For what it's worth, I'm using Fedora 41. I mention this because I'm aware that my issue could be outside this configuration, for instance with SELinux. Though, I believe seeing nothing in /var/log/audit/audit.log rules that out.
Josh Holbrook (151 rep)
Feb 8, 2025, 02:45 AM • Last activity: Feb 9, 2025, 08:38 PM
1 votes
2 answers
407 views
Force polkit to use a textual authentication agent in a GUI session
I am using the Secureblue Linux distro and I don't like the fact that when I run a script that eventually invokes run0, and leave it running and do something else while I'm waiting, I eventually get a popup all of a sudden prompting me to enter my password, and I don't know what it's about! It feels...
I am using the Secureblue Linux distro and I don't like the fact that when I run a script that eventually invokes run0, and leave it running and do something else while I'm waiting, I eventually get a popup all of a sudden prompting me to enter my password, and I don't know what it's about! It feels like it would be much more secure to have the auth prompt as a CLI authentication utility, in the terminal window that the script is running in, so I can tell what I am being expected to approve. However, I tried installing tmux and then running pkttyagent in one tmux pane and the script in another, but the GUI authentication dialog box still popped up, just like before, and pkttyagent didn't do anything. Even when I made them use a fresh, separate dbus session bus using dbus-run-session tmux, it failed the same way.
Robin Green (1299 rep)
Feb 1, 2025, 03:35 PM • Last activity: Feb 5, 2025, 10:52 AM
1 votes
4 answers
665 views
Get a "full" shell for another user that allows using podman/systemd
I log in wish SSH as one user "Ubuntu" on a server. I however want to manage run some systemd services as another user "ABC". If I try to `sudo -u abc bash` as user `ABC` then every `systemd --user` command gives the error: ``` Failed to connect to bus: No medium found ``` I found [this thread](http...
I log in wish SSH as one user "Ubuntu" on a server. I however want to manage run some systemd services as another user "ABC". If I try to sudo -u abc bash as user ABC then every systemd --user command gives the error:
Failed to connect to bus: No medium found
I found [this thread](https://unix.stackexchange.com/a/245866/367146) which suggested adding the following to ~/.bashrc:
export XDG_RUNTIME_DIR="/run/user/$UID"
export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
This changes the error to:
Failed to connect to bus: No such file or directory
Other sources suggested that headless servers don't normally have dbus installed so this makes sense (it appears to be a component of x11). Though I don't know why it works without issue if I run it as ubuntu. I found this [Suggested Workaround](https://unix.stackexchange.com/a/685029/367146)
sudo systemctl -M abc@ --user restart foobar.service
This works for basic start, stop, status but: * systemctl --user cat doesn't work * No variation of journalctl seems to work:
Failed to open root directory of machine 'abc@': The name org.freedesktop.machine 1 was not provided by any .service files
Failed to open journal: No route to host
* It is just very long to type and inconvenient. I really just want a shell for this other user just like when I log into ubuntu and can manage all my user services with no issue. I mention Podman because Podman also is really unhappy when I run it as a different user. It works fine if I use it as ubuntu but get erors if I run it with sudo -u. Like systemd I have some partial workarounds but none seem to work well.
mousetail (113 rep)
Oct 20, 2024, 12:58 PM • Last activity: Jan 20, 2025, 12:29 PM
29 votes
8 answers
37360 views
How to list all object paths under a dbus service?
This is a follow-up question to https://unix.stackexchange.com/questions/46301/a-list-of-available-dbus-services. The following python code will list all available DBus services. import dbus for service in dbus.SystemBus().list_names(): print(service) How do we list out the object paths under the se...
This is a follow-up question to https://unix.stackexchange.com/questions/46301/a-list-of-available-dbus-services . The following python code will list all available DBus services. import dbus for service in dbus.SystemBus().list_names(): print(service) How do we list out the object paths under the services in python? It is ok if the answer does not involve python although it is preferred. I am using Ubuntu 14.04
user768421 (483 rep)
May 14, 2015, 03:04 PM • Last activity: Jan 15, 2025, 05:19 PM
0 votes
2 answers
170 views
How to get monitor state?
I want to turn off the screen after 10 minutes of inactivity, and 1 minute later, **IF** the monitor is still off, then lock the screen. I know how to turn the screen off with `dbus`, how to lock screen, and how to get the screensaver state (i.e., if the screen is locked). But I do not know how to g...
I want to turn off the screen after 10 minutes of inactivity, and 1 minute later, **IF** the monitor is still off, then lock the screen. I know how to turn the screen off with dbus, how to lock screen, and how to get the screensaver state (i.e., if the screen is locked). But I do not know how to get the current monitor state ON/OFF. So I want for KDE to trigger this script after 10 minutes of inactivity: #!/bin/bash sleep 1 dbus-send --session --print-reply --dest=org.kde.kglobalaccel /component/org_kde_powerdevil org.kde.kglobalaccel.Component.invokeShortcut string:'Turn Off Screen' sleep 60 [[ ]] && dbus-send --session --print-reply --dest=org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.Lock So how to query for monitor state (preferably with dbus), namely, the `` condition in the above script? I used to do xset -q | grep -i 'monitor is off', but now I get an error: Server does not have the DPMS Extension.
Luis A. Florit (509 rep)
Jul 23, 2024, 03:23 AM • Last activity: Jan 10, 2025, 06:24 PM
Showing page 1 of 20 total questions