shutter-project / shutter

Screenshot tool for Linux
https://shutter-project.org/
GNU General Public License v3.0
502 stars 35 forks source link

Does not start on Ubuntu 23.10 with wayland #625

Closed mvivarelli closed 5 months ago

mvivarelli commented 8 months ago

Brief summary of issue

fresh install, install shutter with official ppa (still at 0.99.2), shutter does not start tried also with 0.99.3 and 0.99.4

Photon89 commented 8 months ago

This should be fixed in this PR: https://github.com/shutter-project/shutter/pull/611 You can download from https://github.com/shutter-project/shutter/archive/refs/heads/fix_wayland_crash_on_launch.zip, unpack and run from the unpacked directory ./bin/shutter.

mvivarelli commented 8 months ago

Sorry, does not work,

this is the error:

Shutter::App::fct_init_depend() called at ./bin/shutter line 196 Can't locate Moo.pm in @INC (you may need to install the Moo module) @.*** contains: /home/maurizio/Downloads/shutter- fix_wayland_crash_on_launch/share/shutter/resources/modules /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64- linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at /home/maurizio/Downloads/shutter- fix_wayland_crash_on_launch/share/shutter/resources/modules/Shutter/App /Common.pm line 27. Shutter::App::Common::BEGIN() called at /home/maurizio/Downloads/shutter- fix_wayland_crash_on_launch/share/shutter/resources/modules/Shutter/App /Common.pm line 27 eval {...} called at /home/maurizio/Downloads/shutter- fix_wayland_crash_on_launch/share/shutter/resources/modules/Shutter/App /Common.pm line 27 require Shutter/App/Common.pm called at ./bin/shutter line 207 BEGIN failed--compilation aborted at /home/maurizio/Downloads/shutter- fix_wayland_crash_on_launch/share/shutter/resources/modules/Shutter/App /Common.pm line 27. require Shutter/App/Common.pm called at ./bin/shutter line 207 Compilation failed in require at ./bin/shutter line 207.

Maurizio

