Tiny Core Extensions > TCE Tips & Tricks

Howto: take a screenshot on Weston

<< < (2/3) > >>

aus9:
and drifting completely offtopic, I built flameshot but it depends on qt5 stuff so is much larger than using mtpaint.
but I used mtpaint with a time delay to capture flameshot gui in action.

its a little like grabber but bigger and with more gui buttons to click
https://imgur.com/a/Q3MlXXn

it does not work on sway either so did not submit.
If you are interested on 32 bit its source is here
https://github.com/lupoDharkael/flameshot

and in a normal big web browser there is a bit of animation running showing on its run

Juanito:
since the weston supplied screenshot works, you could try isolating the code for use in other wayland wm?

aus9:
Juanito
I have no idea how to do that. AFAIK

--- Code: ---tc@box:/usr/local/lib/weston$ strings weston-screenshooter
/lib/ld-linux-x86-64.so.2
libcairo.so.2
__gmon_start__
_fini
libpixman-1.so.0
libfontconfig.so.1
libbz2.so.1.0
libharfbuzz.so.0
libglib-2.0.so.0
libpcre.so.1
libfreetype.so.6
libgraphite2.so.3
libEGL.so.1
libxcb-dri2.so.0
libxcb-dri3.so.0
libxcb-xfixes.so.0
libxcb-present.so.0
libxcb-sync.so.1
libxshmfence.so.1
libgbm.so.1
libwayland-server.so.0
libexpat.so.1
libGLESv2.so.2
libdrm.so.2
libglapi.so.0
libpng16.so.16
libpthread.so.0
libxcb-shm.so.0
libX11-xcb.so.1
libxcb-render.so.0
libXrender.so.1
libXext.so.6
libX11.so.6
libxcb.so.1
libXau.so.6
libXdmcp.so.6
libdl.so.2
libz.so.1
libxkbcommon.so.0
libwayland-cursor.so.0
libwayland-client.so.0
libffi.so.6
librt.so.1
libm.so.6
libc.so.6
__libc_start_main
wl_proxy_marshal_constructor_versioned
program_invocation_short_name
__progname
stderr
fprintf
fputs
fputc
exit
malloc
free
cairo_image_surface_create_for_data
getenv
localtime
strftime
__errno_location
snprintf
fdopen
fclose
cairo_surface_write_to_png
cairo_surface_destroy
strcmp
wl_output_interface
wl_list_insert
wl_proxy_add_listener
wl_shm_interface
wl_proxy_get_user_data
wl_display_connect
wl_list_init
wl_registry_interface
wl_proxy_marshal_constructor
wl_display_dispatch
wl_display_roundtrip
strcpy
strcat
mkostemp
unlink
posix_fallocate
mmap
wl_shm_pool_interface
wl_buffer_interface
wl_proxy_marshal
wl_proxy_destroy
_edata
__bss_start
_end
GLIBC_2.2.5
GLIBC_2.7
AWAVH
AUATUSH
p(H9
H(L9
D$$E1
D$(P1
([]A\A]A^A_
H=`1`
AWAVA
AUATUS
B(L9
r Lc
AUAV
AUAVL
[]A\A]A^A_
ATUH
[]A\H
[]A\
ATUH
[]A\
ATUH
[]A\
AWAVI
AUATI
X[]A\A]A^A_
[%s]
clients/screenshot.c
%s:%d:
out of memory
 (%zd)
XDG_PICTURES_DIR
%F_%H-%M-%S
wayland-screenshot-
%s%s%s%s%s
.png
%s%s%s%s-%d%s
wl_output
wl_shm
weston_screenshooter
WAYLAND_SOCKET
%s must be launched by weston.
Use the MOD+S shortcut to take a screenshot.
failed to create display: %m
display doesn't support screenshooter
XDG_RUNTIME_DIR
creating a buffer file for %d B failed: %m
mmap failed: %m
done
shoot
/weston-shared-XXXXXX
;*3$"
GCC: (GNU) 7.2.0
.shstrtab
.interp
.note.ABI-tag
.hash
.dynsym
.dynstr
.gnu.version
.gnu.version_r
.rela.dyn
.rela.plt
.init
.text
.fini
.rodata
.eh_frame_hdr
.eh_frame
.init_array
.fini_array
.data.rel.ro
.dynamic
.got
.got.plt
.data
.bss
.comment
tc@box:/usr/local/lib/weston$
--- End code ---

and snippets are
Use the MOD+S shortcut to take a screenshot
%s must be launched by weston.

so are you suggesting I borrow this lib file and inject into sway to see if it will work?

2) clients/screenshot.c

does not appear to be a part of weston-dev or wayland-dev according to my eyesight

Rich:
Hi aus9

--- Quote from: aus9 on August 05, 2018, 02:21:11 AM --- ... but on sway....running grabber.....the screen goes blank but the little box appears
pressing s then q shows a screenshot is grabbed but unfortunately its just a blank image or black image ...
--- End quote ---
I guess the window manager doesn't use X for its top level window so there's nothing to copy, at least as far as X is concerned.


--- Quote ---In case I have made mistakes can I start a new thread for grabber? Or is imgur image proof that any mistakes are minor?
--- End quote ---
If the image matches what you tried to save, then it's probably right. There is a thread for  grabber  over here:
http://forum.tinycorelinux.net/index.php/topic,18412.msg112301.html#msg112301
It documents how  grabber  evolved and bugs were resolved. You can post over there if you wish.

Did the compiler issue a lot of warnings when you compiled for 64 bit?

Juanito:
I was suggesting that you look at the code in weston-screenshooter to see if it could be easily modified to use with another wayland wm

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version