You are not logged in.

#21 2017-01-17 09:13:08

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

Re: Help to display differents pictures every 2 hours

Thanks all for testing, at the moment I have no more time to test what you are purposing. Glad that you use some of my wallpapers shared on the BL site wink see you !

Offline

#22 2017-01-17 10:43:43

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

Re: Help to display differents pictures every 2 hours

I've changed my mind and tested quickly... so I post you my failure results... X) :

raphix@debian:~$ systemctl --user enable wallchanger.timer
raphix@debian:~$ systemctl --user start wallchanger.timer
raphix@debian:~$ systemctl --user list-timers
NEXT                         LEFT       LAST                         PASSED       UNIT              ACTIVATES
mar 2017-01-17 12:00:00 +02  21min left mar 2017-01-17 10:00:10 +02  1h 37min ago wallchanger.timer wallchanger.service

1 timers listed.
Pass --all to see loaded but inactive timers, too.
raphix@debian:~$ systemctl --user start wallchanger.timer
raphix@debian:~$ systemctl --user list-timers
NEXT                         LEFT       LAST                         PASSED       UNIT              ACTIVATES
mar 2017-01-17 12:00:00 +02  19min left mar 2017-01-17 10:00:10 +02  1h 39min ago wallchanger.timer wallchanger.service

1 timers listed.
Pass --all to see loaded but inactive timers, too.
raphix@debian:~$ systemctl --user status wallchanger.{timer,service}
● wallchanger.timer - Change wallpaper at set times.
   Loaded: loaded (/home/raphix/.config/systemd/user/wallchanger.timer; enabled)
   Active: active (waiting) since mar 2017-01-17 07:20:47 +02; 4h 19min ago

● wallchanger.service - Change wallpaper at set times.
   Loaded: loaded (/home/raphix/.config/systemd/user/wallchanger.service; static)
   Active: failed (Result: exit-code) since mar 2017-01-17 10:00:10 +02; 1h 40min ago
 Main PID: 23469 (code=exited, status=1/FAILURE)
raphix@debian:~$ /bin/sh -c "for i in $(/bin/date | /usr/bin/awk -F '[ :]' '{print $4}') ; do /usr/bin/feh --bg-scale $HOME/tmp/$i.png 2>/dev/null ; done"

Thank you again

Last edited by ragamatrix (2017-01-17 10:45:09)

Offline

#23 2017-01-17 11:06:01

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,697

Re: Help to display differents pictures every 2 hours

journalctl _PID=23469

from this meeting 23469 results?

https://wiki.archlinux.org/index.php/Sy … leshooting

Last edited by unklar (2017-01-17 11:15:47)

Offline

#24 2017-01-17 11:38:10

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

Re: Help to display differents pictures every 2 hours

unklar wrote:
journalctl _PID=23469

from this meeting 23469 results?

https://wiki.archlinux.org/index.php/Sy … leshooting

Hä? I don't understand systemd 8o

Offline

#25 2017-01-17 18:49:49

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Help to display differents pictures every 2 hours

^ Can we please see the output of this command (after you have tried to `start` the .timer again):

journalctl --unit wallchanger.service

You may have to either run that command as root or add your user to the "systemd-journal" group with this command then log out & back in again:

sudo gpasswd -a $USER systemd-journal

EDIT: also, did the command that you ran actually change the wallpaper for you?

Was there any error message after that command?

Last edited by Head_on_a_Stick (2017-01-17 18:53:29)

Offline

#26 2017-01-18 08:31:36

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

Re: Help to display differents pictures every 2 hours

Thanks for your patience... I've also noticied that in the script wallchanger.service the pictures called were in a .png and I've modified the line like this because I'm using .jpg pics:

ExecStart=/bin/sh -c "for i in $(/bin/date | /usr/bin/awk -F '[ :]' '{print $4}') ; do /usr/bin/feh --bg-scale $HOME/.xplanet/images/Earth_HD/earth-hd/HPH-MAPS/$i.jpg 2>/dev/null ; done"

Return code error before rebooting:

raphix@debian:~$ systemctl --user start wallchanger.timer
raphix@debian:~$ journalctl --unit wallchanger.service
No journal files were found.
raphix@debian:~$ systemctl --user enable wallchanger.timer
raphix@debian:~$ systemctl --user start wallchanger.timer
raphix@debian:~$ journalctl --unit wallchanger.service
No journal files were found.
raphix@debian:~$ sudo gpasswd -a $USER systemd-journal
[sudo] password for raphix: 
Ajout de l'utilisateur raphix au groupe systemd-journal
raphix@debian:~$ journalctl --unit wallchanger.service
No journal files were found.
raphix@debian:~$ 

