8
submitted 1 year ago by Vilian@lemmy.ca to c/golang@programming.dev

hello, noob here, so, i was writing a program in go to edit a image, and for now i use os.Open(file) to select the file, how i wanted to open the file chooser maybe using org.freedesktop.portal.FileChooser for the user to select the file, but i trying searching it and i couldn't find an answer, maybe i was using the wrong keywords, but anyway, i hope some can help me, thank you!

btw, i'm also not familiar with portals, i was hoping that i could learn a bit more how they work

top 3 comments
sorted by: hot top controversial new old
[-] Vilian@lemmy.ca 1 points 1 year ago* (last edited 1 year ago)

edit: ok, i discover that i can use dbus-send --session --print-reply --dest=org.freedesktop.FileManager1 --type=method_call /org/freedesktop/FileManager1 org.freedesktop.FileManager1.ShowItems array:string:"file:///home/me/path/to/folder/or/file" string:"", maybe i run it as host, or i try to discover how to use the dbus go package?

[-] Vilian@lemmy.ca 1 points 1 year ago

nevermind, i don't have knowledge to knwo how to use the dbus go bindings :(

[-] bananamanstan@programming.dev 1 points 1 year ago

Have you seen zenity or dialog? Zenity looks to include additional functionality you may not need but looks to be more active and maintained.

load more comments
view more: next ›
this post was submitted on 22 Jul 2023
8 points (100.0% liked)

Golang

0 readers
1 users here now

This is a community dedicated to the go programming language.

Useful Links:

Rules:

founded 1 year ago
MODERATORS