Supersonic: lightweight cross-platform desktop client for Subsonic music servers

Project information: A lightweight cross-platform desktop client for Subsonic music servers

Name: Supersonic
Homepage: https://github.com/dweymouth/supersonic
License: GPL-3.0 license
Upstream has been contacted: yes

Update: Now with a PR!

I have somewhat progressed on this front. I have a .yml file that builds correctly, but doesn’t quite run correctly yet. It also needs --share=network because I haven’t figured out the proper magic to properly ship all the right source tarballs for all the dependencies.

Has anyone else pulled this off? is there a magic tool for this?

i pushed my work to this repo GitHub - anarcat/com.github.dweymouth.supersonic

so the app does not run. i can’t figure out why, but it crashes with some sort of GLFW error:

anarcat@angela:com.github.dweymouth.supersonic[SIGINT]$ flatpak-builder build-dir com.github.dweymouth.supersonic.yml  --keep-build-dirs --force-clean ; echo
Emptying app dir 'build-dir'
Downloading sources
Starting build of com.github.dweymouth.supersonic
Cache hit for libass, skipping build
Cache hit for mpv, skipping build
Cache hit for finecmd, skipping build
Cache miss, checking out last cache hit
========================================================================
Building module supersonic in /home/anarcat/dist/com.github.dweymouth.supersonic/.flatpak-builder/build/supersonic-25
========================================================================
Running: . /usr/lib/sdk/golang/enable.sh && CGO_LDFLAGS=-L/app/lib go build -v .
go: downloading github.com/dweymouth/fyne/v2 v2.3.0-rc1.0.20230331041414-b548301c117c
go: downloading github.com/dweymouth/go-subsonic v0.0.0-20230210044542-537b9238299b
go: downloading github.com/20after4/configdir v0.1.1
go: downloading github.com/google/uuid v1.3.0
go: downloading github.com/pelletier/go-toml v1.9.3
go: downloading github.com/zalando/go-keyring v0.2.1
go: downloading golang.org/x/net v0.0.0-20220722155237-a158d28d115b
go: downloading github.com/godbus/dbus/v5 v5.1.0
go: downloading github.com/yuin/goldmark v1.4.13
go: downloading golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f
go: downloading github.com/fsnotify/fsnotify v1.5.4
go: downloading github.com/fredbi/uri v0.1.0
go: downloading github.com/go-text/typesetting v0.0.0-20221212183139-1eb938670a1f
go: downloading github.com/goki/freetype v0.0.0-20220119013949-7a161fd3728c
go: downloading github.com/srwiley/rasterx v0.0.0-20210519020934-456a8d69b780
go: downloading golang.org/x/image v0.0.0-20220601225756-64ec528b34cd
go: downloading fyne.io/systray v1.10.1-0.20230324154429-a8f53a63dc8d
go: downloading github.com/fyne-io/image v0.0.0-20220602074514-4956b0afb3d2
go: downloading github.com/go-gl/glfw/v3.3/glfw v0.0.0-20221017161538-93cebf72946b
go: downloading github.com/srwiley/oksvg v0.0.0-20220731023508-a61f04f16b76
go: downloading github.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6
go: downloading github.com/benoitkugler/textlayout v0.3.0
go: downloading github.com/jsummers/gobmp v0.0.0-20151104160322-e2ba15ffa76e
go: downloading golang.org/x/text v0.6.0
internal/unsafeheader
internal/coverage/rtcov
unicode/utf8
internal/goos
internal/goarch
math/bits
internal/goexperiment
unicode
internal/itoa
runtime/internal/syscall
internal/race
internal/cpu
runtime/internal/atomic
container/list
sync/atomic
image/color
internal/abi
runtime/internal/math
crypto/internal/alias
crypto/subtle
crypto/internal/boring/sig
unicode/utf16
runtime/internal/sys
vendor/golang.org/x/crypto/cryptobyte/asn1
internal/nettrace
vendor/golang.org/x/crypto/internal/alias
encoding
golang.org/x/net/html/atom
golang.org/x/text/encoding/internal/identifier
golang.org/x/text/internal/utf8internal
github.com/go-text/typesetting/di
golang.org/x/image/math/f64
golang.org/x/sys/internal/unsafeheader
fyne.io/fyne/v2/internal/color
image/color/palette
golang.org/x/image/colornames
internal/bytealg
math
runtime
github.com/benoitkugler/textlayout/fonts
math/cmplx
internal/reflectlite
sync
internal/testlog
internal/godebug
internal/singleflight
runtime/cgo
internal/intern
math/rand
errors
sort
internal/oserror
internal/safefilepath
path
io
vendor/golang.org/x/net/dns/dnsmessage
strconv
crypto/internal/nistec/fiat
syscall
golang.org/x/text/internal/tag
container/heap
hash
crypto/internal/randutil
bytes
strings
hash/adler32
hash/crc32
vendor/golang.org/x/text/transform
golang.org/x/text/transform
crypto/rc4
crypto
net/netip
reflect
net/http/internal/ascii
bufio
regexp/syntax
golang.org/x/text/encoding
golang.org/x/text/runes
image
golang.org/x/text/encoding/internal
golang.org/x/text/encoding/charmap
golang.org/x/text/encoding/unicode
golang.org/x/text/encoding/korean
golang.org/x/text/encoding/simplifiedchinese
golang.org/x/text/encoding/traditionalchinese
golang.org/x/text/encoding/japanese
internal/syscall/unix
internal/syscall/execenv
time
image/internal/imageutil
image/draw
image/jpeg
regexp
golang.org/x/image/draw
golang.org/x/image/vector
github.com/benoitkugler/textlayout/fonts/glyphsnames
context
io/fs
internal/poll
embed
os
internal/fmtsort
encoding/binary
crypto/cipher
encoding/base64
crypto/md5
crypto/internal/edwards25519/field
vendor/golang.org/x/crypto/internal/poly1305
golang.org/x/image/ccitt
crypto/internal/nistec
golang.org/x/sys/unix
encoding/pem
vendor/golang.org/x/crypto/chacha20
crypto/internal/boring
crypto/des
crypto/internal/edwards25519
crypto/hmac
crypto/sha512
crypto/sha1
crypto/sha256
crypto/aes
io/ioutil
net
path/filepath
os/signal
fmt
supersonic/backend/util
vendor/golang.org/x/crypto/hkdf
vendor/golang.org/x/sys/cpu
vendor/golang.org/x/crypto/chacha20poly1305
github.com/20after4/configdir
os/exec
crypto/ecdh
log
encoding/hex
net/url
mime/quotedprintable
net/http/internal
golang.org/x/image/math/fixed
mime
vendor/golang.org/x/net/http2/hpack
compress/flate
encoding/xml
encoding/json
vendor/golang.org/x/text/unicode/norm
math/big
golang.org/x/net/html
golang.org/x/text/internal/language
github.com/benoitkugler/textlayout/fonts/binaryreader
github.com/srwiley/rasterx
vendor/golang.org/x/text/unicode/bidi
github.com/benoitkugler/textlayout/fonts/psinterpreter
golang.org/x/image/tiff/lzw
github.com/benoitkugler/textlayout/language
github.com/goki/freetype/raster
golang.org/x/image/font
github.com/benoitkugler/textlayout/unicodedata
github.com/go-text/typesetting/language
github.com/yuin/goldmark/util
compress/gzip
github.com/go-gl/gl/v3.2-core/gl
vendor/golang.org/x/text/secure/bidirule
compress/zlib
github.com/goki/freetype/truetype
os/user
github.com/jsummers/gobmp
github.com/go-gl/glfw/v3.3/glfw
golang.org/x/image/tiff
image/png
golang.org/x/text/internal/language/compact
golang.org/x/sys/execabs
github.com/go-text/typesetting/segmenter
compress/lzw
database/sql/driver
golang.org/x/text/language
image/gif
github.com/fsnotify/fsnotify
supersonic/player
vendor/golang.org/x/net/idna
crypto/rand
crypto/elliptic
crypto/internal/bigmod
crypto/internal/boring/bbig
encoding/asn1
crypto/dsa
crypto/ed25519
github.com/fyne-io/image/ico
github.com/goki/freetype
crypto/rsa
github.com/pelletier/go-toml
golang.org/x/text/encoding/htmlindex
golang.org/x/net/html/charset
github.com/srwiley/oksvg
crypto/x509/pkix
vendor/golang.org/x/crypto/cryptobyte
crypto/ecdsa
vendor/golang.org/x/net/http/httpproxy
github.com/fredbi/uri
net/textproto
github.com/google/uuid
crypto/x509
github.com/godbus/dbus/v5
vendor/golang.org/x/net/http/httpguts
mime/multipart
github.com/yuin/goldmark/text
crypto/tls
github.com/yuin/goldmark/ast
github.com/godbus/dbus/v5/introspect
github.com/zalando/go-keyring/secret_service
fyne.io/systray/internal/generated/menu
github.com/godbus/dbus/v5/prop
fyne.io/systray/internal/generated/notifier
github.com/zalando/go-keyring
fyne.io/systray
github.com/yuin/goldmark/renderer
github.com/yuin/goldmark/parser
github.com/yuin/goldmark/renderer/html
github.com/yuin/goldmark
net/http/httptrace
net/http
github.com/dweymouth/go-subsonic/subsonic
fyne.io/fyne/v2
fyne.io/fyne/v2/internal/cache
fyne.io/fyne/v2/driver/mobile
fyne.io/fyne/v2/internal/svg
fyne.io/fyne/v2/internal/animation
fyne.io/fyne/v2/storage/repository
fyne.io/fyne/v2/driver/desktop
fyne.io/fyne/v2/internal/async
supersonic/res
supersonic/ui/os
fyne.io/fyne/v2/storage
supersonic/sharedutil
fyne.io/fyne/v2/internal/driver
supersonic/backend
fyne.io/fyne/v2/internal/repository
fyne.io/fyne/v2/canvas
fyne.io/fyne/v2/data/binding
fyne.io/fyne/v2/internal/app
fyne.io/fyne/v2/theme
fyne.io/fyne/v2/internal/widget
supersonic/ui/theme
fyne.io/fyne/v2/layout
supersonic/ui/layouts
fyne.io/fyne/v2/internal
github.com/benoitkugler/textlayout/fonts/simpleencodings
github.com/benoitkugler/textlayout/fonts/type1C
github.com/benoitkugler/textlayout/fonts/truetype
github.com/benoitkugler/textlayout/graphite
github.com/benoitkugler/textlayout/harfbuzz
github.com/go-text/typesetting/font
github.com/go-text/typesetting/shaping
fyne.io/fyne/v2/internal/painter
fyne.io/fyne/v2/widget
supersonic/ui/util
fyne.io/fyne/v2/container
supersonic/ui/widgets
fyne.io/fyne/v2/dialog
supersonic/ui/dialogs
supersonic/ui/controller
supersonic/ui/browsing
supersonic/ui
fyne.io/fyne/v2/internal/painter/gl
fyne.io/fyne/v2/internal/driver/common
fyne.io/fyne/v2/internal/driver/glfw
fyne.io/fyne/v2/app
supersonic
Running: . /usr/lib/sdk/golang/enable.sh && CGO_LDFLAGS=-L/app/lib /app/bin/fyne package -os linux -name Supersonic -icon ./res/appicon-500.png
Running: tar -C /app --strip-components=1 -x -v -f /run/build/supersonic/Supersonic.tar.xz
usr/share/
usr/share/pixmaps/
usr/share/pixmaps/Supersonic.png
usr/share/applications/
usr/share/applications/Supersonic.desktop
usr/bin/
usr/bin/supersonic
Running: ls -al /app/bin/supersonic
-rwxr-xr-x 1 anarcat anarcat 25135424 Apr 13 19:54 /app/bin/supersonic
debugedit: /home/anarcat/dist/com.github.dweymouth.supersonic/.flatpak-builder/rofiles/rofiles-T4kmAO/files/bin/supersonic: DWARF version 0 unhandled
compressing debuginfo in: /home/anarcat/dist/com.github.dweymouth.supersonic/.flatpak-builder/rofiles/rofiles-T4kmAO/files/bin/supersonic
processing: /home/anarcat/dist/com.github.dweymouth.supersonic/.flatpak-builder/rofiles/rofiles-T4kmAO/files/bin/supersonic
[36] .debug_aranges compressed -> .zdebug_aranges (606 => 584 96.37%)
[37] .debug_info compressed -> .zdebug_info (1962581 => 1952746 99.50%)
[38] .debug_abbrev compressed -> .zdebug_abbrev (4918 => 4887 99.37%)
[39] .debug_line compressed -> .zdebug_line (1020335 => 1017153 99.69%)
[40] .debug_frame compressed -> .zdebug_frame (197764 => 192492 97.33%)
[41] .debug_str compressed -> .zdebug_str (30562 => 30048 98.32%)
[42] .debug_loc compressed -> .zdebug_loc (1114238 => 1064922 95.57%)
[43] .debug_ranges compressed -> .zdebug_ranges (309642 => 294253 95.03%)
[44] .debug_line_str compressed -> .zdebug_line_str (1176 => 1164 98.98%)
[45] .debug_loclists compressed -> .zdebug_loclists (86586 => 86480 99.88%)
[46] .debug_rnglists compressed -> .zdebug_rnglists (6535 => 6527 99.88%)
[47] .debug_gdb_scripts NOT compressed, wouldn't be smaller
[50] Updating section string table
stripping /home/anarcat/dist/com.github.dweymouth.supersonic/.flatpak-builder/rofiles/rofiles-T4kmAO/files/bin/supersonic to /home/anarcat/dist/com.github.dweymouth.supersonic/.flatpak-builder/rofiles/rofiles-T4kmAO/files/lib/debug/bin/supersonic.debug
Committing stage build-supersonic to cache
Cleaning up
Removing files/lib/pkgconfig/libass.pc
Removing files/lib/pkgconfig
Removing files/include/ass/ass_types.h
Removing files/include/ass/ass.h
Removing files/include/ass
Removing files/include
Committing stage cleanup to cache
Finishing app
Not exporting share/applications/Supersonic.desktop, non-allowed export filename
Please review the exported files and the metadata
Committing stage finish to cache
Pruning cache

