bgrabitmap / lazpaint

🎨 Cross-platform image editor with raster and vector layers similar to Paint.Net written in Lazarus (Free Pascal)
https://lazpaint.github.io/
GNU General Public License v3.0
401 stars 55 forks source link

Can't run LazPaint on Ubuntu 19.10 #92

Closed lainz closed 4 years ago

lainz commented 4 years ago

'/home/lainz/Descargas/lazpaint7.0.7_linux64_no_install/lazpaint64/lazpaint' /home/lainz/Descargas/lazpaint7.0.7_linux64_no_install/lazpaint64/lazpaint: error while loading shared libraries: libgdk-x11-2.0.so.0: cannot open shared object file: No such file or directory

lainz commented 4 years ago

Using

apt-get install libgtk2.0-0

Now I can run LazPaint, but it crashes.

circular17 commented 4 years ago

Hmmm is it 64 bit Linux? What do you get with “uname -m” ?

lainz commented 4 years ago

uname -m x86_64

What happens is that I can run it, it shows the window, but for example trying to close the window or resize the window causes that the application freezes. Resizing seems to have problems, since the controls inside remains of the original width and height.

lainz commented 4 years ago

Captura de pantalla de 2019-10-30 11-05-56

lainz commented 4 years ago

Seems that Lazarus is freezing too https://forum.lazarus.freepascal.org/index.php/topic,47240.0.html

circular17 commented 4 years ago

Hmmm it would be related to Lazarus 2.0.4 maybe?

I am on Linux Mint 19.1 Tessa and Lazarus 2.0.2 and not having this problem.

lainz commented 4 years ago

Well this is another distro, so something that diferentiate them must be. I not tested Lazarus, just did a quick search in the forum. What I just tested is LazPaint, the binary you created, it was made with 2.0.2? Well that is the thing is failing, but maybe is an event or something in this version of Ubuntu, a bug in Ubuntu and not in LazPaint?

Well also I must say I'm running in a VM, but tested other programs and works fine, not tested other Lazarus programs btw.

circular17 commented 4 years ago

Hmmm. I don't remember with which version it was compiled. But indeed I installed version 7.0.7 from the published binaries and it works fine on my computer.

I had a problem with the windows in Linux that I solved by changing the window manager. On my distro, it is in Paramaters > Desktop Parameters. It shows a list of window managers.

Maybe that can solve your problem?

choose_window_manager

lainz commented 4 years ago

I can't find a way to change the window manager from a setting.

I seen running lazpaint from the command line Failed to load module "canberra-gtk-module"

Then I installed sudo apt install libcanberra-gtk-module libcanberra-gtk3-module

LazPaint freezed at the beginning, but then a popup of the system come saying "lazpaint is ready".

Then from now when I run LazPaint it says 'lazpaint is not responding' but if I wait a few seconds, then it becomes responsive and I can use it.

lainz commented 4 years ago

In the forum they say that changing the UI manager works, so is a problem with lazarus and the gnome desktop used in that release. I close this because we can do nothing to fix it, is a lazarus problem or a gnome problem with gtk2 apps, for something gtk2 doesn't come preinstalled in the latest ubuntu.

neurolabusc commented 4 years ago

See these solutions

  1. (Temporary, probably a bad idea) launch as super-user: sudo ./project1
  2. (Temporary) launch with dbus-launch --exit-with-session ./project1
  3. (Permanent) Run sudo apt-get install appmenu-gtk2-module and restart your computer.

This impacts some GTK2 applications including those built with Lazarus and others (e.g. HexChat) but not all. So it is not only a Lazarus problem. If anyone has any ideas about how Lazarus applications can be updated to avoid this (or have their requirements updated so users are told they need to install appmenu), I would be happy to hear about it.