Standard way to open a folder window in linux?

前端 未结 3 1247
心在旅途
心在旅途 2021-02-20 14:19

I want to open a folder window, in the appropriate file manager, from within a cross-platform (windows/mac/linux) Python application.

On OSX, I can open a window in the

3条回答
  •  失恋的感觉
    2021-02-20 15:11

    You're going to have to do this based on the running window manager. OSX and Windows have a (defacto) standard way because there is only one choice.

    You shouldn't need to specify the exact filemanager application, though, this should be possible to do through the wm. I know Gnome does, and it's important to do this in KDE since there are two possible file managers (Konqueror/Dolphin) that may be in use.

    I agree that this would be a good thing for freedesktop.org to standardize, although I doubt it will happen unless someone steps up and volunteers to do it.


    EDIT: I wasn't aware of xdg-open. Good to know!

提交回复
热议问题