OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
apps-services low occasional DISPUTE

Make Files (Nautilus) 'Set as Wallpaper' change the Omarchy background

omarchyarchhyprlandwaylandomarchy-shellnautilusxdg-desktop-portal
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

Checked every claim against this workstation (omarchy 4.0.2-1, nautilus 50.2.2-1, xdg-desktop-portal 1.22.1-2, xdg-desktop-portal-hyprland 1.4.1-1, xdg-desktop-portal-gtk 1.15.3-1, nautilus-python 4.1.0-3) and against issue 8311 read in full with comments. Confirmed on this machine: the two .portal files in /usr/share/xdg-desktop-portal/portals/ export exactly the interface lists the record gives and neither lists Wallpaper, hyprland-portals.conf says default=hyprland;gtk, gdbus introspect on the live org.freedesktop.portal.Desktop object shows no Wallpaper interface at all, the nautilus binary contains xdp_portal_set_wallpaper and the exact string Failed to set wallpaper via portal: %s, the only matching menu label in the binary is Set as Background, nautilus-python is line 85 of /usr/share/omarchy/install/omarchy-base.packages, the installed typelib is /usr/lib/girepository-1.0/Nautilus-4.1.typelib, Omarchy's own extensions already sit in ~/.local/share/nautilus-python/extensions/ as plain files, grep over /usr/share/omarchy finds no reference to org.gnome.desktop.background or picture-uri, /usr/share/omarchy/shell/plugins/background/Background.qml line 15 reads the current/background symlink, /usr/share/omarchy/bin/omarchy-theme-bg-set writes it with ln -nsf, and omarchy theme bg set with no argument routes correctly and printed its usage. From sources: xdg-desktop-portal-gnome's src/wallpaper.c sets picture-uri on org.gnome.desktop.background, and its gnome.portal.in is UseIn=gnome while this session reports XDG_CURRENT_DESKTOP=Hyprland, so that backend would neither be selected nor help. The issue does support the symptom, the cause and the extension. Two provenance errors needed fixing. The fix said the extension was confirmed by the reporter on 4.0.1-1, but 4.0.1-1 is the version on which the bug was reproduced by a different commenter, while the extension was posted and confirmed on 4.0.2-1 and the reporter confirmed it without naming a version. The cause credited the portal recommendation to a contributor, but the commenter who made it carries no repository association. I also updated the landing status: the issue closed 2026-09-02 with neither upstream fix merged, and the v4.0.3 release notes of 2026-09-08 add no wallpaper portal and no Files extension, with no wallpaper or portal path in the quattro tree. NOT exercised: I did not open Files, click the menu item or install the extension, so the end-to-end behaviour of the new context-menu entry is taken from the thread rather than reproduced here.

The cause above was rewritten on 2026-09-11 to match this note; the fix was corrected by the audit itself.

Symptom

Right-click an image in Files (Nautilus) and choose Set as Wallpaper (Set as Background on Nautilus 50). Nothing changes. journalctl --user shows:


org.gnome.Nautilus: Failed to set wallpaper via portal:
GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod:
No such interface "org.freedesktop.portal.Wallpaper"
on object at path /org/freedesktop/portal/desktop

Reported on Omarchy 4.0.1-1 and 4.0.2-1 with Nautilus 50.2.2-1.

Cause

Nautilus 50 asks the XDG desktop portal to set the wallpaper. Its binary carries xdp_portal_set_wallpaper and the message Failed to set wallpaper via portal: %s, and the menu item is labelled Set as Background behind the action id view.set-as-wallpaper. The session's portal backends are xdg-desktop-portal-hyprland 1.4.1 (Screenshot, ScreenCast, GlobalShortcuts, InputCapture) and xdg-desktop-portal-gtk 1.15.3 (FileChooser, AppChooser, Print, Notification, Inhibit, Access, Account, Email, DynamicLauncher, Lockdown, Settings), with /usr/share/xdg-desktop-portal/hyprland-portals.conf setting default=hyprland;gtk. Neither implements org.freedesktop.portal.Wallpaper, so the call fails before anything is written, and introspecting the live portal confirms the interface is simply absent:


gdbus introspect --session --dest org.freedesktop.portal.Desktop \
  --object-path /org/freedesktop/portal/desktop | grep Wallpaper

Installing xdg-desktop-portal-gnome would not help. That backend sets org.gnome.desktop.background picture-uri, which nothing in Omarchy reads, and its gnome.portal file is marked UseIn=gnome while an Omarchy session reports XDG_CURRENT_DESKTOP=Hyprland. Omarchy's background is the ~/.local/state/omarchy/current/background symlink, read by the shell's background plugin at /usr/share/omarchy/shell/plugins/background/Background.qml and written by omarchy-theme-bg-set. A commenter on the issue said a real fix would need Omarchy to either implement org.freedesktop.impl.portal.Wallpaper and hand the file to omarchy theme bg set, or hide the dead menu item. Neither had landed when the issue was closed on 2026-09-02, and neither is in v4.0.3, released 2026-09-08.

Fix

Add a Files context-menu item that calls Omarchy's own command. nautilus-python is in Omarchy's base package set (line 85 of /usr/share/omarchy/install/omarchy-base.packages), so no install is needed. This extension was posted in the issue thread by a commenter who confirmed it on 4.0.2-1, and the reporter confirmed it worked before closing the issue:


mkdir -p ~/.local/share/nautilus-python/extensions
cat > ~/.local/share/nautilus-python/extensions/omarchy-background.py <<'EOF'
import gi

gi.require_version("Nautilus", "4.1")
from gi.repository import Gio, GObject, Nautilus


class OmarchyBackgroundExtension(GObject.GObject, Nautilus.MenuProvider):
    def get_file_items(self, files):
        if len(files) != 1:
            return []

        selected = files[0]
        location = selected.get_location()
        path = location.get_path() if location else None
        mime_type = selected.get_mime_type() or ""
        if not path or not mime_type.startswith("image/"):
            return []

        item = Nautilus.MenuItem(
            name="OmarchyBackgroundExtension::set_background",
            label="Set as Omarchy Background",
        )
        item.connect("activate", self._set_background, path)
        return [item]

    def get_background_items(self, _current_folder):
        return []

    @staticmethod
    def _set_background(_item, path):
        Gio.Subprocess.new(
            ["omarchy", "theme", "bg", "set", path],
            Gio.SubprocessFlags.NONE,
        )
EOF
nautilus -q

That directory is the same one Omarchy already uses for its own Files extensions, and gi.require_version("Nautilus", "4.1") matches the typelib nautilus-python installs. Check both if the item does not appear:


ls ~/.local/share/nautilus-python/extensions/
ls /usr/lib/girepository-1.0/Nautilus-*.typelib

Reopen Files. Right-click an image and choose **Set as Omarchy Background**. The stock GNOME item, labelled **Set as Background** on Nautilus 50, stays in the menu and still does nothing.

Without the extension, set the background from a terminal:


omarchy theme bg set /path/to/image.jpg

Verify

The background changes at once, and readlink ~/.local/state/omarchy/current/background points at the chosen image.

Sources

nautilus-set-as-wallpaper-does-nothing