You are not logged in.
Pages: 1
Here is a script and it works, but fails to run with cron:
#!/bin/bash
xfconf-query -c xfce4-desktop \
-p /backdrop/screen0/monitor0/workspace0/last-image \
-s /home/user/Pictures/wallpaper.png
But the cronie does not want to execute it (for example, notify-send works good).
Log:
CMDOUT (Failed to init libxfconf: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead.)
I suppose it's a problem with dbus.
Here is my question also:
http://stackoverflow.com/questions/4355 … using-cron
May be i have to use another tool, but interesting - what's a trouble?
Thanks!
Web oriented programmer
Offline
Hello and welcome.
This command works for me on Arch:
* * * * * DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus /usr/bin/xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorLVDS1/workspace0/last-image -s /home/toz/Pictures/Arc/699086.png
However, looking at the stackexchange post, it doesn't look like your session dbus is being properly set. On Arch, how do you start Xfce? Do you use a display manager? If so which one? Or are you using startx/.xinitrc?
One potential workaround you could use is simply replacing the wallpaper.png with a new image. xfdesktop will monitor the file and if the file changes, it will refresh the desktop. That way, you only need to have cron overwrite wallpaper.png with a new file.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Hi, thanks for the reply! My lightdm.service is inactive. I use sddm and my wm is xfwm4 (without .xinitrc in my home dir).
Web oriented programmer
Offline
Assuming you are using your Arch system, what do the following commands return?
env | grep -i dbus
pacman -Qi xfce4-session
fgrep -ri dbus-launch ~/.cache/sessions/
Also, are you using Arch proper or one of the derivative distros (manjaro, antegeros, etc)?
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
It's Arch Linux. 3-rd output part is empty
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-Q2j5HzezrV,guid=01592909c43b40b83c888eb758fe34e9
DBUS_SESSION_BUS_PID=1419
Name : xfce4-session
Version : 4.12.1-6
Description : A session manager for Xfce
Architecture : x86_64
URL : http://www.xfce.org/
Licenses : GPL2
Groups : xfce4
Provides : None
Depends On : libxfce4ui libwnck libsm polkit xorg-iceauth xorg-xinit xorg-xrdb
polkit-gnome hicolor-icon-theme
Optional Deps : gnome-keyring: for keyring support when GNOME compatibility is enabled
xscreensaver: for locking screen with xflock4
gnome-screensaver: for locking screen with xflock4
xlockmore: for locking screen with xflock4
slock: for locking screen with xflock4
Required By : None
Optional For : None
Conflicts With : None
Replaces : xfce-utils
Installed Size : 1974.00 KiB
Packager : Evangelos Foutras <evangelos@foutrelis.com>
Build Date : Fri Mar 3 08:22:20 2017
Install Date : Sun Mar 5 03:19:35 2017
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature
¯ \ _ (ツ) _ / ¯
Last edited by DopustimVladimir (2017-04-24 17:46:04)
Web oriented programmer
Offline
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-Q2j5HzezrV,guid=01592909c43b40b83c888eb758fe34e9 DBUS_SESSION_BUS_PID=1419
Your DBus Session Address isn't set correctly. It should be something like:
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
Are you still using dbus-launch anywhere? I asked you to search your saved sessions in case something was saved in there from before, but can you search for that string elsewhere in your system? Maybe /etc and /usr and ~/.config .
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Pages: 1
[ Generated in 0.009 seconds, 7 queries executed - Memory usage: 546.6 KiB (Peak: 547.45 KiB) ]