---------- Forwarded message --------- From: Kaj Ailomaa xequential@gmail.com Date: Fri, Jul 16, 2021 at 4:22 AM Subject: Re: [PD] Pd files on Linux: MIME type and (document) icons To: Miller Puckette msp@ucsd.edu
From what I can tell, most MIME's are part of a single package in Linux
distros. In the case of debian based, the package is called shared-mime-info, which includes the file /usr/share/mime/packages/freedesktop.org.xml containing mime types.
On Fri, Jul 16, 2021 at 4:16 AM Kaj Ailomaa xequential@gmail.com wrote:
Hi.
This page discusses how to add new MIME types for freedesktop: https://www.freedesktop.org/wiki/Specifications/AddingMIMETutor/
But, I would probably submit a patch for the main package as explained at the bottom of the page.
/Kaj
On Fri, Jul 16, 2021 at 1:23 AM Miller Puckette via Pd-list < pd-list@lists.iem.at> wrote:
Hi all -
This appears to be a PR to https://github.com/pure-data/pd-icon - but htere seems to be confusion as to whether this should be part of pure data itself. I think it wound be fine to have it in pure data - but I don't know if I should just grab the files and stick them in pure-data or if that would cause trouble somehow.
cheers M
On Sun, Jul 11, 2021 at 12:45:53AM +0200, Max wrote:
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://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_pd-2Dl2ork_p...
I've adapted that to Pure Data:
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_chairaudio_p...
Dan Wilcox made this repository with icons for Pure Data:
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_pure-2Ddata_...
I have forked that and added a method to install the mime type
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_chairaudio_p...
The command "make mime-register" will add the MIME type. It's adapted from what I found here:
https://urldefense.proofpoint.com/v2/url?u=https-3A__stackoverflow.com_quest...
There are some comments on my pull request by IOhannes:
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_pure-2Ddata_...
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.
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management ->
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.puredata.info_lis...
--
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Hi list,
possibly related to this topic, how could we arrive to have web browsers across all OSes download Pd files instead of displaying them as text files? I have many students each year who stumble across this, even more so as their browsers sometimes add an .txt extension to the .pd file they are then trying to save.
best, P
---------- Forwarded message --------- From: Kaj Ailomaa xequential@gmail.com Date: Fri, Jul 16, 2021 at 4:22 AM Subject: Re: [PD] Pd files on Linux: MIME type and (document) icons To: Miller Puckette msp@ucsd.edu
From what I can tell, most MIME's are part of a single package in Linux distros. In the case of debian based, the package is called shared-mime-info, which includes the file /usr/share/mime/packages/freedesktop.org.xml containing mime types.
On Fri, Jul 16, 2021 at 4:16 AM Kaj Ailomaa xequential@gmail.com wrote:
Hi.
This page discusses how to add new MIME types for freedesktop: https://www.freedesktop.org/wiki/Specifications/AddingMIMETutor/
But, I would probably submit a patch for the main package as explained at the bottom of the page.
/Kaj
On Fri, Jul 16, 2021 at 1:23 AM Miller Puckette via Pd-list < pd-list@lists.iem.at> wrote:
Hi all -
This appears to be a PR to https://github.com/pure-data/pd-icon - but htere seems to be confusion as to whether this should be part of pure data itself. I think it wound be fine to have it in pure data - but I don't know if I should just grab the files and stick them in pure-data or if that would cause trouble somehow.
cheers M
On Sun, Jul 11, 2021 at 12:45:53AM +0200, Max wrote:
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://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_pd-2Dl2ork_p...
I've adapted that to Pure Data:
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_chairaudio_p...
Dan Wilcox made this repository with icons for Pure Data:
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_pure-2Ddata_...
I have forked that and added a method to install the mime type
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_chairaudio_p...
The command "make mime-register" will add the MIME type. It's adapted from what I found here:
https://urldefense.proofpoint.com/v2/url?u=https-3A__stackoverflow.com_quest...
There are some comments on my pull request by IOhannes:
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_pure-2Ddata_...
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.
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management ->
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.puredata.info_lis...
--
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On 7/16/21 08:31, Peter P. wrote:
Hi list,
possibly related to this topic, how could we arrive to have web browsers across all OSes download Pd files instead of displaying them as text files? I have many students each year who stumble across this, even more so as their browsers sometimes add an .txt extension to the .pd file they are then trying to save.
by using the "download" tag when creating the hyperlink to the Pd-file. https://www.w3schools.com/tags/att_a_download.asp
gfmdsf IOhannes
On 7/16/21 04:23, Kaj Ailomaa wrote:
---------- Forwarded message --------- From: Kaj Ailomaa xequential@gmail.com Date: Fri, Jul 16, 2021 at 4:22 AM Subject: Re: [PD] Pd files on Linux: MIME type and (document) icons To: Miller Puckette msp@ucsd.edu
From what I can tell, most MIME's are part of a single package in Linux distros. In the case of debian based, the package is called shared-mime-info, which includes the file /usr/share/mime/packages/freedesktop.org.xml containing mime types.
of course not. the freedesktop.org.xml covers many well-known files. but a Pd file is not "well known" to a larger community (unlike e.g. a PDF file). therefore it probably should go into a separate file.
On Fri, Jul 16, 2021 at 4:16 AM Kaj Ailomaa xequential@gmail.com wrote:
Hi.
This page discusses how to add new MIME types for freedesktop: https://www.freedesktop.org/wiki/Specifications/AddingMIMETutor/
hmm well. this page is the canonical reference but doesn't look particularly helpful (unless you start from scratch).
we already have a mime-type file. it's been included in the Debian package by hans-christof more than 10 years ago (2011-05-25). anybody who runs Debian, Ubuntu or some other derivative, could check /usr/share/mime/packages/puredata-gui.xml those who don't can get it from https://salsa.debian.org/multimedia-team/pd/puredata/-/blob/master/debian/puredata-gui.sharedmimeinfo
sidenote: this file also looks remarkably identitical to what albert has created for purr-data and what max proposed in his PR.
but yes: by all means include it in the Pd repository. just do not get distracted when trying to find a place where to install it to.
install-data-local:
$(INSTALL_DATA) $(top_srcdir)/linux/application-x-puredata.xml
$(DESTDIR)$(datadir)/mime/packages/puredata.xml
gfmdsr IOhannes