issue92:nautilus_pour_imprimer
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue92:nautilus_pour_imprimer [2015/01/07 16:08] – créée andre_domenech | issue92:nautilus_pour_imprimer [2015/03/05 18:44] (Version actuelle) – [5] auntiee | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | Let's suppose that you have a lot of ODT (Libreoffice Writer) files, and you need to print them all. | + | ====== 1 ====== |
+ | |||
+ | **Let's suppose that you have a lot of ODT (Libreoffice Writer) files, and you need to print them all. | ||
Opening each file and clicking on the Print icon could be the right way if the files are three or at most four, but what if you have twenty, fifty, hundreds of files to print all at once? | Opening each file and clicking on the Print icon could be the right way if the files are three or at most four, but what if you have twenty, fifty, hundreds of files to print all at once? | ||
Ligne 10: | Ligne 12: | ||
| | ||
+ | |||
+ | done** | ||
+ | |||
+ | Supposons que vous ayez beaucoup de fichiers ODT (LibreOffice Writer) et que vous ayez besoin de les imprimer tous. | ||
+ | |||
+ | Vous pourriez ouvrir chaque fichier et cliquer sur l' | ||
+ | |||
+ | Si vous êtes un amateur de la ligne de commande, il n'y a probablement pas de problème. En fait, vous pouvez invoquer une commande comme celle-ci, peut-être à l' | ||
+ | |||
+ | for fichier in * | ||
+ | |||
+ | do | ||
+ | |||
+ | | ||
done | done | ||
- | But if you are afraid of the command-line, | + | ====== 2 ====== |
+ | |||
+ | **But if you are afraid of the command-line, | ||
The most elegant solution that I have found, consists in the use of a software named Nautilus-Actions. As stated by the “apt-cache show” command: Nautilus actions is an extension for Nautilus, the GNOME file manager. It allows the configuration of programs to be launched on files selected in the Nautilus interface. Obviously Nautilus-Actions is not limited to bulk printing. | The most elegant solution that I have found, consists in the use of a software named Nautilus-Actions. As stated by the “apt-cache show” command: Nautilus actions is an extension for Nautilus, the GNOME file manager. It allows the configuration of programs to be launched on files selected in the Nautilus interface. Obviously Nautilus-Actions is not limited to bulk printing. | ||
Ligne 19: | Ligne 37: | ||
With such software, you can easily create entries in the context menu that appears when you right-click on a file in the Nautilus file manager. | With such software, you can easily create entries in the context menu that appears when you right-click on a file in the Nautilus file manager. | ||
- | Let's go back to our goal: configure a context menu entry that directly prints a Libreoffice Writer file without the need to open it. | + | Let's go back to our goal: configure a context menu entry that directly prints a Libreoffice Writer file without the need to open it.** |
- | First of all, you need to install the package (using apt-get or the Ubuntu software center or Synaptic): | + | Mais si vous avez peur de la ligne de commande ou si vous voulez autoriser un utilisateur factice à imprimer tout un tas de fichiers, il pourrait y avoir plusieurs solutions, comme d' |
+ | |||
+ | La solution la plus élégante que j'ai trouvée consiste en l' | ||
+ | |||
+ | Avec un tel logiciel, vous pouvez facilement créer des entrées dans le menu contextuel qui apparaît lorsque vous faites un clic-droit sur un fichier dans le gestionnaire de fichiers Nautilus. | ||
+ | |||
+ | Revenons à notre objectif : configurer une entrée de menu contextuel qui imprime directement un fichier de LibreOffice Writer sans avoir à l' | ||
+ | |||
+ | ====== 3 ====== | ||
+ | |||
+ | **First of all, you need to install the package (using apt-get or the Ubuntu software center or Synaptic): | ||
sudo apt-get install nautilus-actions | sudo apt-get install nautilus-actions | ||
Ligne 32: | Ligne 60: | ||
In the “Command” folder, then in the “Command” section, fill in the “Path” field with the path to the Libreoffice executable: / | In the “Command” folder, then in the “Command” section, fill in the “Path” field with the path to the Libreoffice executable: / | ||
- | In the “Parameters” field, put the libreoffice parameter “--pt” (followed by the optional printer name to use if you don't want to print on the default one). | + | In the “Parameters” field, put the libreoffice parameter “--pt” (followed by the optional printer name to use if you don't want to print on the default one).** |
- | Now, if you don't want to show the “Print” context menu on all the kinds of files, you must use a filter on the file name (more precisely on the extension) or on the MIME type. Here we will use the file extension, just to keep things simple. | + | Tout d' |
+ | |||
+ | sudo apt-get install nautilus-actions | ||
+ | |||
+ | Puis, exécutez le programme. Une interface intuitive et auto explicative devrait apparaître. | ||
+ | |||
+ | Ensuite, allez dans « Fichier » et sélectionnez « Nouvelle action » (ou cliquez sur l' | ||
+ | |||
+ | Dans l' | ||
+ | Dans l' | ||
+ | |||
+ | Dans le champ « Paramètres », indiquez le paramètre « --pt » de LibreOffice (suivi du nom d' | ||
+ | |||
+ | ====== 4 ====== | ||
+ | |||
+ | **Now, if you don't want to show the “Print” context menu on all the kinds of files, you must use a filter on the file name (more precisely on the extension) or on the MIME type. Here we will use the file extension, just to keep things simple. | ||
In the “Basenames” folder, delete the default entry (by way of the “-” icon), and add (by way of the “+” icon, of course) a filter: “*.odt” as the Basename filter, and click on the “Must match one of” radio button. In this way, the Print menu will appear only for the files containing the “.odt” at the end (commonly known as the file extension). | In the “Basenames” folder, delete the default entry (by way of the “-” icon), and add (by way of the “+” icon, of course) a filter: “*.odt” as the Basename filter, and click on the “Must match one of” radio button. In this way, the Print menu will appear only for the files containing the “.odt” at the end (commonly known as the file extension). | ||
- | Let's save, exit from the program, and open the directory containing the bunch of ODT files. | + | Let's save, exit from the program, and open the directory containing the bunch of ODT files.** |
- | You can select just one file just to test, or even all the files, then you must right-click with the mouse, and a new entry should be in place: Print. | + | Maintenant, si vous ne voulez pas afficher le menu contextuel « Imprimer » sur tous les types de fichiers, vous devez utiliser un filtre sur le nom du fichier (plus précisément sur l' |
+ | |||
+ | Dans l' | ||
+ | |||
+ | Sauvegardez, | ||
+ | |||
+ | ====== 5 ====== | ||
+ | |||
+ | **You can select just one file just to test, or even all the files, then you must right-click with the mouse, and a new entry should be in place: Print. | ||
If you select a file that doesn' | If you select a file that doesn' | ||
Ligne 46: | Ligne 97: | ||
The above configuration is somewhat simplistic, we will not dive into a more advanced configuration. | The above configuration is somewhat simplistic, we will not dive into a more advanced configuration. | ||
- | However there are many possibilities. For instance you can associate an icon to your action, you can define a context menu entry only for certain folders, or you can create an entry with many subentries. | + | However there are many possibilities. For instance you can associate an icon to your action, you can define a context menu entry only for certain folders, or you can create an entry with many subentries.** |
+ | |||
+ | Vous pouvez sélectionner un seul fichier juste pour tester, ou bien tous les fichiers, puis vous devez faire un clic droit avec la souris, et une nouvelle entrée devrait être là : Imprimer. | ||
+ | |||
+ | Si vous sélectionnez un fichier qui ne possède pas l' | ||
+ | |||
+ | La configuration ci-dessus est un peu simpliste, mais nous n' | ||
+ | |||
+ | Cependant, il existe de nombreuses possibilités. Par exemple, vous pouvez associer une icône à votre action, vous pouvez définir une entrée de menu contextuel seulement pour certains dossiers, ou vous pouvez créer une entrée avec de nombreuses sous-entrées. |
issue92/nautilus_pour_imprimer.1420643294.txt.gz · Dernière modification : 2015/01/07 16:08 de andre_domenech