You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: configuration/autostart.md
+38-18Lines changed: 38 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,24 +109,28 @@ pm2 show mm
109
109
110
110
## Using systemd/systemctl
111
111
112
-
Systemctl is a control interface for systemd, a powerful service manager
113
-
often found in full Linux systems. This approach works for both headless (serveronly) and full Electron UI modes.
112
+
Systemctl is a control interface for systemd, a powerful service manager often
113
+
found in full Linux systems. This approach works for both headless (serveronly)
114
+
and full Electron UI modes.
114
115
115
116
The examples below assume:
116
117
117
118
- MagicMirror is installed in "/home/server/MagicMirror/"
118
119
- Node.js is located at "/usr/bin/node" (Run `which node` if you're unsure.)
119
120
- Systemd requires absolute paths for all binaries and directories.
120
-
- Also, the examples use a user named "server" - replace it with your actual username.
121
-
- Avoid running as "root" unless absolutely necessary - it increases security risks.
121
+
- Also, the examples use a user named "server" - replace it with your actual
122
+
username.
123
+
- Avoid running as "root" unless absolutely necessary - it increases security
124
+
risks.
122
125
123
126
### Full Electron UI Mode (Recommended for Desktop Auto-Login)
124
127
125
-
::: warning Note
126
-
This section is tailored for **Raspberry Pi OS Desktop**. Users on other Linux distributions may need to adapt the configuration.
127
-
:::
128
+
::: warning Note This section is tailored for **Raspberry Pi OS Desktop**. Users
129
+
on other Linux distributions may need to adapt the configuration. :::
128
130
129
-
For systems with graphical auto-login (e.g. Raspberry Pi OS Desktop), it's best to use a user systemd service. It starts automatically after the user session is fully initialized.
131
+
For systems with graphical auto-login (e.g. Raspberry Pi OS Desktop), it's best
132
+
to use a user systemd service. It starts automatically after the user session is
User services run in the context of your desktop session, giving them access to DISPLAY (or WAYLAND_DISPLAY), sound, and other GUI resources.
142
+
Note: Why "~/.config/systemd/user/"? User services run in the context of your
143
+
desktop session, giving them access to DISPLAY (or WAYLAND_DISPLAY), sound, and
144
+
other GUI resources.
140
145
141
146
#### Paste the following configuration (adjust paths as needed)
142
147
@@ -160,8 +165,14 @@ WantedBy=default.target
160
165
```
161
166
162
167
Notes:
163
-
- %h is a systemd placeholder for the user’s home directory (e.g., /home/server). It’s safer than hardcoding paths.
164
-
- Logging note: By default, this service does not write logs to disk to avoid excessive writes on SD cards. If you need logs for debugging, uncomment the StandardOutput and StandardError lines in the service file. Remember to disable them again after troubleshooting. The file is overwritten on every restart (due to `file:` mode).
168
+
169
+
- %h is a systemd placeholder for the user’s home directory (e.g.,
170
+
/home/server). It’s safer than hardcoding paths.
171
+
- Logging note: By default, this service does not write logs to disk to avoid
172
+
excessive writes on SD cards. If you need logs for debugging, uncomment the
173
+
StandardOutput and StandardError lines in the service file. Remember to
174
+
disable them again after troubleshooting. The file is overwritten on every
Copy file name to clipboardExpand all lines: configuration/introduction.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,11 +21,11 @@
21
21
};
22
22
```
23
23
24
-
See [module configuration](/modules/configuration.md) for more information
25
-
and examples.
24
+
See [module configuration](/modules/configuration) for more information and
25
+
examples.
26
26
27
27
4. Run your magic mirror. Refer back to
28
-
[installation](/getting-started/installation.md) if you're not sure how to do
28
+
[installation](/getting-started/installation) if you're not sure how to do
29
29
so.
30
30
31
31
## More useful configuration of your MagicMirror
@@ -56,13 +56,13 @@ The following properties can be configured, place them above the modules item:
56
56
|`language`| The language of the interface. (Note: Not all elements will be localized.) Possible values are `en`, `nl`, `ru`, `fr`, etc. for the full list see: [List of ISO 639-1 codes](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)|`en`|
57
57
|`timeFormat`| The form of time notation that will be used. Possible values are `12` or `24`. | 24 |
58
58
|`units`| The units that will be used in the default weather modules. Possible values are `metric` or `imperial`. |`metric`|
59
-
|`electronOptions`| An optional array of Electron (browser) options. This allows configuration of e.g. the browser screen size and position (example: `electronOptions: { fullscreen: false, width: 800, height: 600 }`). Kiosk mode can be enabled by setting `kiosk: true`, `autoHideMenuBar: false` and `fullscreen: false`. More options can be found [here](https://github.com/electron/electron/blob/master/docs/api/browser-window.md). This will most likely be used in advanced installations, below. |[]|
59
+
|`electronOptions`| An optional array of Electron (browser) options. This allows configuration of e.g. the browser screen size and position (example: `electronOptions: { fullscreen: false, width: 800, height: 600 }`). Kiosk mode can be enabled by setting `kiosk: true`, `autoHideMenuBar: false` and `fullscreen: false`. More options can be found [here](https://github.com/electron/electron/blob/master/docs/api/browser-window). This will most likely be used in advanced installations, below.|[]|
60
60
|`electronSwitches`| An optional array of Electron switches. This allows configuration of electron app itself. <br> This properties will not affect the `serveronly` mode. Usually normal `MM` users don't need this property, but if you are a hard-core hacker, you might need this to handle Electron itself over `MagicMirror` provides. More options can be found [here](https://www.electronjs.org/docs/latest/api/command-line-switches) (Not all available switches are described there.)<br>example:`electronSwitches:["enable-transparent-visuals", "disable-gpu"];`|[]|
61
61
|`customCss`| The path of the `custom.css` stylesheet. The default is `config/custom.css`. |`config/custom.css`|
62
-
|`watchTargets`| An optional array of file paths to monitor when using `node --run server:watch`. When any of these files change, the server automatically restarts and connected browsers reload. Particularly useful when frequently modifying `config.js`, `custom.css`, or module files during development or setup. Example: `watchTargets: ["config/config.js", "config/custom.css", "modules/MMM-MyModule/MMM-MyModule.js"]`. See [Development Mode](/core-development/debugging.md#watch-mode-with-auto-reload) for more details. |`undefined`|
62
+
|`watchTargets`| An optional array of file paths to monitor when using `node --run server:watch`. When any of these files change, the server automatically restarts and connected browsers reload. Particularly useful when frequently modifying `config.js`, `custom.css`, or module files during development or setup. Example: `watchTargets: ["config/config.js", "config/custom.css", "modules/MMM-MyModule/MMM-MyModule.js"]`. See [Development Mode](/core-development/debugging#watch-mode-with-auto-reload) for more details.|`undefined`|
63
63
64
64
After the above options, you will then add modules. See
65
-
[module configuration](/modules/configuration.md) for more information.
65
+
[module configuration](/modules/configuration) for more information.
66
66
67
67
### Advanced configuration and frequently asked how to configure examples
| in | String | Animate name when module will be shown (after dom update), it will use an `animateIn` type name (see [Animation Guide](/modules/animate.md#animatein)) |
428
-
| out | String | Animate name when module will be hidden (before dom update), it will use an `animateOut` type name (see [Animation Guide](/modules/animate.md#animateout)) |
| in | String | Animate name when module will be shown (after dom update), it will use an `animateIn` type name (see [Animation Guide](/modules/animate#animatein)) |
428
+
| out | String | Animate name when module will be hidden (before dom update), it will use an `animateOut` type name (see [Animation Guide](/modules/animate#animateout)) |
429
429
430
430
**Example:**
431
431
@@ -499,7 +499,7 @@ Possible configurable options:
499
499
500
500
-`animate` - String - (_Introduced in version: 2.25.0._) Hide the module with a
501
501
special animate. It will use an `animateOut` type name. All animations name
502
-
are available in [Animation Guide](/modules/animate.md#animateout)
502
+
are available in [Animation Guide](/modules/animate#animateout)
503
503
504
504
::: warning Notes:
505
505
@@ -542,7 +542,7 @@ Possible configurable options:
542
542
object, if specified in the options (_Introduced in version: 2.15.0_).
543
543
-`animate` - String - (_Introduced in version: 2.25.0._) Show the module with a
544
544
special animation. It will use an `animateIn` type name. All animations name
545
-
are available in [Animation Guide](/modules/animate.md#animatein)
545
+
are available in [Animation Guide](/modules/animate#animatein)
0 commit comments