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