Skip to content

Platform in Platforms

PWAs on Linux desktop

Published

Linux desktop users can install web content as an app through Chrome, Microsoft Edge, or GNOME Web. The browsers expose different installation commands, while the display-mode media feature lets a page adapt to the mode in which it is displayed.

MDN states that Chromium-based browsers require specified manifest members for installability. Microsoft lists supported 64-bit Linux distributions for Edge. GNOME Web documents its own Linux web-app installation flow (Making PWAs installable, MDN; Microsoft Edge supported operating systems, Microsoft Learn; Create a Web App, GNOME Help).

Chrome Help documents an address-bar install icon and the Install page as app… menu command. Microsoft’s PWA UX documentation names the address-bar App available control and Install action.

GNOME Web uses a separate workflow. Its help page directs users to Install as Web App…, then Create. The resulting app is added to the Activities overview and opens in a special window without the address bar or menus.

Do not present a Chrome menu path as a GNOME Web instruction, or use Microsoft’s Windows-integration section as evidence for Linux shell integration.

The display-mode media feature works as a CSS media condition. Keep an ordinary navigation path in the markup, then add standalone-specific controls or presentation.

Adapt navigation when browser controls are absent

Section titled “Adapt navigation when browser controls are absent”

The display-mode media feature reports the display mode actually in use. This example reveals an in-app back control in standalone mode and keeps it hidden in an ordinary browser tab. When matchMedia is unavailable, the normal home link remains available.

<a id="home" href="/">Home</a>
<button id="back" type="button" hidden>Back</button>
<script type="module">
const back = document.querySelector('#back');
if (!('matchMedia' in window)) {
back.hidden = true;
} else if (window.matchMedia('(display-mode: standalone)').matches) {
back.hidden = false;
back.addEventListener('click', () => {
if (history.length > 1) history.back();
else location.assign('/');
});
} else {
back.hidden = true;
}
</script>

The fallback does not try to identify a Linux distribution or browser. The ordinary link preserves a route home when display-mode detection is missing.

Hide browser-tab guidance in standalone mode

Section titled “Hide browser-tab guidance in standalone mode”

Use the same media feature in CSS when the difference is presentational. This installation hint remains visible in a browser tab and is hidden when the page is displayed in standalone mode (display-mode, MDN).

<p class="browser-only">
Use your browser's installation command to open this site as an app.
</p>
<style>
@media (display-mode: standalone) {
.browser-only {
display: none;
}
}
</style>

Other display modes keep the hint visible. The rule depends on the active display mode, not a Linux distribution or browser name.

Specifications

SpecificationStatus
None.