Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-04-12 14:20:21

gerardx
Member
Registered: 2020-07-13
Posts: 5

Open thunar from web browser?

I'm try to add an x-schema-handler to /usr/share/applications/defaults.list that will open a directory in thunar.

I tried x-scheme-handler/thunar=thunar.desktop, which seems to open thunar if I enter thunar:/tmp in my browser, but it always goes to my desktop.

Is there a way to do this without writing a custom app?

Offline

#2 2023-04-12 14:58:43

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,992

Re: Open thunar from web browser?

If you want to open thunar in a specific folder from the command line, you would run:

thunar /tmp

...or to be file manager agnostic:

xdg-open /tmp

...or to use Xfce's exo utility:

exo-open --launch FileManager /tmp

Or, to use dbus (as most web browsers do):

dbus-send --session \
          --print-reply \
          --dest=org.freedesktop.FileManager1 \
          /org/freedesktop/FileManager1 \
          org.freedesktop.FileManager1.ShowFolders \
          array:string:"file:/tmp" string:""

If the preceding command doesn't open in thunar, then you have a conflict and some other program has claimed control of the org.freedesktop.FileManager1 interface (which would explain why thunar isn't being opened from the web browser).

Questions:

  1. Which file manager is opening from the web browser?

  2. Which web browser are you using?

  3. Which distro and version of thunar are you using?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2023-04-12 17:35:38

gerardx
Member
Registered: 2020-07-13
Posts: 5

Re: Open thunar from web browser?

Thanks. The dbus-send worked, which led me to figuring out I just had the URI syntax wrong. (I was using file:// instead of file:/// )

Offline

Board footer

Powered by FluxBB