anarcat@angela:com.github.dweymouth.supersonic$ flatpak-builder --user --install --force-clean build-dir com.github.dweymouth.supersonic.yml 
Emptying app dir 'build-dir'
Downloading sources
Starting build of com.github.dweymouth.supersonic
Cache hit for libass, skipping build
Cache hit for mpv, skipping build
Cache hit for finecmd, skipping build
Cache hit for supersonic, skipping build
Cache hit for cleanup, skipping
Cache hit for finish, skipping
Everything cached, checking out from cache
Exporting com.github.dweymouth.supersonic to repo
Commit: b1caeb36697b3b66fc7769f70a319000740ab8048f91af3f6a0f67e775f70323
Metadata Total: 27
Metadata Written: 3
Content Total: 19
Content Written: 0
Content Bytes Written: 0 (0 bytes)
Exporting com.github.dweymouth.supersonic.Debug to repo
Commit: 18ae06ccc941b32c08755912f55ba7871d1422d087553ff161c614872c79560f
Metadata Total: 73
Metadata Written: 2
Content Total: 416
Content Written: 0
Content Bytes Written: 0 (0 bytes)

(flatpak install:631900): GVFS-WARNING **: 20:51:07.768: Error creating proxy: Error calling StartServiceByName for org.gtk.vfs.Daemon: Unit gvfs-daemon.service is masked. (g-io-error-quark, 36)

