I have installed inkscape
on Ubuntu 20.04
.
The version of inkscape
is
inkscape -V
Gtk-Message: 20:38:33.029: Failed to load module "canberra-gtk-module"
Gtk-Message: 20:38:33.030: Failed to load module "canberra-gtk-module"
Inkscape 1.3.2 (9e3d6414e7, 2024-01-14, custom)
I want to convert an svg
file into png
.
The problem is when I give a relative path to inkscape, instead of interpreting the path as relative, it is interpreted as relative to the home folder:
inkscape ./mydrawing.svg --export-area-drawing --batch-process --export-type=pdf
gives
Gtk-Message: 20:42:58.054: Failed to load module "canberra-gtk-module"
Gtk-Message: 20:42:58.056: Failed to load module "canberra-gtk-module"
** (org.inkscape.Inkscape:175089): WARNING **: 20:42:58.388: Can't open file: /home/myhome/mydrawing.svg (doesn't exist)
** (org.inkscape.Inkscape:175089): WARNING **: 20:42:58.388: Can't open file: /home/myhome/mydrawing.svg (doesn't exist)
ink_file_open: '/home/myhome/mydrawing.svg' cannot be opened!
InkscapeApplication::document_open: Failed to open: /home/myhome/mydrawing.svg
ConcreteInkscapeApplication::on_open: failed to create document!
hence, it cannot open the file.
Regarding to the error:
Failed to load module "canberra-gtk-module"
I tried these solution
sudo apt-get install libcanberra-gtk-module:i386
sudo apt install -s --reinstall libcanberra-gtk-module
sudo apt install libcanberra-gtk-module libcanberra-gtk3-module
as well as all solutions provided at this question and none of them worked. I am not sure if this warning is causing this problem.
type -a inkscape ; ls -l /etc/apt/sources.list.d
inkscape is /snap/bin/inkscape
total 0
Version 1.3.1 is a stable version:
snap list inkscape --all
Name Version Rev Tracking Publisher Notes
inkscape 1.3.2-9e3d6414e7-2024-01-14-cust 10563 latest/stable inkscape✓ disabled
inkscape 1.3.1-9b9bdc1480-2023-11-25-cust 10555 latest/stable inkscape✓ -
I also tried:
snap refresh --stable inkscape
inkscape 1.3.1-9b9bdc1480-2023-11-25-cust from Inkscape Project (inkscape✓) refreshed
inkscape ./mydrawing.svg --export-area-drawing --batch-process --export-type=pdf
works fine on 1.2.2 – Daniel T Feb 19 '24 at 22:24sudo snap remove --purge inkscape ; sudo apt install inkscape
like https://askubuntu.com/q/1414173/1004020 – Daniel T Feb 20 '24 at 02:17Inkscape 0.92.5
). It does create empty PDF file too. How can I have the1.2.2
version? – barej Feb 20 '24 at 02:35Inkscape-091e20e-x86_64.AppImage
is working fine for me. – barej Feb 20 '24 at 02:49