Closed rizitis closed 1 month ago
If I check log file I have this error when I call daemon on startup: cat timewall.log Error: no image to set given
I solved it by creating a desktop.entry in ~/.config/autostart/
This way no rc.script or anything else needed. After $USER login timewall set /path/to/image
executed and everything is ok.
Hi! I see that you already solved the issue but I will share my thoughts anyway.
Am I correct in the assumption that your rc script was ran as root? timewall stores its data, including the currently set wallpaper, in the home directory of the user who runs it. So if your daemon runs as root, it won't be able to see settings made using your regular user account. Basically, you need to run all timewall commands as the same user.
You could work around that by overriding the cache directory using TIMEWALL_CACHE_DIR
env variable. Just a warning that it's undocumented, exists mainly for tests and isn't really a feature.
thanks for answer. you are 100% right!
when i noticed that calling timewall from rc.local as root was the problem i found the solution to call it from ~/.config/autostart/
because I want a KISS and global solution for all Desktop Environments .
> cat run_timewall.desktop
[Desktop Entry]
Type=Application
Exec=/usr/bin/timewall set /home/omen/Pictures/Backgrounds/City.heic
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=Run Timewall
Comment=Runs Timewall script at login
But this TIMEWALL_CACHE_DIR option you suggested is something very interesting and I would play with it for sure...
First idea inspired from cache_dir... was to edit exec in desktop entry like this:
[Desktop Entry]
Type=Application
Exec=sh -c '/usr/bin/timewall set $(readlink -f /home/omen/.cache/timewall/last_wall)'
....
which work fine!
Second idea is a separate script, (assume a folder with some images.heic exist)
./cyclic_wallpapers.sh > /dev/null 2>&1 &
#!/bin/bash
image_folder="/home/omen/Pictures/Backgrounds"
while true; do
for image in "$image_folder"/*; do
ln -sf "$image" ~/.cache/timewall/last_wall
/usr/bin/timewall set $(readlink -f ~/.cache/timewall/last_wall)
sleep 120
done
done
Any way I will follow your project :) regards!
Hello, thanks for your nice work!
I have build and install, {as package }, timewall-1.2.0 for Slackware-current. My
~/.config/timewall/config.toml
is:I also use rc.timewall script to call
timewall set --daemon
on startup:My issue is this:
After reboot although daemon is up and wallpaper is the last one I used. Wallpaper status stuck in the status before last shutdown.
For example if I shutdown laptop 12:00am and power on again 8:00 am, wallpaper will stuck in 12:00am status and not refresh although daemon is ranning.
And If I ran manually
timewall set /path/to/image.heic
then immediately switch to the correct status and following time cycle as excepted during day time!I was wondering if you have any suggestions how I can handle this "personal" issue?
thank you.