-----Original Message----- From: Michael Kogan @.> Reply-To: shutter-project/shutter @.> To: shutter-project/shutter @.> Cc: mvivarelli @.>, Author @.***> Subject: Re: [shutter-project/shutter] Does not start on Ubuntu 23.10 with wayland (Issue #625) Date: 14/10/2023 19:24:21

This should be fixed in this PR: #611 You can download from https://github.com/shutter-project/shutter/archive/refs/heads/fix_wayland_crash_on_launch.zip , unpack and run from the unpacked directory ./bin/shutter. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Photon89 commented 8 months ago

It is missing a dependency, libmoo-perl.

mvivarelli commented 8 months ago

Hi Michael, 

now it works

may I sent to you a version hacked by me that aimed at restoring the full functionality even in wayland ?

if you have 5 minutes on Ubuntu 23.10 verify to have installed gnome- screenshot 

and than substitute the perl script with the one attached to this email

let me know

Maurizio

-----Original Message----- From: Michael Kogan @.> Reply-To: shutter-project/shutter @.> To: shutter-project/shutter @.> Cc: mvivarelli @.>, Author @.***> Subject: Re: [shutter-project/shutter] Does not start on Ubuntu 23.10 with wayland (Issue #625) Date: 14/10/2023 21:22:49

It is missing a dependency, libmoo-perl. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Photon89 commented 8 months ago

Great! To be honest, I stumbled upon your fork around half a year ago and was quite excited, so I mentioned it on our internal mail exchange. As far as I understand, other team members liked it as well, though it seems limited to the Gnome desktop. In the mean time, I have submitted a PR which works on Plasma but not on Gnome: https://github.com/shutter-project/shutter/pull/612 So far it breaks something on X11 though, therefore the draft status. Maybe the combination of the two approaches will be a good solution for our missing Wayland support problem!

Unfortunately, I won't be able to have a look into it till end of the months, but thanks a lot for putting the work into the fix already! :smiley:

mvivarelli commented 8 months ago

Of course my solution is a temporary hack while waiting for a more elegant implementation

despite this it works pretty well giving the user the normal look and feel of the application

glad to be of any help in the effort to restore the functionality of this application we love

Maurizio

-----Original Message----- From: Michael Kogan @.> Reply-To: shutter-project/shutter @.> To: shutter-project/shutter @.> Cc: mvivarelli @.>, Author @.***> Subject: Re: [shutter-project/shutter] Does not start on Ubuntu 23.10 with wayland (Issue #625) Date: 15/10/2023 10:44:35

Great! To be honest, I stumbled upon your fork around half a year ago and was quite excited, so I mentioned it on our internal mail exchange. As far as I understand, other team members liked it as well, though it seems limited to the Gnome desktop. In the mean time, I have submitted a PR which works on Plasma but not on Gnome: #612 So far it breaks something on X11 though, therefore the draft status. Maybe the combination of the two approaches will be a good solution for our missing Wayland support problem! Unfortunately, I won't be able to have a look into it till end of the months, but thanks a lot for putting the work into the fix already! 😃 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Photon89 commented 6 months ago

@mvivarelli Hi, would you mind creating a PR from your fork, so we can have a look whether there are merge conflicts? Thanks!

mvivarelli commented 6 months ago

Hi Michael,

I'm not so used in doing that

but you can go there:

https://github.com/mvivarelli/shutter-on-wayland

and get the script

i worked only on that

Maurizio

-----Original Message----- From: Michael Kogan @.> Reply-To: shutter-project/shutter @.> To: shutter-project/shutter @.> Cc: mvivarelli @.>, Mention @.***> Subject: Re: [shutter-project/shutter] Does not start on Ubuntu 23.10 with wayland (Issue #625) Date: 12/26/2023 06:38:34 PM

@mvivarelli Hi, would you mind creating a PR from your fork, so we can have a look whether there are merge conflicts? Thanks! — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: <shutter- @.***>

Photon89 commented 6 months ago

Sure, no problem! :smiley: I had a quick look. Not went through the details yet, though. I see two problems we'd have to tackle:

  1. As far as I understand, this only works for Gnome (unless we want to require gnome-screenshot as dependency on all desktops). For KDE there is an alternative solution using slurp. We'd need to somehow determine which environment we are in and use the suiting functions.
  2. As far as I can see, you put all the "dirty work" into fct_gnome_screenshot inside the main file. While it works in principle, the usual placement for it would be in several modules which are placed in /usr/share/shutter/resources/modules/Shutter/Screenshot/. Each screenshot mode (like full screen, window or selection) is placed in one of those modules. So, if we want to follow this design (which we probably should, because otherwise it will get even harder to find something in this mess than it already is), we'd have to take the screenshot mode specific code out of fct_gnome_screenshot and place it into the corresponding modules (existing or newly created ones).

Really sorry to be nagging, but I think, if we just take it as is, it will make life harder on the long run...

mvivarelli commented 6 months ago

Hi Michael,

regarding the first question yes, my solution right now work only on gnome DE

and I understand that for sure my solution could not be perfectly designed nor be the overall best solution

but I did the "dirty" job of finding a possible solution and implementing a working app

think that I have never written a Perl line before that

and I have never sat up a Perl development environment "with debug" (and that was not so easy)

after that I don't have much more time to spend on this

but I hope it's enough to get Shutter shine again

Maurizio

-----Original Message----- From: Michael Kogan @.> Reply-To: shutter-project/shutter @.> To: shutter-project/shutter @.> Cc: mvivarelli @.>, Mention @.***> Subject: Re: [shutter-project/shutter] Does not start on Ubuntu 23.10 with wayland (Issue #625) Date: 12/27/2023 09:56:20 PM

Sure, no problem! 😃 I had a quick look. Not went through the details yet, though. I see two problems we'd have to tackle:

  1. As far as I understand, this only works for Gnome (unless we want to require gnome-screenshot as dependency on all desktops). For KDE there is an alternative solution using slurp. We'd need to somehow determine which environment we are in and use the suiting functions.
  2. As far as I can see, you put all the "dirty work" into fct_gnome_screenshot inside the main file. While it works in principle, the usual placement for it would be in several modules which are placed in /usr/share/shutter/resources/modules/Shutter/Screenshot/. Each screenshot mode (like full screen, window or selection) is placed in one of those modules. So, if we want to follow this design (which we probably should, because otherwise it will get even harder to find something in this mess than it already is), we'd have to take the screenshot mode specific code out of fct_gnome_screenshot and place it into the corresponding modules (or into new such modules). Really sorry to be nagging, but I think, if we just take it as is, it will make life harder on the long run... — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: <shutter- @.***>