IMD SolutionComputing LibraryShop main store

Troubleshooting

Why Epiphany kiosk autostart cannot open the display

Edge computing and IIoT Published 7 min read By IMD Solution engineering team

Short answer

Epiphany's Unable to init server and cannot-open-display errors mean the browser launched outside a graphical session, not that Node-RED failed. Keep a minimal display session running, start Epiphany from inside that session as its user with the dashboard address, and gate the launch on Node-RED answering before the browser opens.

On this page
  1. Why does Epiphany fail to open the display at boot?
  2. Does autostarting Node-RED also open the UI?
  3. Can the kiosk run without the desktop in the background?
  4. Why does the same launch work after login but not at boot?
  5. How do I sequence the boot so Node-RED is ready first?
  6. How do I tell a display fault from a Node-RED fault?
  7. Can I keep Epiphany when there is no room for Chromium?
  8. Questions asked

If Epiphany prints Unable to init server: Could not connect: Connection refused followed by Failed to parse arguments: Cannot open display: when the controller boots, the browser started outside a graphical session. Node-RED is not the fault: both lines say the browser found no display server to connect to and exited before it could load any page. The fix is structural, not a single setting: keep a minimal display session running on the controller, launch Epiphany from inside that session as the session user with the dashboard address, and make the browser wait until the Node-RED runtime answers before it opens the page. This article separates the three jobs — runtime, session, browser — and gives the boot order and the tests that make the kiosk come up on its own after a power cycle.

Why does Epiphany fail to open the display at boot? #

Those two lines are one fault, not two: the browser tried to connect to a display server, found nothing accepting connections in its launch environment, and the graphical toolkit reported that failed connection as an argument-parsing error, so Node-RED and the flow logic were never involved.

Unable to init server: Could not connect: Connection refused is the display connection attempt being refused; Failed to parse arguments: Cannot open display: follows because a graphical application cannot finish launching without a display. Treat them as evidence about the session, not about the UI you built.

One variant matters on packaged systems: when the browser ships as a flatpak, the same pair can appear even while a display server runs, because the sandbox cannot always reach an X11 display socket; under Wayland the same build may open normally. Run the browser under whichever display server the session actually starts, and test it there. For the identical fault on a RevPi controller, there is a dedicated walkthrough for fixing the cannot-open-display error when running Epiphany on RevPi.

Does autostarting Node-RED also open the UI? #

No — the Node-RED service at boot only makes the editor and dashboard reachable on its TCP port, 1880 by default; it launches no browser, and the UI appears on a screen only once a browser inside a graphical session loads that address.

So "autostart the UI" is never one operation. It is three: bring up the Node-RED runtime, bring up a display session, launch a browser inside that session pointing at the dashboard. The runtime behaves the same on any controller — when its boot autostart is misconfigured you get port conflicts instead of a UI, which is exactly what happens when Node-RED on an IOT2050 shows port 1880 in use. A clean autostart here means one service, started once, answering on the dashboard port; the screen is a separate concern the service knows nothing about.

Can the kiosk run without the desktop in the background? #

Yes — a visible Epiphany kiosk needs a running display server and a graphical session, but it does not need the full desktop shell; remove the desktop's panels and extra components, keep the display session, and the kiosk works.

Removing the desktop shell and removing the graphics stack are different acts. The first trims what you do not need on a kiosk; the second leaves the browser with no display server to connect to, which is the error you are seeing. Setting a display environment variable does not substitute: a variable only names a server, it does not create one.

The decision follows directly. If the requirement is a visible kiosk on a screen attached to the controller, keep a minimal graphical session and drop the general-purpose desktop around it. If the requirement is no graphics at all, a visible Epiphany kiosk is incompatible with that requirement — view the dashboard from another client instead, and treat a headless browser or virtual display as a different architecture to validate against the image, not a quick fix. Before you strip desktop components, confirm SSH access to the controller still works, so a session that fails to start cannot leave the device unreachable.

Why does the same launch work after login but not at boot? #

Because after login the command inherits the session's display environment and its access authorization, while a boot script runs under a different account with neither, so the identical command that works at your desk is refused when the system launches it at boot.

A display server only accepts connections from clients that present the session's authorization and run with the session's environment. A boot script or system service starts earlier, usually as root or a service account, in a context with no session at all. The supported launch point is the session's own autostart entry — the mechanism a desktop session uses to open applications at login — which runs inside the session, as the session user. On Raspberry Pi OS the shape of that mechanism changed with the Bookworm release; the page on fixing Raspberry Pi kiosk autostart after the Bookworm update shows what moved and how to restore it.

How do I sequence the boot so Node-RED is ready first? #

Gate the browser launch on the Node-RED port answering: poll the dashboard address until it responds, then start Epiphany in the session, and cap the wait so a dead flow cannot hang the boot — twelve polls at 5 s, 60 s in the example below.

