detached 444762a

fix(flatpak): skip runtime checks and fix desktop entry

- Add IsFlatpak() to env package for shared detection
- Skip pkg-config runtime checks when in Flatpak sandbox
- Fix desktop entry to launch browser (Exec=dumber browse)
- Remove unnecessary env vars from Flatpak manifest
commit
444762aae74d914f27f15d8acd86128b95d11b39
author
bnema · · 2025-12-30 20:27 UTC
parent
8af2710
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
5 files · +25 -11
M dev.bnema.Dumber.desktop +1 -1
@@ -1,7 +1,7 @@
11 [Desktop Entry]
22 Name=Dumber
33 Comment=A minimal keyboard-driven browser for tiling WMs
4-Exec=dumber
4+Exec=dumber browse
55 Icon=dev.bnema.Dumber
66 Terminal=false
77 Type=Application
@@ -1,7 +1,7 @@
1 [Desktop Entry]1 [Desktop Entry]
2 Name=Dumber2 Name=Dumber
3 Comment=A minimal keyboard-driven browser for tiling WMs3 Comment=A minimal keyboard-driven browser for tiling WMs
4-Exec=dumber4+Exec=dumber browse
5 Icon=dev.bnema.Dumber5 Icon=dev.bnema.Dumber
6 Terminal=false6 Terminal=false
7 Type=Application7 Type=Application
M dev.bnema.Dumber.yml +4 -3
@@ -7,14 +7,15 @@ command: dumber
77 finish-args:
88 # Display (Wayland only)
99 - --socket=wayland
10+ # GPU rendering and hardware video decoding (VA-API)
1011 - --device=dri
1112 # Network (browser)
1213 - --share=network
13- # Audio/Video playback
14+ # Audio/Video playback via PulseAudio
1415 - --socket=pulseaudio
15- # Camera/Webcam access (for video calls)
16+ # Camera/Webcam access (for video calls like Zoom, Meet, etc.)
1617 - --device=all
17- # Downloads
18+ # Downloads folder
1819 - --filesystem=xdg-download
1920 # Open local HTML files
2021 - --filesystem=home:ro
@@ -7,14 +7,15 @@ command: dumber
7 finish-args:7 finish-args:
8 # Display (Wayland only)8 # Display (Wayland only)
9 - --socket=wayland9 - --socket=wayland
10+ # GPU rendering and hardware video decoding (VA-API)
10 - --device=dri11 - --device=dri
11 # Network (browser)12 # Network (browser)
12 - --share=network13 - --share=network
13- # Audio/Video playback14+ # Audio/Video playback via PulseAudio
14 - --socket=pulseaudio15 - --socket=pulseaudio
15- # Camera/Webcam access (for video calls)16+ # Camera/Webcam access (for video calls like Zoom, Meet, etc.)
16 - --device=all17 - --device=all
17- # Downloads18+ # Downloads folder
18 - --filesystem=xdg-download19 - --filesystem=xdg-download
19 # Open local HTML files20 # Open local HTML files
20 - --filesystem=home:ro21 - --filesystem=home:ro
M internal/bootstrap/gui.go +10 -0
@@ -15,6 +15,7 @@ import (
1515 "github.com/bnema/dumber/internal/infrastructure/colorscheme"
1616 "github.com/bnema/dumber/internal/infrastructure/config"
1717 "github.com/bnema/dumber/internal/infrastructure/deps"
18+ "github.com/bnema/dumber/internal/infrastructure/env"
1819 "github.com/bnema/dumber/internal/infrastructure/media"
1920 "github.com/bnema/dumber/internal/infrastructure/persistence/sqlite"
2021 "github.com/bnema/dumber/internal/logging"
@@ -185,7 +186,16 @@ func RunDeferredInit(input DeferredInitInput) DeferredInitResult {
185186
186187 // CheckRuntimeRequirements verifies WebKitGTK and other runtime dependencies.
187188 // Returns error if requirements are not met; caller should log details and exit.
189+// Note: When running in a Flatpak sandbox, runtime checks are skipped because
190+// the Flatpak runtime provides all required libraries.
188191 func CheckRuntimeRequirements(ctx context.Context, cfg *config.Config) error {
192+ // Skip pkg-config checks in Flatpak - the runtime provides all dependencies
193+ if env.IsFlatpak() {
194+ log := logging.FromContext(ctx)
195+ log.Debug().Msg("running in Flatpak sandbox, skipping runtime dependency checks")
196+ return nil
197+ }
198+
189199 probe := deps.NewPkgConfigProbe()
190200 checkRuntimeUC := usecase.NewCheckRuntimeDependenciesUseCase(probe)
191201 runtimeOut, err := checkRuntimeUC.Execute(ctx, usecase.CheckRuntimeDependenciesInput{
@@ -15,6 +15,7 @@ import (
15 "github.com/bnema/dumber/internal/infrastructure/colorscheme"15 "github.com/bnema/dumber/internal/infrastructure/colorscheme"
16 "github.com/bnema/dumber/internal/infrastructure/config"16 "github.com/bnema/dumber/internal/infrastructure/config"
17 "github.com/bnema/dumber/internal/infrastructure/deps"17 "github.com/bnema/dumber/internal/infrastructure/deps"
18+ "github.com/bnema/dumber/internal/infrastructure/env"
18 "github.com/bnema/dumber/internal/infrastructure/media"19 "github.com/bnema/dumber/internal/infrastructure/media"
19 "github.com/bnema/dumber/internal/infrastructure/persistence/sqlite"20 "github.com/bnema/dumber/internal/infrastructure/persistence/sqlite"
20 "github.com/bnema/dumber/internal/logging"21 "github.com/bnema/dumber/internal/logging"
@@ -185,7 +186,16 @@ func RunDeferredInit(input DeferredInitInput) DeferredInitResult {
185 186
186 // CheckRuntimeRequirements verifies WebKitGTK and other runtime dependencies.187 // CheckRuntimeRequirements verifies WebKitGTK and other runtime dependencies.
187 // Returns error if requirements are not met; caller should log details and exit.188 // Returns error if requirements are not met; caller should log details and exit.
189+// Note: When running in a Flatpak sandbox, runtime checks are skipped because
190+// the Flatpak runtime provides all required libraries.
188 func CheckRuntimeRequirements(ctx context.Context, cfg *config.Config) error {191 func CheckRuntimeRequirements(ctx context.Context, cfg *config.Config) error {
192+ // Skip pkg-config checks in Flatpak - the runtime provides all dependencies
193+ if env.IsFlatpak() {
194+ log := logging.FromContext(ctx)
195+ log.Debug().Msg("running in Flatpak sandbox, skipping runtime dependency checks")
196+ return nil
197+ }
198+
189 probe := deps.NewPkgConfigProbe()199 probe := deps.NewPkgConfigProbe()
190 checkRuntimeUC := usecase.NewCheckRuntimeDependenciesUseCase(probe)200 checkRuntimeUC := usecase.NewCheckRuntimeDependenciesUseCase(probe)
191 runtimeOut, err := checkRuntimeUC.Execute(ctx, usecase.CheckRuntimeDependenciesInput{201 runtimeOut, err := checkRuntimeUC.Execute(ctx, usecase.CheckRuntimeDependenciesInput{
M internal/infrastructure/env/manager.go +8 -0
@@ -12,6 +12,14 @@ import (
1212 "github.com/bnema/dumber/internal/logging"
1313 )
1414
15+// IsFlatpak returns true if the application is running inside a Flatpak sandbox.
16+// The Flatpak runtime provides all required libraries, so host pkg-config checks
17+// should be skipped when running in this environment.
18+func IsFlatpak() bool {
19+ _, err := os.Stat("/.flatpak-info")
20+ return err == nil
21+}
22+
1523 // Manager implements port.RenderingEnvManager for configuring
1624 // environment variables for GStreamer, WebKit, and GTK/GSK.
1725 type Manager struct {
@@ -12,6 +12,14 @@ import (
12 "github.com/bnema/dumber/internal/logging"12 "github.com/bnema/dumber/internal/logging"
13 )13 )
14 14
15+// IsFlatpak returns true if the application is running inside a Flatpak sandbox.
16+// The Flatpak runtime provides all required libraries, so host pkg-config checks
17+// should be skipped when running in this environment.
18+func IsFlatpak() bool {
19+ _, err := os.Stat("/.flatpak-info")
20+ return err == nil
21+}
22+
15 // Manager implements port.RenderingEnvManager for configuring23 // Manager implements port.RenderingEnvManager for configuring
16 // environment variables for GStreamer, WebKit, and GTK/GSK.24 // environment variables for GStreamer, WebKit, and GTK/GSK.
17 type Manager struct {25 type Manager struct {
M internal/infrastructure/updater/applier.go +2 -7
@@ -9,6 +9,7 @@ import (
99 "golang.org/x/sys/unix"
1010
1111 "github.com/bnema/dumber/internal/infrastructure/config"
12+ "github.com/bnema/dumber/internal/infrastructure/env"
1213 "github.com/bnema/dumber/internal/logging"
1314 )
1415
@@ -63,7 +64,7 @@ func (a *Applier) CanSelfUpdate(ctx context.Context) bool {
6364 log := logging.FromContext(ctx)
6465
6566 // Flatpak sandboxed apps should not self-update; Flatpak handles updates.
66- if isFlatpak() {
67+ if env.IsFlatpak() {
6768 log.Debug().Msg("running in Flatpak sandbox, self-update disabled")
6869 return false
6970 }
@@ -88,12 +89,6 @@ func (a *Applier) CanSelfUpdate(ctx context.Context) bool {
8889 return true
8990 }
9091
91-// isFlatpak returns true if the application is running inside a Flatpak sandbox.
92-func isFlatpak() bool {
93- _, err := os.Stat("/.flatpak-info")
94- return err == nil
95-}
96-
9792 // GetBinaryPath returns the path to the currently running binary.
9893 func (*Applier) GetBinaryPath() (string, error) {
9994 path, err := os.Executable()
@@ -9,6 +9,7 @@ import (
9 "golang.org/x/sys/unix"9 "golang.org/x/sys/unix"
10 10
11 "github.com/bnema/dumber/internal/infrastructure/config"11 "github.com/bnema/dumber/internal/infrastructure/config"
12+ "github.com/bnema/dumber/internal/infrastructure/env"
12 "github.com/bnema/dumber/internal/logging"13 "github.com/bnema/dumber/internal/logging"
13 )14 )
14 15
@@ -63,7 +64,7 @@ func (a *Applier) CanSelfUpdate(ctx context.Context) bool {
63 log := logging.FromContext(ctx)64 log := logging.FromContext(ctx)
64 65
65 // Flatpak sandboxed apps should not self-update; Flatpak handles updates.66 // Flatpak sandboxed apps should not self-update; Flatpak handles updates.
66- if isFlatpak() {67+ if env.IsFlatpak() {
67 log.Debug().Msg("running in Flatpak sandbox, self-update disabled")68 log.Debug().Msg("running in Flatpak sandbox, self-update disabled")
68 return false69 return false
69 }70 }
@@ -88,12 +89,6 @@ func (a *Applier) CanSelfUpdate(ctx context.Context) bool {
88 return true89 return true
89 }90 }
90 91
91-// isFlatpak returns true if the application is running inside a Flatpak sandbox.
92-func isFlatpak() bool {
93- _, err := os.Stat("/.flatpak-info")
94- return err == nil
95-}
96-
97 // GetBinaryPath returns the path to the currently running binary.92 // GetBinaryPath returns the path to the currently running binary.
98 func (*Applier) GetBinaryPath() (string, error) {93 func (*Applier) GetBinaryPath() (string, error) {
99 path, err := os.Executable()94 path, err := os.Executable()

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close