You are not logged in.

#1 2017-07-28 10:05:46

LongIsland
Member
Registered: 2017-07-28
Posts: 2

[SOLVED] Failed to init libxfconf

I'm trying to setup cronjob for changing the wallpaper. I use XFCE4.
This is my script (daymode.sh):

#!/bin/bash
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/workspace0/last-image -s /home/maciek/Pictures/day.jpg

This is crontab -e:

0 8 * * * . /home/maciek/bin/daymode.sh >> /home/maciek/log.log 2>&1

And the log.log:

Failed to init libxfconf: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead.

Any ideas how can I solve this?
Thanks.

Last edited by LongIsland (2017-07-28 11:57:36)

Offline

#2 2017-07-28 11:09:41

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: [SOLVED] Failed to init libxfconf

You can try to set the dbus variable in your bash script. With systemd it should normally be

export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$UID/bus"

You can also use a systemd user instance timer unit I think. See manpages for systemd.unit, systemd.timer, and systemd.service.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#3 2017-07-28 11:57:07

LongIsland
Member
Registered: 2017-07-28
Posts: 2

Re: [SOLVED] Failed to init libxfconf

progandy wrote:

You can try to set the dbus variable in your bash script. With systemd it should normally be

export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$UID/bus"

You can also use a systemd user instance timer unit I think. See manpages for systemd.unit, systemd.timer, and systemd.service.

Setting the dbus variable worked. Thanks!

Offline

Board footer

Powered by FluxBB