Error message

  • Deprecated function: Return type of DateObject::__wakeup() should either be compatible with DateTime::__wakeup(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include_once() (line 158 of /home/sites/site100029201/web/rolandtapken.de/htdocs/sites/all/modules/date/date_api/date_api.module).
  • Deprecated function: Return type of DateObject::format($format, $force = false) should either be compatible with DateTime::format(string $format): string, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include_once() (line 158 of /home/sites/site100029201/web/rolandtapken.de/htdocs/sites/all/modules/date/date_api/date_api.module).
  • Deprecated function: Return type of DateObject::setTimezone($tz, $force = false) should either be compatible with DateTime::setTimezone(DateTimeZone $timezone): DateTime, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include_once() (line 158 of /home/sites/site100029201/web/rolandtapken.de/htdocs/sites/all/modules/date/date_api/date_api.module).
  • Deprecated function: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in decode_entities() (line 463 of /home/sites/site100029201/web/rolandtapken.de/htdocs/includes/unicode.inc).
  • Deprecated function: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in decode_entities() (line 463 of /home/sites/site100029201/web/rolandtapken.de/htdocs/includes/unicode.inc).
  • Deprecated function: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in decode_entities() (line 463 of /home/sites/site100029201/web/rolandtapken.de/htdocs/includes/unicode.inc).
  • Deprecated function: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in decode_entities() (line 463 of /home/sites/site100029201/web/rolandtapken.de/htdocs/includes/unicode.inc).
  • Deprecated function: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in decode_entities() (line 463 of /home/sites/site100029201/web/rolandtapken.de/htdocs/includes/unicode.inc).
  • Deprecated function: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in decode_entities() (line 463 of /home/sites/site100029201/web/rolandtapken.de/htdocs/includes/unicode.inc).
  • Deprecated function: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in decode_entities() (line 463 of /home/sites/site100029201/web/rolandtapken.de/htdocs/includes/unicode.inc).
  • Deprecated function: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in decode_entities() (line 463 of /home/sites/site100029201/web/rolandtapken.de/htdocs/includes/unicode.inc).
  • Deprecated function: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in decode_entities() (line 463 of /home/sites/site100029201/web/rolandtapken.de/htdocs/includes/unicode.inc).
  • Deprecated function: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in decode_entities() (line 463 of /home/sites/site100029201/web/rolandtapken.de/htdocs/includes/unicode.inc).
  • Deprecated function: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in decode_entities() (line 463 of /home/sites/site100029201/web/rolandtapken.de/htdocs/includes/unicode.inc).
  • Deprecated function: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in decode_entities() (line 463 of /home/sites/site100029201/web/rolandtapken.de/htdocs/includes/unicode.inc).
  • Deprecated function: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in decode_entities() (line 463 of /home/sites/site100029201/web/rolandtapken.de/htdocs/includes/unicode.inc).
  • Deprecated function: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in decode_entities() (line 463 of /home/sites/site100029201/web/rolandtapken.de/htdocs/includes/unicode.inc).
  • Deprecated function: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in decode_entities() (line 463 of /home/sites/site100029201/web/rolandtapken.de/htdocs/includes/unicode.inc).

Play a movie as screensaver in KDE

Did you ever want to play a video as screensaver? With KDE this is pretty easy.

  1. First, you need a video player. I choosed mpv, but mplayer will also do.
  2. Second, you need a video. Store it in a public readable place, for example in /opt/cats.mp4. This is not exactly required in a single-user environment, but since your screensaver will be available to all users it is a nice idea. Of course you could also place it in another directory like /etc/screensaver and/or symlink to the real file. This will make it easier to replace the actual video file.
  3. Third, create a custom screensaver service file for KDE:

    /usr/share/kde4/services/ScreenSavers/kcats.desktop

    [Desktop Entry]
    Exec=mpv --loop=inf -ao=null /opt/cats.mp4
    Icon=kscreensaver
    Type=Service
    X-KDE-ServiceTypes=ScreenSaver
    Actions=Setup;InWindow;Root;
    Name=Custom Video
    
    [Desktop Action InWindow]
    Exec=mpv --loop=inf -ao=null --no-keepaspect --wid=%w /opt/cats.mp4
    Name=Display in Specified Window
    NoDisplay=true
    
    [Desktop Action Root]
    Exec=mpv --loop=inf -ao=null --no-keepaspect --wid=0 /opt/cats.mp4
    Name=Display in Root Window
    NoDisplay=true
    
    On an Intel NUC I had also to append '-vo=x11' to the option's list.
    

    The exact location of the ScreenSavers directory may depend on your distribution. If unsure, try to locate it with:

    $ find /usr -type d -name ScreenSavers
    
  4. Finally, open the Lock Screen menu from KDE's settings and select your custom screensaver.