Skip to content

Is there any way to open the specified directory and locate the file? #18243

Answered by thevortexcloud
nasterhe asked this question in Q&A
Discussion options

You must be logged in to vote

So you want to open the OS file browser? That's sort of complicated on Linux. There is no single or defacto file browser for Linux. Some file browsers may not even support the functionality you want. If you are targeting a specific distribution you can make some assumptions (even though they may still be wrong, EG it's possible to install Nautilus on KUbuntu, which out of the box uses Dolphin). The easiest generic thing you can probably do is run xdg-open FOLDERPATH to open the folder. Assuming the user:

  1. Has a file browser installed
  2. Has xdg-open installed

It will probably work. If you give it the file path however it will try to open the actual file. The next more complicated thing you …

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@nasterhe
Comment options

@thevortexcloud
Comment options

Answer selected by nasterhe
@nasterhe
Comment options

@thevortexcloud
Comment options

@nasterhe
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants