[Gambas-user] Get the default file manager

Gianluigi gradobag at gradobag.it
Sat Feb 17 12:12:37 CET 2024


Il 16/02/24 23:33, vuott--- via User ha scritto:
> Hi,
>
> I was using Desktop.Open(Path) to open the directory of the shrimp
> projects but now this statement opens the ide, I guess because at some
> point I opened a shrimp project from the file manager and the system
> "memorized" this action.
>
> Anyway, how can I get the name of the default application that manages
> the files? in my case it is Thunar because I use XFCE but what is the
> general way?
>
> Best regards.
>
> Martin.

I forgot,

after the last fix you can also do something like this:

Public Sub Main()

   Dim sApp, s As String

   Shell "xdg-mime query default inode/directory" To sApp  ' Get
.desktop file name of filemanager launcher.
   s = Scan(sApp, "*[.- ]*")[0]
   Print s

End

Regards
Gianluigi



More information about the User mailing list