Offline

#27 2017-01-18 08:55:36

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

Re: Help to display differents pictures every 2 hours

after rebooting, no errors, nothing displayed on the screen, waiting for 10:00 ? :
1484729619.png

Offline

#28 2017-01-18 09:13:37

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

Re: Help to display differents pictures every 2 hours

nothing happened, I tryed this too:

raphix@debian:~$ /bin/sh -c "for i in $(/bin/date | /usr/bin/awk -F '[ :]' '{print $4}') ; do /usr/bin/feh --bg-scale $HOME/tmp/$i.jpg 2>/dev/null ; done"
raphix@debian:~$ /bin/sh -c "for i in $(/bin/date | /usr/bin/awk -F '[ :]' '{print $4}') ; do /usr/bin/feh --bg-scale $HOME/.xplanet/images/Earth_HD/earth-hd/HPH-MAPS/$i.jpg 2>/dev/null ; done"
raphix@debian:~$ time

real	0m0.000s
user	0m0.000s
sys	0m0.000s
raphix@debian:~$ date
mercredi 18 janvier 2017, 10:11:42 (UTC+0200)
raphix@debian:~$ 

May be the date command in the script must be different ?

Offline

#29 2017-01-18 11:19:48

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,697

Re: Help to display differents pictures every 2 hours

Journalctl is the log of systemd.
With journalctl you can not call systemd.service! neutral

Once again.
The images must have the appropriate ending (.jpg or .png as an example) in the directory, and they must correspond to your hours 10 - 12 - 14 etc. also the designation 10.png
12.png or
14.png
have!   wink By hand!

As the pictures get the designation automatically, @HoaS has not yet revealed.  big_smile

Last edited by unklar (2017-01-18 11:25:45)

Offline

#30 2017-01-18 14:11:23

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

Re: Help to display differents pictures every 2 hours

^yes it is...

Offline

#31 2017-01-18 20:25:28

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,697

Re: Help to display differents pictures every 2 hours

What is the desktop?
I ask because I have the under KDE4.14 synonymous not as under open box has gotten.
I know, before, there was times the note with KDE because of the 'root window' ...
But am too lazy to look for, so important to me is not.

With Bunsen the change works.  big_smile

Offline

#32 2017-01-19 07:20:36

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Help to display differents pictures every 2 hours

ragamatrix wrote:
raphix@debian:~$ date
mercredi 18 janvier 2017, 10:11:42 (UTC+0200)
raphix@debian:~$ 

May be the date command in the script must be different ?

^ This.

My command doesn't work with your date format.

Try this instead:

# ~/.local/systemd/user/wallchanger.timer

[Unit]
Description=Change wallpaper at set times.

[Service]
Type=oneshot
Environment=DISPLAY=:0
ExecStart=/bin/sh -c "for i in $(/bin/date | /usr/bin/awk -F '[ :]' '{print $5}') ; do /usr/bin/feh --bg-scale $HOME/.xplanet/images/Earth_HD/earth-hd/$i.png 2>/dev/null ; done"

So, just changing {print $4} to {print $5} should do it. I think.

Offline

#33 2017-01-19 09:35:50

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,697

Re: Help to display differents pictures every 2 hours

Thanks @HoaS  smile

my

$ date
Do 19. Jan 10:13:07 CET 2017

Offline

#34 2017-01-19 19:54:55

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Help to display differents pictures every 2 hours

^ Yes, that format is compatible with the original print $4 version.

This method should now be workable on any distribution that uses systemd, the `feh` command could be changed for `gsettings` in the GNOME desktop (for example) to allow usage in different DEs 8)

Offline

#35 2017-01-20 09:18:59

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,697

Re: Help to display differents pictures every 2 hours

^ Thanks for the tip...  wink

Offline

#36 2017-01-24 07:45:27

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

Re: Help to display differents pictures every 2 hours

I finally make these scripts working with a french help on a debian forum... It's easier to understand... sorry for my english level  :8
I share you the problem resolved, was a "date" format syntax problem:
debian-facile.org
Thanks for your help

Offline

#37 2017-01-24 07:48:15

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Help to display differents pictures every 2 hours

Thanks for the update ragamatrix and I'm glad you got it working smile

EDIT: and that solution is so much simpler that it's not even funny, how crap am I?

8.(

Ah well...

Last edited by Head_on_a_Stick (2017-01-24 07:49:43)

Offline

Board footer

Powered by FluxBB