You are not logged in.

#1 2025-06-24 18:49:32

Tadhg
Member
From: Éire
Registered: 2023-01-19
Posts: 18

Use terminal file manager as file selector / xdg-mime default

Hello, does anyone know if there is any way to make a terminal file manager (such as in my case lf) be set to the file selector used when for example opening a file in my browser.
Furthermore does anyone know how to set a default terminal in XDG to open directories with a terminal file manager. By default if I run lf via xdg-open it opens in xterm. The only way I found to change this was my adding my preferred terminal to the exec section of the lf.desktop file like so:

[Desktop Entry]
Type=Application
Name=lf
Comment=Launches the lf file manager
Icon=utilities-terminal
Terminal=true
Exec=footclient lf
Categories=ConsoleOnly;System;FileTools;FileManager
MimeType=inode/directory;

But I don't like this solution as it feels pretty tacky and also it still opens an empty xterm window for some reason. Surely there's a more principled and effective way of doing this?


Is fuath liom fuinneoga

Offline

#2 2025-06-24 19:32:46

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,723

Re: Use terminal file manager as file selector / xdg-mime default

There's not really a standard way to set the default TE - it very much hinges on the desktop environment, xdg-open backend in use
https://bbs.archlinux.org/viewtopic.php?id=286905
https://bbs.archlinux.org/viewtopic.php?id=300118

The file dialogs (typically, there're exceptions) aren't some external process but part of the application.
For clients that seek desktop intergration using xdg-desktop-portal, you'd need a custom portal implementation to run some custom dialog (the file manager will still have to return the selected file - somehow)

Offline

Board footer

Powered by FluxBB