I'm writing a script to use as a button on a personal toolbar.

Well, I'd like to know if there is a generic command to call the file manager which would work in any distro (or maybe in any ubuntu derived distro).

For example:

  1. on Ubuntu I'd call nautilus
  2. on Lubuntu I'd call pcmanfm
  3. on Xubuntu I'd call (thunar?)

But I'd like to simply use a general command, for example, filemanager.

Is it possible?

  • This is a user preference, it has nothing to do with the distribution. – Gilles 'SO- stop being evil' Jul 29 '14 at 22:45
  • @Gilles, so the solution given below could work with any distro? – Sigur Jul 29 '14 at 23:05

Passing xdg-open a directory name should open the file manager:

xdg-open ~/
  • This is likely the best solution, but the distributed nature of *nix means that this solution still isn't a sure thing. It will only work if the user has a file manager of which xdg-open is aware. – HalosGhost Jul 30 '14 at 0:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.