I am trying to install inkscape on Windows10/WSL2/Ubuntu 20.04 and am encountering the below error. I have tried "apt purge" and "apt install" to no avail. I cannot find much online, so I suspect I am doing something wrong, but I do not know what.
Unable to init server: Could not connect: Connection refused
(inkscape:5803): Gtk-CRITICAL **: 08:32:13.299: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed
(inkscape:5803): Gtk-CRITICAL **: 08:32:13.299: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed
(inkscape:5803): Gtk-CRITICAL **: 08:32:13.299: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed
Emergency save activated!
Emergency save completed. Inkscape will close now.
If you can reproduce this crash, please file a bug at https://inkscape.org/report
with a detailed description of the steps leading to the crash, so we can fix it.
** Message: 08:32:13.299: Error: Inkscape encountered an internal error and will close now.
Segmentation fault
Progress. I have little experience with this type of program on wsl2 and it seems that I need a server program to view the output. I am following these instructions to install XLaunch in Windows, but have not yet figured out how to connect inkscape to this terminal window. When I type
xhost +localhost
I get
xhost: unable to open display "0:0"
I use Windows as an OS, but spend all of my day in WSL2
-- Dual boot Ubuntu with Windows. then. The native version of Ubuntu is much better than WSL2