I have installed geany-1.38 and the markdown-plugin from Ubuntu-22.04's package repository.
The markdown preview does nothing, at first I thought there's some error with images or something. However, even the most trivial file produces no output.
On another computer, also running Ubuntu-22.04, I was using geany with markdown-preview regularly without any issues. The one major difference is that my current machine uses KDE, whereas the other one used Gnome; but this can't be the reason.
The screenshot below shows the file plus the preview along with the debug messages for good measure. I see nothing that would give me some hints. The preview remains solidly grey.
![geanyError](https://github.com/geany/geany-plugins/assets/157142463/d04aeb96-957f-42d0-9...)
----
Here are the debug messages as text
``` 18:16:48.995085: GLib-GIO DEBUG : _g_io_module_get_default: Found default implementation dconf (DConfSettingsBackend) for ‘gsettings-backend’ 18:16:48.999775: GLib-GIO DEBUG : _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ‘gio-vfs’ 18:16:49.020692: Geany INFO : Geany 1.38, de_AT.UTF-8 18:16:49.020706: Geany INFO : GTK 3.24.33, GLib 2.72.4 18:16:49.020737: Geany INFO : OS: Ubuntu 22.04.3 LTS (jammy) 18:16:49.020742: Geany INFO : System data dir: /usr/share/geany 18:16:49.020748: Geany INFO : User config dir: /home/gerhard/.config/geany 18:16:49.147635: Geany INFO : Loaded GTK+ CSS theme '/usr/share/geany/geany.css' 18:16:49.148233: Geany INFO : Loaded GTK+ CSS theme '/usr/share/geany/geany-3.20.css' 18:16:49.153394: Geany INFO : System plugin path: /usr/lib/x86_64-linux-gnu/geany 18:16:49.168380: Geany INFO : Added filetype JSON (64). 18:16:49.168424: Geany INFO : Added filetype Nim (65). 18:16:49.168431: Geany INFO : Added filetype Clojure (66). 18:16:49.168438: Geany INFO : Added filetype Swift (67). 18:16:49.168445: Geany INFO : Added filetype Meson (68). 18:16:49.168453: Geany INFO : Added filetype CUDA (69). 18:16:49.168460: Geany INFO : Added filetype Genie (70). 18:16:49.168466: Geany INFO : Added filetype Kotlin (71). 18:16:49.168473: Geany INFO : Added filetype TypeScript (72). 18:16:49.168479: Geany INFO : Added filetype Groovy (73). 18:16:49.168493: Geany INFO : Added filetype Arduino (74). 18:16:49.168500: Geany INFO : Added filetype Graphviz (75). 18:16:49.168506: Geany INFO : Added filetype Cython (76). 18:16:49.168589: Geany INFO : Added filetype Scala (77). 18:16:49.189604: Geany INFO : Loaded libvte from libvte-2.91.so.0 18:16:49.415967: Geany INFO : Loaded: /usr/lib/x86_64-linux-gnu/geany/markdown.so (Markdown) 18:16:49.429438: Geany INFO : /home/gerhard/myGitRepos/Gerhard404/DEM/ReadMe.md : Markdown (UTF-8) 18:16:49.559447: (null) DEBUG : Name com.canonical.AppMenu.Registrar does not exist on the session bus ```
That's the template.html file, that the plug-in uses. I have done nothing to it.
``` <html> <head> <style type="text/css"> body { font-family: @@font_name@@; font-size: @@font_point_size@@pt; background-color: @@bg_color@@; color: @@fg_color@@; } code { font-family: @@code_font_name@@; font-size: @@code_font_point_size@@pt; } </style> </head> <body> @@markdown@@ </body> </html>
```
my current machine uses KDE, whereas the other one used Gnome; but this can't be the reason.
I am not saying it _is_ the reason, but it is certainly possible. Markdown preview uses webkit2gtk which uses a lot of the G*[^1] infrastructure. By its nature that isn't a focus of a KDE distro, so its possible that there are interactions between the G* libraries and the KDE display server. Are you using a Wayland or X11 session?
[^1]: G* == GTK GIO Glib etc
Thank you for the response.
``` geany --version geany 1.38 (kompiliert am Oct 14 2021 mit GTK 3.24.30, GLib 2.68.4) ```
Geany says, it's been compiled using GTK 3.24. I checked webkit2gtk on my system, and the package management reports that I have libwebkit2gtk installed with versions 4.0-37 and 4.1-0.
Could this be a reason, there being no libwebkit2gtk version 3.something?
The markdown plugin uses libwebkit2gtk 4.0 so that should be ok.
Also 1.38 is two years old, if you can build Geany and plugins maybe try Geany 2.0 because I'm not sure when the plugin was switched to that version of libwebkit2gtk, but I suspect it might have been after 1.38.
I now have compiled geany from sources, however the Markdown plug-in doesn't appear to be included. Since geany-plugins is a separate repo, do I need to compile the plug-ins separately? If yes, where do I put them, and how do I tell geany about them?
Sorry, if the questions are very basic.
Google says `DRM_IOCTL_MODE_CREATE_DUMB failed` messages are a bug in webkit2gtk that is fixed in a newer version (4.0-41 googling webkit bugzilla), so I guess you may need to wait for that to get into your distro. Interestingly it works here with 4.0-37 but on Cinnamon not KDE.
Just to confirm those messages are from markdown, first launch Geany from the command line with default configuration by `geany -c /tmp/does_not_exist` and see what messages show, then enable only the markdown plugin and see what messages show[^1], then open a markdown file and see that the `DRM_IOCTL_MODE_CREATE_DUMB` messages show.
Also you could see if the webhelper plugin has the same issues, it uses webkit2gtk as well.
[^1]: ignore the raft of messages when the plugin manager is opened, they are harmless and due to GTK ignoring its own stability guarantees.
I opened geany `geany -c /tmp/foo`, with foo not existing. I created a new markdown file, saved it and then opened the markdown-plugin. The error messages do indeed pop up, when the markdown plugin is active.
``` KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Keine Berechtigung Failed to create GBM buffer of size 378x479: Keine Berechtigung KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Keine Berechtigung Failed to create GBM buffer of size 378x479: Keine Berechtigung KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Keine Berechtigung Failed to create GBM buffer of size 378x479: Keine Berechtigung Failed to create EGL images for DMABufs with file descriptors -1, -1 and -1 ```
Yes, webhelper also produced those error messages.
``` (geany:7774): WebHelper-WARNING **: 12:59:01.995: Failed to load configuration: Datei oder Verzeichnis nicht gefunden KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Keine Berechtigung Failed to create GBM buffer of size 1321x260: Keine Berechtigung KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Keine Berechtigung Failed to create GBM buffer of size 1321x260: Keine Berechtigung KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Keine Berechtigung Failed to create GBM buffer of size 1321x260: Keine Berechtigung Failed to create EGL images for DMABufs with file descriptors -1, -1 and -1 ```
Ok, that indeed looks like its the webkit2gtk bug. So you only need to wait for your distro to provide to fixed version.
Until they fix webkit.
`WEBKIT_DISABLE_DMABUF_RENDERER=1 geany ...` or use `export`
From https://github.com/wailsapp/wails/issues/2977#issuecomment-1761765185 Oct 13, 2023
Ok, that indeed looks like its the webkit2gtk bug. So you only need to wait for your distro to provide the fixed version.
Debian-based distros may not be so lucky until this RC bug is resolved: https://bugs.debian.org/1061406
Basically what @jbicha [said already](https://github.com/geany/geany-plugins/pull/1295#issuecomment-1906999722), but now the autoremoval clock [is ticking](https://tracker.debian.org/pkg/geany-plugins) for geany-plugins.
The situation is summarised [here](https://github.com/geany/geany-plugins/pull/1295#issuecomment-1907080484), and the current status is:
- Webhelper, nobody has tested the Webhelper PR #1295 which includes the switch to Webkit 4.1, so I guess it has no users who care, so it should not configure on Debian (and other distros) and not get built when old Webkit is removed - Markdown, nobody has provided a copy of the build patch (no code changes) from #1295, so again it should not configure on Debian (and other distros) and not get built when old Webkit is removed - Updatechecker, really only useful on Windows (or Macos????) where the Geany project provides the binaries, so Debian should be disabling it as it doesn't look at their repositories (porting to libsoup3 will depend on its availability on those platforms) - Geniuspaste, has had no actual functionality changes for seven years, maybe its because it "just works" (oh look, a flying pig ;-) or because it has no users, anyway "somebody" needs to contribute a PR porting to Libsoup3, and until then it should not configure on Debian (and other distros) and not get built when old Libsoup2 is removed
As Geany-plugins is a collection, each plugin individually enables or disables based on availability of its dependencies during configure, so Debian should not have to do anything to have those plugins not build as above.
It should be noted that those on LTS distros (like me) do not have Libsoup3 available, and therefore not Webkit 4.1, so we can't test #1295 or provide any other PRs, but I really doubt that __all__ geany contributors are on LTS distros, so until "somebody" contributes the patches those plugins will not get distributed, and maybe that will trigger contributions.
@elextr Which distro version are you using? If your distro doesn't have libsoup3, then it probably does not have a version of webkitgtk that gets security updates. :(
[For Ubuntu](https://launchpad.net/ubuntu/+source/geany-plugins/2.0-4ubuntu1) (click the diff link), I wrote a simple patch to switch Markdown to webkitgtk 4.1, added the proposed webhelper webkit 4.1 patch, and disabled the other 2 plugins.
@jbicha Ubuntu says 20.04 LTS has standard support until April 2025, so users would expect security updates, but for webkit2gtk they may not come from upstream if its not supporting it anymore.
Ubuntu 20.04 LTS no longer is supported by the webkitgtk project. Ubuntu Security also does not offer security support for webkitgtk for Ubuntu 20.04 LTS.
I suggest adding a configure option for webkitgtk 4.0 / 4.1 defaulting to the 4.1 option. If 4.1 is selected, then it disables the plugins that are not supported yet.
I wouldn't worry too much about the geany-plugins autoremoval warning in Debian. If the Maintainer does not act in time, I can do a non-maintainer upload to apply the same adjustments I did for Ubuntu.
It would be better to make PRs here so its available to all distros, not just specific ones. As I said it needs somebody to test it who has libsoup3/webkit 4.1 and somebody who has the old version to check that still falls back if the distro does not have the newer versions.
github-comments@lists.geany.org