issue75:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue75:c_c [2013/12/13 18:28] – frangi | issue75:c_c [2013/12/23 14:36] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ===== à traduire | + | ===== à relire |
** | ** | ||
Last month, I started working my way through survey suggestions. However, to start with, I felt it prudent to move through the most common questions in a short-answer format. Starting this month, I will be devoting these articles to one or two topics from the survey results, beginning with setting default applications for programs, creating new MIME types, and assigning icons to said MIME types. For those of you wondering what MIME types are, they are the name given to the system for managing file types by extensions. For example, the MIME type for a text document (*.txt) is text/plain. All MIME types consist of a type and a subtype (in the format type/ | Last month, I started working my way through survey suggestions. However, to start with, I felt it prudent to move through the most common questions in a short-answer format. Starting this month, I will be devoting these articles to one or two topics from the survey results, beginning with setting default applications for programs, creating new MIME types, and assigning icons to said MIME types. For those of you wondering what MIME types are, they are the name given to the system for managing file types by extensions. For example, the MIME type for a text document (*.txt) is text/plain. All MIME types consist of a type and a subtype (in the format type/ | ||
** | ** | ||
+ | |||
+ | Le mois dernier, j'ai commencé à travailler sur les suggestions du sondage. Toutefois, pour commencer, j'ai trouvé prudent de traiter les questions les plus courantes avec un format de réponse court. Dès ce mois-ci, je consacrerai ces articles à un ou deux sujets tirés des résultats de l' | ||
** | ** | ||
Ligne 10: | Ligne 12: | ||
The second spot to check is the properties list of a file. You can right-click a file whose default you wish to change, and then head to the tab Properties/ | The second spot to check is the properties list of a file. You can right-click a file whose default you wish to change, and then head to the tab Properties/ | ||
- | ** | ||
- | ** | ||
The last method I would suggest using is xdg-mime. It's a command-line tool to manage the XDG settings (xdg is the framework for dynamically choosing a program to load a file type – just try it by running xdg-open file). You could also edit .local/ | The last method I would suggest using is xdg-mime. It's a command-line tool to manage the XDG settings (xdg is the framework for dynamically choosing a program to load a file type – just try it by running xdg-open file). You could also edit .local/ | ||
- | |||
- | The way you would go about checking a file's default application is as follows: | ||
** | ** | ||
+ | |||
+ | Les programmes par défaut | ||
+ | Le premier endroit à vérifier pour modifier une application par défaut est dans Paramètres système -> Détails -> Applications par défaut ou Applications préférées. Ici, vous pouvez définir les applications par défaut pour vos navigateur Internet, courriel, calendrier, musique, vidéo et photos. | ||
+ | |||
+ | Le deuxième endroit à vérifier est la liste des propriétés d'un fichier. Vous pouvez faire un clic droit sur un fichier dont vous souhaitez modifier l' | ||
+ | |||
+ | La dernière méthode que je suggère d' | ||
** | ** | ||
+ | The way you would go about checking a file's default application is as follows: | ||
+ | |||
xdg-mime query default application/ | xdg-mime query default application/ | ||
Ligne 31: | Ligne 38: | ||
kde-kpdf.desktop is the output in this case. | kde-kpdf.desktop is the output in this case. | ||
** | ** | ||
+ | |||
+ | La manière de vérifier l' | ||
+ | |||
+ | xdg-mime query default application/ | ||
+ | |||
+ | evince.desktop est le résultat qui vous indique l' | ||
+ | |||
+ | xdg-mime default kde-kpdf.desktop application/ | ||
+ | |||
+ | change l' | ||
+ | |||
+ | xdg-mime query default application/ | ||
+ | |||
+ | donne, comme résultat kde-kpdf.desktop. | ||
** | ** | ||
Ligne 49: | Ligne 70: | ||
Replace file with your actual file (including the path), and it will spit out the information you need for creating rules for that type. Keep in mind that for the web browser, you'll need to set the default for both x-scheme-handler/ | Replace file with your actual file (including the path), and it will spit out the information you need for creating rules for that type. Keep in mind that for the web browser, you'll need to set the default for both x-scheme-handler/ | ||
** | ** | ||
+ | |||
+ | Après cela, lancer xdg-open sur un fichier pdf devrait l' | ||
+ | |||
+ | sudo updatedb | ||
+ | |||
+ | qui met à jour la base pour « locate ». | ||
+ | |||
+ | locate *.desktop|grep application | more | ||
+ | |||
+ | trouvera tous les fichiers desktop sur votre système et y recherchera l' | ||
+ | |||
+ | Si vous n' | ||
+ | |||
+ | xdg-mime query filetype file | ||
+ | |||
+ | Remplacez « file » par votre fichier, y compris le chemin d' | ||
+ | |||
** | ** | ||
Ligne 67: | Ligne 105: | ||
Replace the word “extension” with the extension of the file, minus the period. As I said earlier, this shouldn' | Replace the word “extension” with the extension of the file, minus the period. As I said earlier, this shouldn' | ||
** | ** | ||
+ | |||
+ | Types MIME | ||
+ | |||
+ | Très, très occasionnellement, | ||
+ | |||
+ | grep ' | ||
+ | |||
+ | Si vous n' | ||
+ | |||
+ | gksudo gedit / | ||
+ | |||
+ | Une fois le fichier ouvert, ajoutez la nouvelle ligne suivante à la fin : | ||
+ | |||
+ | text/ | ||
+ | |||
+ | Remplacez le mot « extension » par l' | ||
** | ** | ||
Ligne 87: | Ligne 141: | ||
sudo cp text-x-python.svg / | sudo cp text-x-python.svg / | ||
** | ** | ||
+ | |||
+ | Ajouter une icône à un type MIME | ||
+ | |||
+ | Si vous souhaitez affecter une icône différente à un type MIME (ajout d'un symbole différent pour les fichiers python, par exemple), vous pouvez procéder comme suit : | ||
+ | |||
+ | • Trouver un fichier svg qui convient (ou le créer). | ||
+ | |||
+ | • Nommez-le text-extension.svg (remplacez « extension » par le texte correspondant du fichier mime.types). Logiquement, | ||
+ | |||
+ | • Copiez le fichier dans / | ||
+ | |||
+ | sudo cp text-extension.svg / | ||
+ | |||
+ | • Déconnectez-vous et reconnectez-vous pour voir apparaître les modifications. | ||
+ | |||
+ | Pour notre exemple, Python, la commande ressemblerait à ceci : | ||
+ | |||
+ | sudo cp text-x-python.svg / | ||
** | ** | ||
Ligne 93: | Ligne 165: | ||
Hopefully this has successfully answered most questions you had about assigning new defaults to files. If you have any questions, suggestions, | Hopefully this has successfully answered most questions you had about assigning new defaults to files. If you have any questions, suggestions, | ||
** | ** | ||
+ | |||
+ | Avant de terminer cet article, je voulais signaler qu'il y a eu pas mal d' | ||
+ | |||
+ | J' | ||
+ | |||
+ |
issue75/c_c.1386955723.txt.gz · Dernière modification : 2013/12/13 18:28 de frangi