Installing app/com.github.dweymouth.supersonic/x86_64/master
Pruning cache
anarcat@angela:com.github.dweymouth.supersonic$ flatpak run com.github.dweymouth.supersonic

(flatpak run:631919): GVFS-WARNING **: 20:51:10.359: Error creating proxy: Error calling StartServiceByName for org.gtk.vfs.Daemon: Unit gvfs-daemon.service is masked. (g-io-error-quark, 36)

F: Can't find a11y bus: GDBus.Error:org.freedesktop.systemd1.UnitMasked: Unit at-spi-dbus-bus.service is masked.
2023/04/13 20:51:10 Starting supersonic...
2023/04/13 20:51:10 Using config dir: /home/anarcat/.var/app/com.github.dweymouth.supersonic/config/supersonic
2023/04/13 20:51:10 Using cache dir: /home/anarcat/.var/app/com.github.dweymouth.supersonic/cache/supersonic
2023/04/13 20:51:10 Error reading app config file: open /home/anarcat/.var/app/com.github.dweymouth.supersonic/config/supersonic/config.toml: no such file or directory
2023/04/13 20:51:10 PlatformError: X11: The DISPLAY environment variable is missing
panic: NotInitialized: The GLFW library is not initialized

goroutine 1 [running, locked to thread]:
github.com/go-gl/glfw/v3.3/glfw.acceptError({0x0, 0x0, 0xc000617ac0?})
	/home/anarcat/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20221017161538-93cebf72946b/error.go:174 +0x1ae
