MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. quarky42
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    Q
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 1
    • Groups 0

    quarky42

    @quarky42

    0
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    quarky42 Unfollow Follow

    Latest posts made by quarky42

    • RE: A command to refresh magic mirror page

      @joezie Thank you very much for this. On my Raspberry PI 5, I did this to get it to work:
      apt install xdotool
      nano refreshMagicMirror.sh

      #!/bin/bash
      # refreshMagicMirror.sh
      export DISPLAY=:0
      xdotool windowactivate --sync $(xdotool search --name magicmirror) key ctrl+r
      

      chmod og+x refreshMagicMirror.sh
      To use this script:
      . refreshMagicMirror.sh
      or
      /home/<username-here>/refreshMagicMirror.sh assuming the script is in your user account’s home directory.

      Without setting the DISPLAY=:0 manually, xdotool wasn’t able to figure out which display to run on. By using the --name magicmirror instead of the --class search, it was able to find the one window named magicmirror so no need to awk out the third line entry of the --class results.

      I hope this helps someone as much as your post helped me solve this. I like refreshing the screen remotely way more than restarting the service!

      posted in General Discussion
      Q
      quarky42