issue75:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue75:c_c [2013/08/13 16:02] – créée andre_domenech | issue75:c_c [2013/12/23 14:36] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | ===== à 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' | ||
+ | |||
+ | ** | ||
Default Programs | Default Programs | ||
Ligne 8: | Ligne 14: | ||
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/ | ||
+ | ** | ||
+ | |||
+ | 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: | The way you would go about checking a file's default application is as follows: | ||
Ligne 22: | Ligne 37: | ||
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. | ||
+ | |||
+ | ** | ||
After this, running xdg-open on a pdf file should open it in KPDF instead of Evince. You must, of course, have installed the application first. If you're unsure what the desktop file is, you can run the following commands | After this, running xdg-open on a pdf file should open it in KPDF instead of Evince. You must, of course, have installed the application first. If you're unsure what the desktop file is, you can run the following commands | ||
Ligne 38: | Ligne 69: | ||
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' | ||
+ | |||
+ | |||
+ | ** | ||
MIME types | MIME types | ||
Ligne 54: | Ligne 104: | ||
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' | ||
+ | |||
+ | ** | ||
Add an icon to a MIME type | Add an icon to a MIME type | ||
Ligne 72: | Ligne 140: | ||
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 / | ||
+ | |||
+ | ** | ||
Before I wrap up this article, I wanted to mention that the Command-line Cookbook document I started on Google Drive (located here: http:// | Before I wrap up this article, I wanted to mention that the Command-line Cookbook document I started on Google Drive (located here: http:// | ||
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.1376402569.txt.gz · Dernière modification : 2013/08/13 16:02 de andre_domenech