A fixed delay guesses; a readiness check measures. The wrapper below is an example, with the poll count, interval and addresses as illustrative values you adjust to your controller:

#!/bin/bash
# example: wait for Node-RED, then launch the kiosk browser in the session
for i in $(seq 1 12); do
  code=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:1880)
  if [ "$code" = "200" ]; then break; fi
  sleep 5
done
DISPLAY=:0 epiphany http://127.0.0.1:1880

The arithmetic: 12 polls at 5 s each gives a 60 s ceiling, and the loop exits on the first successful answer, so a healthy runtime delays the browser by one poll at most. Put the script where the session's autostart entry runs it, not in a system service, and use the display number your session actually uses — :0 in the example. Node-RED appearing slightly after the browser is harmless with this order: the page loads once the runtime answers, and a browser reload returns to the UI.

How do I tell a display fault from a Node-RED fault? #

The failing stage names itself: an error before any window appears is a display fault, a browser window with a blank or error page is a runtime or address fault, and each has a one-command test.

  • Unable to init server or Cannot open display before any window opens — display fault. Repeat the connection with DISPLAY=:0 xlogo in the same context; if the test window fails too, the session is missing or unreachable, and the browser is innocent.
  • A browser window opens but shows a blank page or a connection error — the display works; move to the runtime: check the service state, the address in the launch command and reachability from another PC. The case of a Node-RED dashboard page going blank in the browser covers the browser-side causes.
  • The dashboard loads from a second PC but not on the local screen — runtime and network are fine; the fault is in the local session or the browser launch context.
  • No kiosk appears after boot and no error is logged — ordering: the browser launched before the session existed, or not at all; check the session logs and the autostart entry before touching the flow.

Work these four in order and the fault isolates itself in one cold boot.

Can I keep Epiphany when there is no room for Chromium? #

Yes — Epiphany is a normal graphical browser and renders a Node-RED dashboard page without trouble, so when storage rules out a larger browser, keep the installed Epiphany, fix the session it launches in, and add no packages.

Storage pressure is a reason to use the preinstalled browser, not a cause of this error: the display fault occurs with any browser launched outside a session. If the installed image cannot run even a minimal graphical session, rebuild from the vendor's documented minimal-image process rather than hand-pruning the running system, and carry the Node-RED autostart over unchanged — the runtime is happy headless. The decision per case: visible kiosk, space-tight image — Epiphany in a minimal session, ready-gated as above; no room or no way to run a session on that image — leave the controller headless and view the dashboard from another client on the network.

Questions asked

Which user must launch the kiosk browser?

The user that owns the graphical session. Launch Epiphany from that session's own autostart mechanism, not from a system service or boot script: a system service runs under its own account without the session's display environment, and the display connection is refused exactly as the error reports. If a service must do it, it has to run as the session user after the session exists, with the display environment set.

How long should the browser wait for Node-RED?

Set the cap from one observed cold boot, not a guess: time how long the runtime takes to answer on its port after power-on and set the wait to roughly twice that. The example wrapper allows twelve polls at 5 s each, a 60 s ceiling; a faster controller answers on the first poll, and the cap keeps a broken flow from hanging the boot.

Does Node-RED itself need a graphical session?

No. The runtime serves the editor and dashboard headless; only a browser needs a display. A second PC on the network can open the same dashboard address with no graphical session running on the controller at all, which is also the fallback when a device is meant to stay headless.

Can the kiosk run on Wayland instead of X11?

Only if the installed image and the browser build support it. Some packaged builds of Epiphany refuse an X11 connection from inside their sandbox but open a Wayland display without trouble, so run the browser under whichever display server the session actually starts, and prove it with a full cold boot before rollout.

Keep reading

  • Explainer

    Why Ignition Edge cannot run without a local package cache

    Ignition Edge has no setting to disable its local cache because the client needs compressed JAR packages on local storage to decompress classes on demand. After a power cut leaves an incomplete file and the client fails with EOFException, delete ~/.ignition/cache under the launching account before the client starts and accept a slower first launch.

    Edge computing and IIoT

  • Troubleshooting

    Node-RED crashes after a node install: safe mode and rollback

    The fatal log line is the one reading Uncaught Exception with a stack trace; palette warnings above it are survived. Stop the nodered systemd unit, start node-red with --safe so the editor opens with flows stopped, then roll the package the stack names back to its previous release with npm install --save-exact and confirm the pin with npm ls before you let the flows run.

    Edge computing and IIoT

  • Troubleshooting

    Why a PLCnext controller cannot pull a Docker image for Node-RED

    A failed image pull on a PLCnext AXC controller has three separate causes, and you test them in this order: no internet path (standard address outside your subnet, gateway not the router, resolver unreachable), the balenaEngine-DockerForIOT-ARM app not offered in your PLCnext Store region, or internal storage alone because no SD card is fitted. Fix the network first, request the app or use the documented manual install second, and fit an SD card third.

    Edge computing and IIoT

Collect drive parameter data without master communication