Artificial intelligent assistant

Customize xfce suspend command Is there a way to change the command executed by `xfce4-power-manager` when it wants to suspend? I assume it runs `xfce4-session-logout --suspend`, but I would like it to run `xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -s false && xfce4-session-logout --suspend` instead. Is there a way to do this?

I managed to get it working by placing a script in the following location: `/lib/systemd/system-sleep/`. The script contained the following:


#!/bin/sh
DBUS_SESSION_BUS_ADDRESS=unix:path=/usr/user/UID/bus su USER -c "xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -s false"


UID should be replaced by the relevant user id (`$ id -u`), and USER by the name of the user the script is for (`$ whoami`).

I tested jbrock's answer, and that also seemed to work, although I find the systemd option slightly cleaner since it doesn't redirect any command references.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 0b6c48e92394142107b1e6f6e99c24d2