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

  • Vilian@lemmy.caOP
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    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.caOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

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