1

I want to create a file manager context menu entry to play directory contents in a music player, namely Audacious.

I have already created a file /usr/share/contractor/audacious_play_dir.contract like so:

[Contractor Entry]
Name=Play in Audacious
Icon=audacious
MimeType=inode/directory
Exec=audacious %F

but for some reason Audacious does not appear in the context menu, while trying the same procedure for other players it works very well; for Deadbeef:

[Contractor Entry]
Name=Play in DeadBeef
Icon=deadbeef
MimeType=inode/directory
Exec=deadbeef %F 

for Exaile:

[Contractor Entry]
Name=Play in Exaile Audio Player
Icon=exaile
MimeType=inode/directory
Exec=exaile %F

For Qmmp:

[Contractor Entry]
Name=Play in Qmmp
Icon=qmmp
MimeType=inode/directory
Exec=qmmp %F

and the context menu looks like so:

enter image description here

I want to use Audacious for this and am intrigued why it doesn't work the same way.

I also looked at /usr/share/applications/mimeinfo.cache to see if Audacious is specified for `inode/directory/ mimetype: it is:

inode/directory=Thunar-folder-handler.desktop;decibel-audio-player.desktop;pantheon-files.desktop;audacious.desktop;qmmp_enqueue.desktop;qmmp_dir.desktop;baobab.desktop;pcmanfm.desktop;audacious-qt.desktop;open-pantheon-terminal-here.desktop;

while Deadbeef is not (therefore this file is not important for the issue here)

1 Answer 1

1

I tried this and it worked with this contractor entry:

[Contractor Entry]
Name=Play in Audacious
Icon=audacious
Description=Play directory in Audacious Music Player
MimeType=inode/directory;
Exec=audacious %F
Gettext-Domain=audacious

(I just copied one of the existing ones)

But it also works with the one you quoted above. It does not seem to be particularly sensitive to missing semi-colons, extra spaces etc. The critical thing is spelling the mimetype correctly.

Even without a contract entry you should get Audacious appearing in the "Open with" menu (provided the audacious.desktop file includes the inode/directory mimetype).

I am using the latest version of Files (Loki) which is not released at the moment but I am not aware of any recent changes with regard to contracts.

2
  • so, my contract file works on your system. but yours doesn't work on mine. As you use the Loki version of Files I don't know what to say for now. I avoid 'Open in' for folders because that seemed to change the default file manager (a message saying 'Files is not your default file manager' used to appear).
    – user170
    May 20, 2016 at 10:09
  • could I try the Loki version of Files?
    – user170
    May 20, 2016 at 10:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.