Open Photon89 opened 4 years ago
Is it possible to put the source code on github?
On 5 November 2017 at 06:06, Andreas Schramm
Unfotunately there is no manual how to install it on linux...
Am 04.11.2017 um 15:50 schrieb dino99:
A free alternative for linuxers: https://lightscreen.com.ar/
-- You received this bug notification because you are subscribed to a duplicate bug report (1729440). https://bugs.launchpad.net/bugs/1502263
Title: Shutter does not work in Wayland
Status in Shutter: Confirmed Status in Ubuntu GNOME: Triaged Status in shutter package in Ubuntu: Confirmed Status in shutter package in Fedora: Confirmed
Bug description: Running Gnome 3.18 and Gnome Shell as the new Wayland Compositor, shutter doesn't work. I.e. it's only creating a screenshot of the shutter logo in a distorted way.
I don't if that's something that can be fixed easily, but it seems Wayland (security) related.
Otherwise thanks for this outstanding screenshot tool!
Wolf
Main upstream discussion & fixes example to deal with wayland: https://bugzilla.gnome.org/show_bug.cgi?id=776437
Workaround
Log out. Click your name on the login screen, then click the gear button and select 'Ubuntu on Xorg'. Enter your password and log in.
To manage notifications about this bug go to: https://bugs.launchpad.net/shutter/+bug/1502263/+subscriptions
Launchpad Details: #LPC Anton Hughes - 2017-11-04 20:15:33 +0000
If you refer to lightscreen, it is already on github: https://github.com/ckaiser/Lightscreen If you mean Shutter, it is free software, so anybody is free to fork it and put the code anywhere. The only downside is that distro package maintainers will need some time to realize that the development is going on somewhere else, but I think, this is a solvable problem.
Launchpad Details: #LPC Michael Kogan - 2017-11-04 20:50:31 +0000
I get exactly the same result as John Manko, only since upgrading to 17.10 from 17.04. Interestingly, it doesn't happen on all monitor configurations. It happens at work where i have dual HP LA2405x monitors, but works correctly at home with a single monitor (same laptop in both cases).
Let me know if I can offer information that might help.
Launchpad Details: #LPC Livio - 2017-11-05 21:37:03 +0000
I have just found another software that works on wayland https://github.com/lupoDharkael/flameshot that works too.
Launchpad Details: #LPC Pablo Estigarribia - 2018-04-22 12:35:55 +0000
----- Message de réponse -----
De : "Pablo Estigarribia"
I have just found another software that works on wayland https://github.com/lupoDharkael/flameshot that works too.
-- You received this bug notification because you are subscribed to the bug report. https://bugs.launchpad.net/bugs/1502263
Title: Shutter does not work in Wayland
Status in Shutter: Confirmed Status in Ubuntu GNOME: Triaged Status in shutter package in Ubuntu: Confirmed Status in shutter package in Fedora: Confirmed
Bug description: Running Gnome 3.18 and Gnome Shell as the new Wayland Compositor, shutter doesn't work. I.e. it's only creating a screenshot of the shutter logo in a distorted way.
I don't if that's something that can be fixed easily, but it seems Wayland (security) related.
Otherwise thanks for this outstanding screenshot tool!
Wolf
Main upstream discussion & fixes example to deal with wayland: https://bugzilla.gnome.org/show_bug.cgi?id=776437
Log out. Click your name on the login screen, then click the gear button and select 'Ubuntu on Xorg'. Enter your password and log in.
To manage notifications about this bug go to: https://bugs.launchpad.net/shutter/+bug/1502263/+subscriptions
Launchpad Details: #LPC Daniel Défago - 2018-04-23 06:09:08 +0000
In addition to not working in Wayland, major shutter-features are starting to die in Ubuntu 18.04 (to be release this Thursday 2018-04-26). It seems that (upstream) debian has too soon removed the libgoo-canvas-perl package which allows quick and simple editing of screen-shots (via right-click > edit, in Shutter):
https://bugs.launchpad.net/ubuntu/+source/libgoo-canvas-perl/+bug/1765726
Ubuntu 18.04 runs GNOME3-Xorg by default, so it is a shame that some of shutter's features are dying due to packages that were too soon removed from the repository. Ubuntu 18.04 is a long term support release that will always be GNOME3 Xorg by default. I see no reason way shutter should not be able to work just as well in 18.04 as it did in 16.04, since both use Xorg by default.
So, to me, more urgent than Wayland support, is to re-include the packages that worked fine under Xorg, so that users can upgrade from 16.04 to 18.04 without losing major features (unnecessarily) in shutter.
Launchpad Details: #LPC Lonnie Lee Best - 2018-04-23 14:05:55 +0000
Would like to mention that under Ubuntu 18.04 LTS you would also see a black screen, especially if you apply that workaround (https://bugs.launchpad.net/ubuntu/+source/libgoo-canvas-perl/+bug/1765726/comments/45) in order to get editing to work... At the same time e.g. under Linux Mint 19 MATE (Ubuntu 18.04 LTS) all worked as expected.
Launchpad Details: #LPC Edmund Laugasson - 2018-07-05 21:20:33 +0000
The only workaround for now is to switch to the Xorg session (which can be done in the login screen).
Launchpad Details: #LPC Michael Kogan - 2018-07-05 22:03:55 +0000
Attachment: screen_002.png
Shutter doesn't work on Fedora 29 (wayland). When I take a screenshot, shutter just show shutter's icon with a lot of repetitions.
Launchpad Details: #LPC Rafael Reuber - 2018-11-15 12:18:36 +0000
Same issue on ubuntu 18.04. Any news ?
Launchpad Details: #LPC theo - 2019-05-16 14:42:39 +0000
Not yet - need someone to step up to do the work.
On Thu, 16 May 2019, 4:55 pm theo,
Same issue on ubuntu 18.04. Any news ?
-- You received this bug notification because you are a member of Shutter Team, which is subscribed to shutter in Ubuntu. https://bugs.launchpad.net/bugs/1502263
Title: Shutter does not work in Wayland
To manage notifications about this bug go to: https://bugs.launchpad.net/shutter/+bug/1502263/+subscriptions
Launchpad Details: #LPC Vadim Peretokin - 2019-05-16 15:25:27 +0000
A workaround, until shutter is fixed might be this flameshot snap package: https://snapcraft.io/flameshot-app
You would install it like this: sudo snap install flameshot-app
Also, I'm not aware of a snap packages for shutter itself, but I did come across this: https://launchpad.net/shutter/+snaps
That may be a snap package for shutter, but I have no clue how you would install it. I tried this: sudo snap install shutter error: snap "shutter" not found
No luck.
Launchpad Details: #LPC Lonnie Lee Best - 2019-05-16 19:31:52 +0000
As far as I can see all of the Shutter snaps which are available at https://launchpad.net/shutter/+snaps failed to build, so it's no surprise that Shutter cannot be installed using snap...
Launchpad Details: #LPC Michael Kogan - 2019-05-16 19:56:51 +0000
Bonjour,
Merci pour votre message. Je suis absent jusqu'au mardi 9 juillet, je prend bonne note de votre courriel et vous répondrai dès mon retour dans les plus brefs délais.
Meilleures salutations.
Launchpad Details: #LPC Daniel Défago - 2019-06-21 10:45:28 +0000
Possibly there is a possibility to add Wayland support, Flameshot seems to have done it using https://github.com/emersion/xdg-desktop-portal-wlr
@DarthGandalf Shall we pin it, as people lack Wayland compatibility quite often?
I looked a bit at this. Wayland doesn't have any standard way to get the screenshot, so it depends on the compositor used. There is a portal API suggested by freedesktop, but it's very limited: it relies on the compositor to implement it (and some of them do, to various extent), and it doesn't let Shutter to configure delay, including/excluding cursor, targeting menus/tooltips etc. These options might or might not be presented in the window shown to user when the screenshot is requested via this API.
Additionally, there are failure modes where e.g. kwin is running, but the backend for the portal is from gnome, and in that case the call never returns. Adding a timeout probably won't work because we can't know whether it's user taking their time interacting with the UI provided by the portal implementation, or the backend doesn't do anything.
In addition to that, KDE and GNOME have their own APIs, which are supposedly more featureful. KDE even has 2 of them. I haven't looked at gnome's one at all yet, but kwin is checking who is requesting snapshot, and checks its .desktop file for permissions. Unfortunately, the way how they do it makes it impossible to request the snapshot from perl, so we'll need some C helper to interact with it to avoid the limitations of the portal API. And that means custom code for all the supported compositors.
and it doesn't let Shutter to configure delay
Maybe the delay could be executed before the call to the Wayland tools is sent? Like: 5s delay, then fire the call to the compositor which then instantly takes the screenshot (and asks for permission to access it).
which then instantly takes the screenshot
It does not. The UI it shows may even provide its own way to configure the delay. But some of them might take the screenshot of full screen immediately, then ask user whether they want something else, or e.g. add a delay, before returning anything to the caller. That is, if we use the XDG Desktop Portal, which is what I did so far.
I see! I only tested in a Ubuntu Gnome VM and had the impression that the dialog asking for permission shows a preview of an already taken screenshot. But if other compositors don't play along, it looks like my proposal won't work...
However critical errors are reported in terminal while starting the application
Dupe of #427 , let's not post unrelated issues together
Window rolling menu not accessible.
That's expected. Wayland support is practically non-existing now. The buttons are disabled because this functionality is not available on Wayland. What support I added in the last version, is much less than what Shutter can do on X11. I just avoided creating a new Wayland-specific button for it, and instead attached it to the most matching one (Desktop), even though what it does is not exactly what Desktop button does on X11.
Desktop rolling menu not opening
Yes, good catch. The menu should be disable on wayland as well.
Maybe we'll find some ways to reimplement the functionality of those buttons and menus on Wayland, then they can be re-enabled.
Shutter 0.99.2 (Rev.1593)
The application window starts, but there is an error in the logs and there is no way to use the application quick menu (for example, "Shutter capture an area of the screen")
System information
nafanz@nafanz-Z87M-D3H:/usr/bin$ loginctl show-session $(awk '/tty/ {print $1}' <(loginctl)) -p Type | awk -F= '{print $2}'
wayland
nafanz@nafanz-Z87M-D3H:~$ neofetch
.-/+oossssoo+/-. nafanz@nafanz-Z87M-D3H
`:+ssssssssssssssssss+:` ----------------------
-+ssssssssssssssssssyyssss+- OS: Ubuntu 21.10 x86_64
.ossssssssssssssssssdMMMNysssso. Host: Z87M-D3H
/ssssssssssshdmmNNmmyNMMMMhssssss/ Kernel: 5.13.0-21-generic
+ssssssssshmydMMMMMMMNddddyssssssss+ Uptime: 4 hours, 32 mins
/sssssssshNMMMyhhyyyyhmNMMMNhssssssss/ Packages: 1861 (dpkg), 15 (snap)
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Shell: bash 5.1.8
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ Resolution: 1920x1200
ossyNMMMNyMMhsssssssssssssshmmmhssssssso DE: GNOME 40.5
ossyNMMMNyMMhsssssssssssssshmmmhssssssso WM: Mutter
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ WM Theme: Adwaita
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Theme: Yaru [GTK2/3]
/sssssssshNMMMyhhyyyyhdNMMMNhssssssss/ Icons: Yaru [GTK2/3]
+sssssssssdmydMMMMMMMMddddyssssssss+ Terminal: gnome-terminal
/ssssssssssshdmNNNNmyNMMMMhssssss/ CPU: Intel i5-4430 (4) @ 3.200GHz
.ossssssssssssssssssdMMMNysssso. GPU: Intel HD Graphics
-+sssssssssssssssssyyyssss+- Memory: 5290MiB / 11859MiB
`:+ssssssssssssssssss+:`
.-/+oossssoo+/-.
I looked a bit at this. Wayland doesn't have any standard way to get the screenshot, so it depends on the compositor used. There is a portal API suggested by freedesktop, but it's very limited: it relies on the compositor to implement it (and some of them do, to various extent), and it doesn't let Shutter to configure delay, including/excluding cursor, targeting menus/tooltips etc. These options might or might not be presented in the window shown to user when the screenshot is requested via this API.
I've read that they are expecting to use same Dbus API as gnome-screenshot. Found also this https://github.com/cyrinux/gnome-shell-screenshot-dbus-emulator . Maybe the API is limited but if distros will drop Xorg the choice is to support this or allowing shutter and other tools of this kind to be obsolete in future. IMHO it's better to support limited API and in parallel request missing functionalities from upstream than not supporting it at all. Some of them seems to be already in progress: https://gitlab.gnome.org/GNOME/gnome-screenshot/-/merge_requests/17
it's better to support limited API
Of course. Shutter already supports the very limited API when running on Wayland.
Don't see my message as forfeiting any hope for wayland support.
So is there any way others can currently help ? Is the current lack of ability to capture partial rectangle of screen limited by API or the need for some coding on shutter side ?
UPDATE 18 May 2022 Shutter not working in Ubuntu 22.04 with wayland windowing system
I changed the title to reduce duplicate reports.
@DarthGandalf I get a segmentation fault on launch when trying to use Shutter in a Manjaro KDE Wayland session. It just says
libwnck is designed to work in X11 only, no valid display found
and then immediately segfaults. Is this a known issue?
I launched with -d:Trace
in X11 and Wayland and the debug output is absolutely identical up to this line...
edit: Here is the relevant gdb output:
[...]
INFO: gathering system information...
[Detaching after fork from child process 1425]
Linux photon-virtualbox 6.1.44-1-MANJARO #1 SMP PREEMPT_DYNAMIC Wed Aug 9 09:02:26 UTC 2023 x86_64 GNU/Linux
[Detaching after fork from child process 1426]
Manjaro Linux \r (\n) (\l)
Glib 1.3293
Gtk3 0.038
Glib built for 2.76.4, running with 2.76.4
(shutter:1417): Wnck-WARNING **: 08:49:31.696: libwnck is designed to work in X11 only, no valid display found
Thread 1 "perl" received signal SIGSEGV, Segmentation fault.
0x00007ffff5b2c785 in XQueryExtension () from /usr/lib/libX11.so.6
(gdb) bt full
#0 0x00007ffff5b2c785 in XQueryExtension () at /usr/lib/libX11.so.6
#1 0x00007ffff5b20587 in XInitExtension () at /usr/lib/libX11.so.6
#2 0x00007ffff4fc32a1 in XextAddDisplay () at /usr/lib/libXext.so.6
#3 0x00007ffff59ea285 in XResQueryExtension () at /usr/lib/libXRes.so.1
#4 0x00007ffff5d9b4a5 in () at /usr/lib/libwnck-3.so.0
#5 0x00007ffff7de6e63 in () at /usr/lib/libgobject-2.0.so.0
#6 0x00007ffff7de8f0b in g_object_new_valist () at /usr/lib/libgobject-2.0.so.0
#7 0x00007ffff7de929e in g_object_new () at /usr/lib/libgobject-2.0.so.0
#8 0x00007ffff5d8ac93 in wnck_screen_get_default () at /usr/lib/libwnck-3.so.0
#9 0x00007ffff78b14f6 in () at /usr/lib/libffi.so.8
#10 0x00007ffff78adf5e in () at /usr/lib/libffi.so.8
#11 0x00007ffff78b0b73 in ffi_call () at /usr/lib/libffi.so.8
#12 0x00007ffff7fb9ec0 in invoke_c_code
(info=info@entry=0x5555596f8590, func_pointer=<optimized out>, sp=sp@entry=0x55555555ed00, ax=ax@entry=1, items=items@entry=4, internal_stack_offset=internal_stack_offset@entry=4, package=<optimized out>, namespace=<optimized out>, function=<optimized out>, mark=<optimized out>)
at /build/perl-glib-object-introspection/src/Glib-Object-Introspection-0.050/gperl-i11n-invoke-c.c:202
cif = {abi = FFI_UNIX64, nargs = 0, arg_types = 0x4800000027, rtype = 0x7ffff78b22a0 <ffi_type_pointer>, bytes = 0, flags = 7}
instance = 0x0
i = <optimized out>
iinfo = {base = {interface = 0x5555596f8590, is_function = 1, is_vfunc = 0, is_callback = 0, is_signal = 0, n_args = 0, current_pos = 32767, arg_infos = 0x0, arg_types = 0x0, aux_args = 0x0, has_return_value = 1, return_type_ffi = 0x7ffff78b22a0 <ffi_type_pointer>, return_type_info = {dummy1 = 18, dummy2 = 2147483647, dummy3 = 0x5555558df690, dummy4 = 0x5555596f8590, dummy5 = 0x555555ade5e0, dummy6 = 5176, dummy7 = 0, padding = {0x0, 0x0, 0x0, 0x0}}, return_type_transfer = GI_TRANSFER_NOTHING, callback_infos = 0x0, array_infos = 0x0, free_after_call = 0x0}, target_package = 0x5555559601c0 "Wnck", target_namespace = 0x5555596fbba0 "Screen", targ--Type <RET> for more, q to quit, c to continue without paging--
et_function = 0x5555559d2e60 "get_default", is_constructor = 0, is_method = 0, throws = 0, n_invoke_args = 0, n_nullable_args = 0, n_expected_args = 0, n_given_args = 0, args = 0x200e5fd3d49fe400, arg_types_ffi = 0x4800000027, in_args = 0x5555557a6eb0, out_args = 0x7ffff7e79d38, is_automatic_arg = 0x555555f87810, constructor_offset = 0, method_offset = 0, stack_offset = 4, dynamic_stack_offset = 0}
n_return_values = <optimized out>
ffi_return_value = {v_boolean = 0, v_int8 = 0 '\000', v_uint8 = 0 '\000', v_int16 = 0, v_uint16 = 0, v_int32 = 0, v_uint32 = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_short = 0, v_ushort = 0, v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_ssize = 0, v_size = 0, v_string = 0x0, v_pointer = 0x0}
return_value_p = 0x7fffffffc860
return_value = {v_boolean = 0, v_int8 = 0 '\000', v_uint8 = 0 '\000', v_int16 = 0, v_uint16 = 0, v_int32 = 0, v_uint32 = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_short = 0, v_ushort = 0, v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_ssize = 0, v_size = 0, v_string = 0x0, v_pointer = 0x0}
local_error = 0x0
local_error_address = 0x7fffffffc870
#13 0x00007ffff7fbae27 in XS_Glib__Object__Introspection_invoke (my_perl=<optimized out>, cv=<optimized out>)
at /build/perl-glib-object-introspection/src/Glib-Object-Introspection-0.050/GObjectIntrospection.xs:1020
basename = 0x555555f87810 "Wnck"
namespace = 0x5555596fbba0 "Screen"
function = 0x5555559d2e60 "get_default"
repository = <optimized out>
info = 0x5555596f8590
func_pointer = 0x7ffff5d8ac50 <wnck_screen_get_default>
symbol = 0x7ffff7f9d88c "wnck_screen_get_default"
internal_stack_offset = 4
sp = 0x55555555ed00
ax = 1
mark = <optimized out>
--Type <RET> for more, q to quit, c to continue without paging--
items = 4
#14 0x00007ffff7b31a91 in Perl_pp_entersub (my_perl=0x5555555592a0)
at /build/perl/src/perl-5.38.0/pp_hot.c:5555
markix = 0
is_scalar = true
sp = <optimized out>
sv = 0x55555572d920
gv = 0x0
cv = 0x55555572d920
cx = <optimized out>
old_savestack_ix = <optimized out>
#15 0x00007ffff7b22516 in Perl_runops_standard (my_perl=0x5555555592a0)
at /build/perl/src/perl-5.38.0/run.c:41
op = <optimized out>
#16 0x00007ffff7a6ae81 in Perl_call_sv (my_perl=0x5555555592a0, sv=<optimized out>, flags=<optimized out>)
at /build/perl/src/perl-5.38.0/perl.c:3133
myop = {op_next = 0x0, op_sibparent = 0x0, op_ppaddr = 0x7ffff7b31870 <Perl_pp_entersub>, op_targ = 0, op_type = 187, op_opt = 0, op_slabbed = 0, op_savefree = 0, op_static = 0, op_folded = 0, op_moresib = 0, op_spare = 0, op_flags = 65 'A', op_private = 0 '\000', op_first = 0x0, op_other = 0x0}
method_op = {op_next = 0x7fffffffcbc0, op_sibparent = 0x0, op_ppaddr = 0x7ffff7b328e0 <Perl_pp_method>, op_targ = 0, op_type = 215, op_opt = 0, op_slabbed = 0, op_savefree = 0, op_static = 0, op_folded = 0, op_moresib = 0, op_spare = 0, op_flags = 0 '\000', op_private = 0 '\000', op_u = {op_first = 0x0, op_meth_sv = 0x0}, op_rclass_targ = 0}
oldmark = 0
retval = 0
oldcatch = false
ret = <optimized out>
--Type <RET> for more, q to quit, c to continue without paging--
oldop = 0x5555556ab2f0
cur_env = {je_prev = 0x7fffefb13130, je_buf = {{__jmpbuf = {140737349003289, 140733193388032, 2309889022297629696, 140737349097584, -128, 0, 2, 16}, __mask_was_saved = -135816000, __saved_mask = {__val = {0, 140737348885404, 16, 93825060916928, 93825036359072, 140737349074303, 93824992252576, 7, 93825060916928, 140737349115437, 93825060917336, 93825060916928, 93824992252576, 524288, 93825036359072, 140737349153871}}}}, je_ret = 5, je_mustcatch = false, je_old_delaymagic = 0, je_old_stack_hwm = 93824992252576}
#17 0x00007ffff7a6b5e0 in Perl_call_method
(my_perl=<optimized out>, methname=methname@entry=0x555557f695a0 "STARTUP", flags=flags@entry=5)
at /build/perl/src/perl-5.38.0/perl.c:3036
len = <optimized out>
sv = <optimized out>
#18 0x00007ffff7fb7cbd in invoke_perl_code
(cif=<optimized out>, resp=0x7fffffffd010, args=0x7fffffffce80, userdata=<optimized out>)
at /build/perl-glib-object-introspection/src/Glib-Object-Introspection-0.050/gperl-i11n-invoke-perl.c:169
cb_interface = 0x5555583ecbc0
iinfo = {base = {interface = 0x5555583ecbc0, is_function = 0, is_vfunc = 0, is_callback = 1, is_signal = 0, n_args = 1, current_pos = 0, arg_infos = 0x7fffdc002e10, arg_types = 0x5555596a2a30, aux_args = 0x5555596c56e0, has_return_value = 0, return_type_ffi = 0x7ffff78b21a0 <ffi_type_void>, return_type_info = {dummy1 = 18, dummy2 = 2147483647, dummy3 = 0x5555558df690, dummy4 = 0x5555583ecbc0, dummy5 = 0x5555558f6ab0, dummy6 = 31944, dummy7 = 0, padding = {0x0, 0x0, 0x0, 0x0}}, return_type_transfer = GI_TRANSFER_NOTHING, callback_infos = 0x0, array_infos = 0x0, free_after_call = 0x0}}
args_offset = <optimized out>
i = <optimized out>
in_inout = <optimized out>
n_return_values = 0
n_returned = <optimized out>
context = <optimized out>
--Type <RET> for more, q to quit, c to continue without paging--
first_sv = <optimized out>
last_sv = <optimized out>
sp = <optimized out>
#19 0x00007ffff78b10d2 in () at /usr/lib/libffi.so.8
#20 0x00007ffff78b1718 in () at /usr/lib/libffi.so.8
#21 0x00007ffff7df5bc9 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#22 0x00007ffff7df5d34 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#23 0x00007ffff7107575 in g_application_register () at /usr/lib/libgio-2.0.so.0
#24 0x00007ffff7107b30 in () at /usr/lib/libgio-2.0.so.0
#25 0x00007ffff7107e6c in g_application_run () at /usr/lib/libgio-2.0.so.0
#26 0x00007ffff78b14f6 in () at /usr/lib/libffi.so.8
#27 0x00007ffff78adf5e in () at /usr/lib/libffi.so.8
#28 0x00007ffff78b0b73 in ffi_call () at /usr/lib/libffi.so.8
#29 0x00007ffff7fb9ec0 in invoke_c_code
(info=info@entry=0x55555852b700, func_pointer=<optimized out>, sp=sp@entry=0x55555555ed00, ax=ax@entry=1, items=items@entry=5, internal_stack_offset=internal_stack_offset@entry=4, package=<optimized out>, namespace=<optimized out>, function=<optimized out>, mark=<optimized out>)
at /build/perl-glib-object-introspection/src/Glib-Object-Introspection-0.050/gperl-i11n-invoke-c.c:202
cif = {abi = FFI_UNIX64, nargs = 3, arg_types = 0x5555596c8960, rtype = 0x7ffff78b2330 <ffi_type_sint32>, bytes = 0, flags = 6}
instance = 0x5555596c90c0
i = <optimized out>
iinfo = {base = {interface = 0x55555852b700, is_function = 1, is_vfunc = 0, is_callback = 0, is_signal = 0, n_args = 2, current_pos = 1, arg_infos = 0x5555593bea70, arg_types = 0x5555589ab240, aux_args = 0x5555596c8910, has_return_value = 1, return_type_ffi = 0x7ffff78b2330 <ffi_type_sint32>, return_type_info = {dummy1 = 18, dummy2 = 2147483647, dummy3 = 0x5555558df690, dummy4 = 0x55555852b700, dummy5 = 0x5555558f6ab0, dummy6 = 29364, dummy7 = 0, padding = {0x0, 0x0, 0x0, 0x0}}, return_type_transfer = GI_TRANSFER_NOTHING, callback_infos--Type <RET> for more, q to quit, c to continue without paging--
= 0x0, array_infos = 0x5555596c2300 = {0x5555596ba920}, free_after_call = 0x0}, target_package = 0x555555a8a370 "Glib::IO", target_namespace = 0x5555596cf400 "Application", target_function = 0x5555557872c0 "run", is_constructor = 0, is_method = 1, throws = 0, n_invoke_args = 3, n_nullable_args = 1, n_expected_args = 2, n_given_args = 1, args = 0x5555596ba8d0, arg_types_ffi = 0x5555596c8960, in_args = 0x5555596c8f00, out_args = 0x5555596c8930, is_automatic_arg = 0x5555596ba900, constructor_offset = 0, method_offset = 1, stack_offset = 4, dynamic_stack_offset = -1}
n_return_values = <optimized out>
ffi_return_value = {v_boolean = 0, v_int8 = 0 '\000', v_uint8 = 0 '\000', v_int16 = 0, v_uint16 = 0, v_int32 = 0, v_uint32 = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_short = 0, v_ushort = 0, v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_ssize = 0, v_size = 0, v_string = 0x0, v_pointer = 0x0}
return_value_p = 0x7fffffffd5b0
return_value = {v_boolean = 0, v_int8 = 0 '\000', v_uint8 = 0 '\000', v_int16 = 0, v_uint16 = 0, v_int32 = 0, v_uint32 = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_short = 0, v_ushort = 0, v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_ssize = 0, v_size = 0, v_string = 0x0, v_pointer = 0x0}
local_error = 0x0
local_error_address = 0x7fffffffd5c0
#30 0x00007ffff7fbae27 in XS_Glib__Object__Introspection_invoke (my_perl=<optimized out>, cv=<optimized out>)
at /build/perl-glib-object-introspection/src/Glib-Object-Introspection-0.050/GObjectIntrospection.xs:1020
basename = 0x5555556f85b0 "Gio"
namespace = 0x5555596cf400 "Application"
function = 0x5555557872c0 "run"
repository = <optimized out>
info = 0x55555852b700
func_pointer = 0x7ffff7107d60 <g_application_run>
symbol = 0x7ffff6f4a2e0 "g_application_run"
internal_stack_offset = 4
sp = 0x55555555ed00
--Type <RET> for more, q to quit, c to continue without paging--
ax = 1
mark = <optimized out>
items = 5
#31 0x00007ffff7b31a91 in Perl_pp_entersub (my_perl=0x5555555592a0)
at /build/perl/src/perl-5.38.0/pp_hot.c:5555
markix = 0
is_scalar = false
sp = <optimized out>
sv = 0x55555572d920
gv = 0x0
cv = 0x55555572d920
cx = <optimized out>
old_savestack_ix = <optimized out>
#32 0x00007ffff7b22516 in Perl_runops_standard (my_perl=0x5555555592a0)
at /build/perl/src/perl-5.38.0/run.c:41
op = <optimized out>
#33 0x00007ffff7a6ef33 in S_run_body (oldscope=<optimized out>, my_perl=<optimized out>)
at /build/perl/src/perl-5.38.0/perl.c:2807
oldscope = 1
ret = <optimized out>
cur_env = {je_prev = 0x5555555595b0, je_buf = {{__jmpbuf = {140737488345832, 1407061934346053410, 0, 140737488345856, 140737354125312, 93824992247112, -1407061933366991070, -1407080136982288606}, __mask_was_saved = 0, __saved_mask = {__val = {0, 7, 6, 140737352539328, 0, 140737348885404, 140737352539328, 93824992265504, 51539607553, 140737348273384, 0, 93824992255664, 4129754963, 2309889022297629696, 140737351785888, 140737488345832}}}}, je_ret = 3, je_mustcatch = true, je_old_delaymagic = 0, je_old_stack_hwm = 0}
#34 perl_run (my_perl=0x5555555592a0) at /build/perl/src/perl-5.38.0/perl.c:2727
oldscope = 1
--Type <RET> for more, q to quit, c to continue without paging--
ret = <optimized out>
cur_env = {je_prev = 0x5555555595b0, je_buf = {{__jmpbuf = {140737488345832, 1407061934346053410, 0, 140737488345856, 140737354125312, 93824992247112, -1407061933366991070, -1407080136982288606}, __mask_was_saved = 0, __saved_mask = {__val = {0, 7, 6, 140737352539328, 0, 140737348885404, 140737352539328, 93824992265504, 51539607553, 140737348273384, 0, 93824992255664, 4129754963, 2309889022297629696, 140737351785888, 140737488345832}}}}, je_ret = 3, je_mustcatch = true, je_old_delaymagic = 0, je_old_stack_hwm = 0}
#35 0x000055555555517f in main ()
(gdb) INFO: gathering system information...
[Detaching after fork from child process 1484]
Linux photon-virtualbox 6.1.44-1-MANJARO #1 SMP PREEMPT_DYNAMIC Wed Aug 9 09:02:26 UTC 2023 x86_64 GNU/Linux
[Detaching after fork from child process 1485]
Manjaro Linux \r (\n) (\l)
Glib 1.3293
Gtk3 0.038
Glib built for 2.76.4, running with 2.76.4
(shutter:1476): Wnck-WARNING **: 22:21:19.623: libwnck is designed to work in X11 only, no valid display found
Thread 1 "perl" received signal SIGSEGV, Segmentation fault.
0x00007ffff5b2c785 in XQueryExtension () from /usr/lib/libX11.so.6
(gdb)
edit 2: Should be fixed by #611.
We might use Slurp on Wayland once this issue is fixed: https://github.com/emersion/slurp/issues/136 I don't know which magic they use, but it looks like they managed to grab the cursor position and make selections on Wayland screens, even multiple monitors seem to be supported. We could then use Shutter::Screenshot::Wayland which is already implemented and then crop the full screen screenshot according to the dimensions and position of Slurp's selection.
The selection is also configurable regarding color and frame thickness, so we might be even able to make it look like our own selection tool for X11.
We can't combine Slurp with the current implementation of Shutter::Screenshot::Wayland which uses XDG portal. Portal doesn't "just" give us the image, it may or may not provide its own UI to select a window/region/timeout/whatever. In that case user would need to select the rectangle twice?
@Photon89 from your posts I can assume you only test wayland on DE where the DE-specific implementation of the XDG portal doesn't provide its own UI, but just takes screenshot of the whole screen. Is it gnome's one? Can you try kde? or vice versa. https://packages.ubuntu.com/search?keywords=xdg-desktop-portal currently shows the following:
I tried Manjaro KDE. There the full screen mode worked the same way as in X11, just the filename was "unknown_NNN.png".
Then try the gnome one :) I don't remember which of them had its own UI
If I had to guess, most probably Gnome. ;) Sure, will set up a VM and try! But even if there is some Gnome specific dialog, isn't it possible to use it the same way as in fullscreen mode after Slurp has been used to select a screen region? Or do you mean that Slurp won't work in Gnome as expected?
isn't it possible to use it the same way as in fullscreen mode after Slurp has been used to select a screen region?
With XDG portal API it's not possible to pass the "region" obtained from Slurp. There's just no such parameter in the method: https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Screenshot
We can't even specify whether we want the full screen, or only 1 window, everything is up to the implementation of the portal to decide, probably by asking the user using some kind of GUI which we cannot control. I just put it in the "fullscreen" button randomly, because there's no better place for it now. Maybe it should be a separate button.
I'm installing Manjaro Gnome in a VM right now and will test!
@DarthGandalf So, I can report now: In Manjaro Gnome, when making a fullscreen shot, I get a dialog asking for permission where I can click "Allow" or "Deny". If I click "Allow", the screenshot is taken as expected. Also, on the second try there is no more such dialog. Even after closing Shutter and relaunching it.
Slurp doesn't work on Gnome and fails with
compositor doesn't support zwlr_layer_shell_v1
though. But maybe if apps like Shutter support all DEs besides of Gnome it motivates Gnome devs to work on better compatibility?
@DarthGandalf I made a quick and dirty proof of concept implementation of a Shutter::Screenshot::WaylandSelector which is heavily based on Shutter::Screenshot::Wayland and uses Slurp to get the selection size and position. It works on a KDE Wayland session but I kicked out stuff like delay and include/exclude cursor for the moment. The bigger problem is that by restoring the Selection mode for Wayland in the main Shutter file I broke something and now Shutter crashes on startup on X11... I spent a lot of time trying to figure out what is going on but couldn't figure it out... Shall I make a draft PR for it?
I made a quick and dirty proof of concept implementation of a Shutter::Screenshot::WaylandSelector which is heavily based on Shutter::Screenshot::Wayland and uses Slurp to get the selection size and position
You're assuming that all implementations of portal have this behavior of NOT showing any additional GUI to user. Using Slurp may work fine as long as this stays true. However, we have no way of checking that while calling portal API.
Here's what I see on Ubuntu 22.04 VM:
How will this interact with Slurp?
Shall I make a draft PR for it?
Well, I can't possibly help you debug it otherwise, can I?
Well, I can't possibly help you debug it otherwise, can I?
Thanks! :smiley: Please see #612.
Here's what I see on Ubuntu 22.04 VM:
I assume, this is Gnome (made to look like Unity)? Slurp doesn't work in Gnome anyway... So Gnome is so far not supported. I guess...
But what stops KDE devs from adding a similar dialog to KDE portal implementation in future?
I don't know, looks like Wayland related stuff is in very much flow recently, so implementations differ in various DEs and distros, and also might change frequently. But if we can support at least some DE for some time, it's already a start, we can see where we get from there, if things change!
Running Gnome 3.18 and Gnome Shell as the new Wayland Compositor, shutter doesn't work. I.e. it's only creating a screenshot of the shutter logo in a distorted way.
I don't if that's something that can be fixed easily, but it seems Wayland (security) related.
Otherwise thanks for this outstanding screenshot tool!
Wolf
Main upstream discussion & fixes example to deal with wayland: https://bugzilla.gnome.org/show_bug.cgi?id=776437
Workaround
Log out. Click your name on the login screen, then click the gear button and select 'Ubuntu on Xorg'. Enter your password and log in.
Launchpad Details: #LP1502263 Wolf Vollprecht - 2015-10-02 17:53:46 +0000