MIME Problem in Dolphin: Lösungsansätze

This commit is contained in:
2026-03-06 09:50:52 +01:00
parent 6dcaeba0ce
commit e8c73617c6
5 changed files with 114 additions and 16 deletions
+61 -14
View File
@@ -1,30 +1,77 @@
# Hyprland Dotfiles (portable portal setup)
# Hyprland Dotfiles (Portal + MIME Stabilisierung)
Diese Konfiguration ist für den Einsatz via `stow` auf unterschiedlichen Systemen vorbereitet.
Diese Konfiguration ist für Nutzung via `stow` ausgelegt und enthält zusätzliche Stabilisierung für Dateizuordnungen (MIME) unter Hyprland.
## Portal-Backends
## WICHTIG: Primärer Fix für MIME-Probleme
Die Portal-Priorität steht in `.config/xdg-desktop-portal/portals.conf` auf:
Wenn Dateizuordnungen in Dolphin verschwinden oder Doppelklicks unzuverlässig sind, ist dies die erste und wichtigste Referenz:
- `hyprland` für Hyprland-spezifische Portale
- `gtk` als primärer, host-unabhängiger Backend für OpenURI/FileChooser/Settings
- `kde` als Fallback
- https://github.com/n4zz/Fix-Dolphin-File-Associations
Damit funktioniert der Dateizuordnungs-Dialog auch ohne komplette GNOME- oder KDE-Session.
Der dort beschriebene Ansatz ist die primäre Lösung.
## Host-Override
Die lokalen `ensure-mime-defaults`-Skripte in diesen Dotfiles sind nur als Zusatz/Notfall-Fallback gedacht, falls trotz primärem Fix weiterhin nichts zuverlässig funktioniert.
`.config/hypr/scripts/portal-host-override.sh` setzt `XDG_MENU_PREFIX=plasma-` nur dann,
wenn KDE-Portal + Plasma-Menüdatei vorhanden sind. Ohne diese Voraussetzungen wird nichts erzwungen.
## Aktiver Stand
## Pakete auf Zielsystemen
### Portal-Backends
Empfohlen (mindestens):
Die Priorität in `.config/xdg-desktop-portal/portals.conf` ist:
- `hyprland` (Hyprland-spezifische Portale)
- `gtk` (primär für `OpenURI`, `FileChooser`, `Settings`)
- `kde` (Fallback)
### Session-Umgebung
In `.config/hypr/hyprland.conf` werden diese Variablen gesetzt und an systemd/DBus exportiert:
- `XDG_CURRENT_DESKTOP=Hyprland`
- `XDG_SESSION_DESKTOP=Hyprland`
- `XDG_SESSION_TYPE=wayland`
- `XDG_MENU_PREFIX=plasma-`
- `GTK_USE_PORTAL=1`
### MIME-Selbstheilung
Hinweis: Dieser Block ist bewusst nur Fallback und nicht die Hauptlösung.
Dateien:
- `.config/hypr/scripts/ensure-mime-defaults.sh`
- `.config/systemd/user/ensure-mime-defaults.service`
- `.config/systemd/user/ensure-mime-defaults.path`
Verhalten:
- setzt bevorzugte MIME-Defaults beim Login
- setzt sie erneut, wenn `~/.config/mimeapps.list` oder `~/.local/share/applications/mimeapps.list` geändert werden
## Deployment / Reload
Nach Änderungen an den Dotfiles:
1. `stow hypr` (falls Symlinks noch nicht gesetzt sind)
2. `hyprctl reload`
3. `systemctl --user daemon-reload`
4. `systemctl --user restart xdg-desktop-portal.service xdg-desktop-portal-hyprland.service xdg-desktop-portal-gtk.service plasma-xdg-desktop-portal-kde.service`
5. `systemctl --user restart ensure-mime-defaults.service`
## Verifikation
- `xdg-mime query default image/jpeg`
- `xdg-mime query default application/pdf`
- `systemctl --user status ensure-mime-defaults.path ensure-mime-defaults.service`
- `systemctl --user status xdg-desktop-portal.service xdg-desktop-portal-hyprland.service xdg-desktop-portal-gtk.service plasma-xdg-desktop-portal-kde.service`
## Paketvoraussetzungen
Mindestens empfohlen:
- `xdg-desktop-portal`
- `xdg-desktop-portal-hyprland`
- `xdg-desktop-portal-gtk`
Optional (Fallback):
Optional (Fallback, aktuell genutzt):
- `xdg-desktop-portal-kde`