[Thunar-dev] Fuse, scripts and thunar

Erlend Davidson E.R.M.Davidson at sms.ed.ac.uk
Wed Aug 29 17:03:44 CEST 2007



mmassonnet at gmail.com wrote:
> I did the next: 1) I created a personal mount directory (/mnt/mike), 2)
> I created a directory for each machines I want to mount, 3) I created
> two custom actions, 4) and I have set a list of file patterns for both
> actions to match the name of the machines.
>
> The mount action in Thunar custom action dialog is as simple as: 
>
> 	sshfs %n: /mnt/mike/%n
>
> and the unmount action:
>
> 	fusermount -u %f
>
> If you try to mount twice it throws an error (permission denied), so
> there's no real deal to script that, neither for unmount.
>
> That done, I can create /mnt/mike/remotemachine.tld for a remote machine
> over Internet, as I can create /mnt/mike/localmachine.  Now when the
> machine to connect to is not on the default port, the simple way is to
> specify it in ~/.ssh/config.
>
> Now about Thunar, I'll be happy and pleased to see some "fuse"
> integration in it, like listing the mounted volumes and being able to
> unmount them.  But the custom actions is probably the niftiest tool for
> any application :p
>   
>
Yeah that's a cool trick.  I think it would be better for most users if 
these filesystems were properly suppported by thunar.  By putting icons 
above the shortcuts they look like removable media devices (which is as 
close an analogy as I think you can make). 

fusesmb is a nice simple example since it requires no configuration.  If 
the fusesmb binary is found in the path a device icon could appear with 
"Windows Shares" written on it, so that when the user clicks it a script 
is run which executes fusesmb (like my script before) and then thunar 
navigates to that directory.

These scripts could either be distributed with thunar (enable/disabled 
by the user) or via a project in the same way as thunar-thumbnailers.

Maybe it would be better to stick it in the xfce-places panel plugin as 
a test, just to see how it works?




More information about the Thunar-dev mailing list