docs: improve autostart guide with user systemd service for full Electron UI#345
docs: improve autostart guide with user systemd service for full Electron UI#345khassel merged 5 commits intoMagicMirrorOrg:developfrom
Conversation
Improve autostart documentation: add user systemd service for full Electron UI with logging and environment variables
docs: address PR feedback — clarify display server and disable logging by default
docs: verified the environment inherited by systemd --user, ensured DISPLAY=:0 and WAYLAND_DISPLAY=wayland-0 is set up automatically
docs: updated Troubleshooting section
|
we should call out in big letters that this applies to raspios ONLY. (and maybe version of raspios as they keep changing it) no bets on ubuntu, arch, macos, .... thus is why I recommend and use pm2, to avoid all this |
|
@sdetweil, pm2 is indeed a solid process manager and works well in many scenarios. However, it also has its limitations in GUI contexts: it still depends on the graphical session being active, often requires manual propagation of environment variables (like DISPLAY) and can occasionally run into issues after system or Node.js updates. For the standard Raspberry Pi setup with desktop auto-login, a user systemd service leverages the native session management of the OS and provides a simpler, more integrated, and reliable experience out of the box. |
- Add platform note: Clarify guide is for Raspberry Pi OS Desktop - Fix typo: WAYLAND_DIAPLAY → WAYLAND_DISPLAY - Fix misleading comment: System services start on boot, not after user login - Remove trailing whitespace and newline
|
To move this forward, I've just added a commit that should address the comments raised in the discussion. With these changes, I think the PR is ready to be merged. What do you think? Since I haven't appreciated the PR yet: Thanks for creating this PR, @vectorman115! This is a valuable addition 🙂 |
|
Thank you so much for your guidance and for helping refine this contribution! I’m truly honored to have my first ever open-source pull request merged into such a wonderful project. It means a lot to me to give back to the MagicMirror² community - especially with something that solves a real-world problem I faced myself. I really appreciate the thoughtful feedback and the collaborative spirit here. Looking forward to contributing more in the future! |
|
You're very welcome! And congratulations on your first merged PR! 🎉 We're always happy to see new contributors getting involved. If you ever run out of ideas on what to work on, feel free to check out the open issues or documentation issues 😁 |
* docs: improve autostart guide with user systemd service for full Electron UI (#345) * Update autostart.md Improve autostart documentation: add user systemd service for full Electron UI with logging and environment variables * Update autostart.md docs: address PR feedback — clarify display server and disable logging by default * Update autostart.md docs: verified the environment inherited by systemd --user, ensured DISPLAY=:0 and WAYLAND_DISPLAY=wayland-0 is set up automatically * Update autostart.md docs: updated Troubleshooting section * clarify systemd service behavior + minor changes - Add platform note: Clarify guide is for Raspberry Pi OS Desktop - Fix typo: WAYLAND_DIAPLAY → WAYLAND_DISPLAY - Fix misleading comment: System services start on boot, not after user login - Remove trailing whitespace and newline --------- Co-authored-by: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com> * style: set carbon ads background color to inherit (#350) * location of default modules changed (#353) see MagicMirrorOrg/MagicMirror#4019 * move custom.css from css to config (#354) * update variables in config * add secrets.md * fix typo * add missing " * node_modules/vitepress/types/default-theme.d.ts * apply Prettier formatting * handle cspell issues * add weatherapi options to weather module configuration (#359) * docs(compliments): clarify remoteFile path resolution and limitations (#360) * docs: correct loaded() - server-side only, not a client-side hook (#361) Document that loaded() belongs to node_helper, not Module. Add async/Promise support to the start() docs as the correct way to handle asynchronous module initialization. * docs: clarify that public folder requires node_helper.js (#362) * docs: explain physical concept and hardware scope on landing page (#365) Add a short paragraph to index.md that explains what a MagicMirror physically is, clarifies that this documentation covers the software side only, and points newcomers to the community showcase for hardware build inspiration. Closes MagicMirrorOrg/MagicMirror#3282 * add weather templates (#366) * weather: add themes example * calendar: align showEnd and dateEndFormat defaults (#368) * fix failing tests --------- Co-authored-by: Github Actions <actions@github.com> Co-authored-by: Станислав <52878917+vectorman115@users.noreply.github.com> Co-authored-by: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com> Co-authored-by: veeck <gitkraken@veeck.de> Co-authored-by: sam detweiler <sdetweil@gmail.com> Co-authored-by: Andrés Vanegas Jiménez <142350+angeldeejay@users.noreply.github.com>
This updates the autostart documentation to include a robust method for launching MagicMirror with the full Electron interface using a user systemd service. It covers proper handling of DISPLAY, XAUTHORITY, logging, and avoids common pitfalls like permission errors or missing environment variables.
The original serveronly method is preserved for headless setups.