Hi list,

Linux doesn't let you define that a file extension .pd shall be opened with pd-gui. Since .pd files are of the texfile MIME type, if you set them to be opened by pd-gui, also every double click on a text document will launch pd-gui. Instead, when you want .pd files to be opened with the pd-gui executable, you first need to register a new MIME type. This is done by installing an XML file of the freedesktop standard "shared-mime-info".

Albert Graef has made one for pd-l2ork/Purr Data, which you can find here:
https://github.com/pd-l2ork/pd/blob/master/debuild/debian/sharedmimeinfo

I've adapted that to Pure Data:
https://github.com/chairaudio/pd-icon/blob/mime-install/x-puredata.xml

Dan Wilcox made this repository with icons for Pure Data: https://github.com/pure-data/pd-icon
I have forked that and added a method to install the mime type
https://github.com/chairaudio/pd-icon/tree/mime-install

The command "make mime-register" will add the MIME type.
It's adapted from what I found here: https://stackoverflow.com/questions/30931/register-file-extensions-mime-types-in-linux/31836#31836

There are some comments on my pull request by IOhannes: https://github.com/pure-data/pd-icon/pull/6

Anyway, maybe someone more knowledgable can take over here, the goal is to include this to the Pd installation so that Pd documents on Linux have the Pd file icon and are opened by pd-gui by default.

m.



_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to