How to print from viewnior and other options

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

How to print from viewnior and other options

#1 Post by 666philb »

viewnior is the default image viewer in many pups but it doesn't have a print option. it does however have an 'open with' option and with a bit of setting up you can use this to send the image to peasyprint or gtklp or your defaultpaint progam.
-----------------------------------------------------
solution 1 (works in most pups)

open /usr/share/applications/defaults.list and edit the image lines. this example will add defaultpaint gtklp and peasyprint to the 'open with' options (you may need to restart x for it to work)

Code: Select all

image/bmp=defaultimageviewer.desktop;defaultpaint.desktop;gtklp.desktop;peasyprint.desktop
image/gif=defaultimageviewer.desktop;defaultpaint.desktop;gtklp.desktop;peasyprint.desktop
image/jpeg=defaultimageviewer.desktop;defaultpaint.desktop;gtklp.desktop;peasyprint.desktop
image/png=defaultimageviewer.desktop;defaultpaint.desktop;gtklp.desktop;peasyprint.desktop
image/svg=defaultimageviewer.desktop;defaultpaint.desktop;gtklp.desktop;peasyprint.desktop
image/svg+xml=defaultimageviewer.desktop;defaultpaint.desktop;gtklp.desktop;peasyprint.desktop
image/tiff=defaultimageviewer.desktop;defaultpaint.desktop;gtklp.desktop;peasyprint.desktop
image/x-pixmap=defaultimageviewer.desktop;defaultpaint.desktop;gtklp.desktop;peasyprint.desktop
image/x-png=defaultimageviewer.desktop;defaultpaint.desktop;gtklp.desktop;peasyprint.desktop
image/x-xpixmap=defaultimageviewer.desktop;defaultpaint.desktop;gtklp.desktop;peasyprint.desktop
image/x-portable-anymap=defaultimageviewer.desktop;defaultpaint.desktop;gtklp.desktop;peasyprint.desktop
------------------------------------------------------------------
solution 2 (the above doesn't work in xenial so...)

1 first off copy /usr/share/applications/defaults.list somewhere safe as it gets overwritten by the next step......
2 install 'desktop-file-utilities' from the ppm (use the find box)
3 once installed copy your defaults.list back to /usr/share/applications/

4 we'll use peasyprint as an example so open /usr/share/applications/peasyprint.desktop in geany and add the 'MimeType' line. the same line can be added to 'gtklp.desktop' or 'defaultpaint.desktop' or any program you wish to be an option in the openwith menu;

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Name=PeasyPrint graphic/photo printing
GenericName=PeasyPrint
Comment=PeasyPrint graphic/photo printing
Exec=/usr/sbin/peasyprint
Icon=/usr/share/pixmaps/peasyprint.png
Terminal=false
Type=Application
StartupNotify=false
Categories=X-GraphicUtility
MimeType=image/gif;image/jpeg;image/png;image/svg;image/svg+xml;image/tiff;image/x-pixmap;image/x-png;image/x-xpixmap;image/x-portable;
5 now open a terminal and run

Code: Select all

update-desktop-database /usr/share/applications
peasyprint should now show in viewniors 'openwith' menu
--------------------------------------------------
see here for allowing viewnior to set the desktop wallpaper http://murga-linux.com/puppy/viewtopic.php?t=107707
----------------------------------------------------
Attachments
openwith.jpg
(139.7 KiB) Downloaded 692 times
Last edited by 666philb on Sun 31 Jul 2016, 08:47, edited 4 times in total.
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

Sailor Enceladus
Posts: 1543
Joined: Mon 22 Feb 2016, 19:43

#2 Post by Sailor Enceladus »

That xerus smile cracks me up Image

Post Reply