How to use inkview to open svg images in ROX

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
souleau
Posts: 148
Joined: Sun 23 Oct 2016, 15:24

How to use inkview to open svg images in ROX

#1 Post by souleau »

Inkview is a very basic svg viewer that comes with Inkscape. If you have Inkscape installed, then you also have inkview.

You can use inkview to open an svg in terminal. You simply go to the folder that contains the svg image and type:

Code: Select all

inkview image_name.svg
If there are multiple svg images inside the folder you can browse through them using the left/right arrow buttons.

That is all it does.

Whenever I clicked on an svg inside a ROX window, it would open LibreOffice for some reason and load it in there, eventhough I specified that my default drawing application was Inkscape.
I found that somewhat irritating.

So here's how to change that:

You open ROX File manager, and while you are in the root (~) window, you click on the eye-icon in the task bar. This will show you all the folders and files that are hidden.
One of those folders is called .config. Click on that. Then you go to the folder rox.sourceforge.net, and once inside you go to the MIME-types folder.

Inside the MIME-types folder you will find a number of script files. One of those is called image_svg+xml.
Right-click on this file, and a menu will open. Go to -File 'image_svg+xml'-, then go to -Open As Text-.
Now you've opened it in a text editor, and what you see in all likelyhood is this:

Code: Select all

#!/bin/bash 
exec defaultdraw "$1"
Replace the exec defaultdraw with inkview so it reads like this:

Code: Select all

#!/bin/bash 
inkview "$1"
That's it. Now, if you click on an svg in a ROX window, inkview will show it.

Remember though, you do need to have Inkscape installed.

Post Reply