github.com/go-gl/glfw/v3.3/glfw.panicError(...)
	/home/anarcat/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20221017161538-93cebf72946b/error.go:185
github.com/go-gl/glfw/v3.3/glfw.CreateStandardCursor(0xbf5ba0?)
	/home/anarcat/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20221017161538-93cebf72946b/input.go:530 +0x45
fyne.io/fyne/v2/internal/driver/glfw.initCursors()
	/home/anarcat/go/pkg/mod/github.com/dweymouth/fyne/v2@v2.3.0-rc1.0.20230331041414-b548301c117c/internal/driver/glfw/window_desktop.go:47 +0x5f
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).initGLFW.func1()
	/home/anarcat/go/pkg/mod/github.com/dweymouth/fyne/v2@v2.3.0-rc1.0.20230331041414-b548301c117c/internal/driver/glfw/loop_desktop.go:27 +0x54
sync.(*Once).doSlow(0xc000617bd0?, 0x44c585?)
	/usr/lib/sdk/golang/src/sync/once.go:74 +0xc2
sync.(*Once).Do(...)
	/usr/lib/sdk/golang/src/sync/once.go:65
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).initGLFW(0x440cd0?)
	/home/anarcat/go/pkg/mod/github.com/dweymouth/fyne/v2@v2.3.0-rc1.0.20230331041414-b548301c117c/internal/driver/glfw/loop_desktop.go:16 +0x45
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow.func1()
	/home/anarcat/go/pkg/mod/github.com/dweymouth/fyne/v2@v2.3.0-rc1.0.20230331041414-b548301c117c/internal/driver/glfw/window.go:965 +0x4a
