Xfce Forum

Sub domains
 

You are not logged in.

#1 2013-01-23 18:21:43

Hatta
Member
Registered: 2010-05-10
Posts: 6

File associations and command line options and multiple selections

I want to edit one of my file associations to add a command line.  All I want to do is run 'imagej -o <files>' instead of just 'imagej <files> when I select Open With ImageJ.  Where is the file where this association is stored?  If I can edit that and add '-o' to the command line everything will be awesome.

I tried using "open with other application" and creating a "custom command" that runs 'imagej -o'.  It created an association, but that association is underneath the "open with other application" menu.  The problem there is that the "open with other application" menu is greyed out when I select multiple files. 

The fundamental problem is that Thunar executes a new instance of ImageJ for each selection.  The correct behavior is for it to pass all the files to the associated application on one command line.  'imagej file1.jpg file2.jpg file3.jpg' etc.  The -o option for imagej works around this, by starting a new instance of imagej, which locates the preexisting instance and sends the file to the prexisting instance. 

Either getting the -o option into my file association, or configuring Thunar to correctly launch multiple files would solve my problem.

Offline

#2 2013-01-23 18:47:21

Hatta
Member
Registered: 2010-05-10
Posts: 6

Re: File associations and command line options and multiple selections

Ah, I did it.  Someone on IRC helped me find the .desktop file where I could edit the command line for ImageJ.   Why aren't these files mentioned in XFCE's documentation?

Offline

#3 2013-01-23 19:14:04

Hatta
Member
Registered: 2010-05-10
Posts: 6

Re: File associations and command line options and multiple selections

Crap, no it's not working as I thought it would.  How do I make this work?  I can't be the only person who wants to pass multiple files to one application from Thunar?  Why doesn't this "just work"?

Offline

#4 2013-01-23 19:18:13

Hatta
Member
Registered: 2010-05-10
Posts: 6

Re: File associations and command line options and multiple selections

Also, my list of file associations is getting crowded with failed attempts to make this work.  How do I delete associations?  If I right click on them in the "open with" dialog, I see an option to "remove launcher" but it's greyed out.  WTF?

Offline

#5 2013-01-23 19:24:54

Hatta
Member
Registered: 2010-05-10
Posts: 6

Re: File associations and command line options and multiple selections

ok, now it's working again, but I can't figure out which solution fixed it, because I can't see which command line the 'imagej' I'm using right now is launching.  I've got 4 entries in the open with list titled 'imagej' and I have no idea what is launching what.  How do I delete the unwanted 'imagej' entries, and how do I determine what command line the working entry is calling, so I can use the same solution for future apps?

Offline

Board footer

Powered by FluxBB