fyne.io/fyne/v2/internal/driver/glfw.runOnMain(0xc00044a360)
	/home/anarcat/go/pkg/mod/github.com/dweymouth/fyne/v2@v2.3.0-rc1.0.20230331041414-b548301c117c/internal/driver/glfw/loop.go:61 +0x11d
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).createWindow(0xc000448460, {0xcc7172, 0xa}, 0x1)
	/home/anarcat/go/pkg/mod/github.com/dweymouth/fyne/v2@v2.3.0-rc1.0.20230331041414-b548301c117c/internal/driver/glfw/window.go:964 +0xd8
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).CreateWindow(0x58?, {0xcc7172?, 0xc000617d01?})
	/home/anarcat/go/pkg/mod/github.com/dweymouth/fyne/v2@v2.3.0-rc1.0.20230331041414-b548301c117c/internal/driver/glfw/window.go:956 +0x25
fyne.io/fyne/v2/app.(*fyneApp).NewWindow(0x49b3a5?, {0xcc7172?, 0xfed02da7de003996?})
	/home/anarcat/go/pkg/mod/github.com/dweymouth/fyne/v2@v2.3.0-rc1.0.20230331041414-b548301c117c/app/app.go:69 +0x26
supersonic/ui.NewMainWindow({0xe09038, 0xc0002701b0}, {0xcc7172, 0xa}, {0xcc6c04, 0xa}, 0xc00037c180, {0x466be5?, 0x0?})
	/run/build/supersonic/ui/mainwindow.go:53 +0xd6
main.main()
	/run/build/supersonic/main.go:39 +0x1b6
anarcat@angela:com.github.dweymouth.supersonic[2]$  

at first i thought it was because Fyne wasn’t setup properly but now I’m following the upstream instructions, as far as I can tell, and it just doesn’t work…

… and now I solved that hurdle as well. Now the app starts, and I have a GUI and secrets and everything, but I don’T get any audio. This looks like an upstream bug so I’m not sure it’s a problem with flatpak per se.

I finally have something that works. It’s not quite standards-compliant yet, but it’s getting there.

I’ve submitted a PR against the github flathub/flathub repository but because I’m new here (but definitely not to Discourse, sigh), I can’t actually post the link myself.

Also, it seems like this entire topic was marked as spam, wheepee.