'프로그램 사용 > docker' 카테고리의 다른 글
docker 이미지 만들기 (0) | 2024.05.08 |
---|---|
도커 cpu 갯수 제한 (0) | 2024.03.22 |
Dockerfile... 2? (0) | 2019.07.15 |
docker remote (0) | 2019.07.15 |
UTS name space (0) | 2019.07.15 |
docker 이미지 만들기 (0) | 2024.05.08 |
---|---|
도커 cpu 갯수 제한 (0) | 2024.03.22 |
Dockerfile... 2? (0) | 2019.07.15 |
docker remote (0) | 2019.07.15 |
UTS name space (0) | 2019.07.15 |
rfbCheckPasswordByList()는 계정-패스워드 쌍으로 되어있는 값을 이용하여 로그인을 구현하는 기본 함수이다.
희망(?)을 가졌던 newClientHook 이벤트는 시도때도 없이 발생했고(원래 기대했던 것은 로그인 시 1회)
로그인 별로 어떤 계정이 로그인 성공,실패 했는지는 함수를 확장해서 만들어야 할 듯..
newClientHook 에서도 cl->viewOnly가 설정되지 않는 걸 보면, vnc client 측의 설정과는 별개 인 듯
/* for this method, authPasswdData is really a pointer to an array of char*'s, where the last pointer is 0. */ rfbBool rfbCheckPasswordByList(rfbClientPtr cl,const char* response,int len) { char **passwds; int i=0; for(passwds=(char**)cl->screen->authPasswdData;*passwds;passwds++,i++) { uint8_t auth_tmp[CHALLENGESIZE]; memcpy((char *)auth_tmp, (char *)cl->authChallenge, CHALLENGESIZE); rfbEncryptBytes(auth_tmp, *passwds); if (memcmp(auth_tmp, response, len) == 0) { if(i>=cl->screen->authPasswdFirstViewOnly) cl->viewOnly=TRUE; return(TRUE); } } rfbErr("authProcessClientMessage: authentication failed from %s\n", cl->host); return(FALSE); } |
[링크 : https://libvnc.github.io/doc/html/main_8c_source.html#l00786]
libvncserver 기본 인자 (0) | 2022.11.04 |
---|---|
libvncserver 종료 절차 (0) | 2022.11.01 |
libvncserver 접속 끊어짐 문제 (0) | 2022.08.16 |
libvncserver websocket example (0) | 2022.08.12 |
libvncserver 마우스 이벤트 (0) | 2022.02.25 |
git stash drop , clear (0) | 2024.09.19 |
---|---|
git submodule ... 2? (0) | 2024.06.19 |
git reset 서버 commit (0) | 2021.09.14 |
git blame (0) | 2021.06.21 |
git pull rebase 설정 (0) | 2021.06.02 |
select current_timestamp(3) |
[링크 : https://stackoverflow.com/questions/9624284/current-timestamp-in-milliseconds]
NOW([precision]) CURRENT_TIMESTAMP CURRENT_TIMESTAMP([precision]) LOCALTIME, LOCALTIME([precision]) LOCALTIMESTAMP LOCALTIMESTAMP([precision]) |
mariadb 초기설정 (0) | 2022.08.30 |
---|---|
mariadb c# connector (0) | 2021.10.22 |
HeidiSQL (2) | 2021.08.18 |
sql zerofill (0) | 2019.11.25 |
mysql-dump compatible 함정 -_- (0) | 2019.09.04 |
SDRangel can decode multiple broadcast FM channels simultaneously |
[링크 : https://www.reddit.com/r/RTLSDR/comments/ql1jpe/problem_rtl_sdr_recording_multiple_fm_channel/]
SDRangel is an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware. |
[링크 : https://github.com/f4exb/sdrangel]
[링크 : https://github.com/f4exb/sdrangelcli]
[링크 : https://github.com/szpajder/RTLSDR-Airband]
[링크 : https://github.com/pvachon/tsl-sdr]
[링크 : https://www.rtl-sdr.com/a-multichannel-fm-demodulator/]
pulseaudio error : access denied (0) | 2024.08.26 |
---|---|
gqrx, gnu radio, rfcat (0) | 2024.08.21 |
ubuntu 18.04에 사운드 카드가 갑자기 사라졌다? (0) | 2022.07.20 |
RTL-SDR 11시 땡! (0) | 2022.01.07 |
gqrx 오디오 스트리밍 (0) | 2022.01.07 |
어쩐지(?) mariadb 설치시 암호를 안물어 본다고 했더니
저런 이상한(?) 스크립트를 추가해놓은 듯.
$ sudo mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and haven't set the root password yet, you should just press enter here. Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password or using the unix_socket ensures that nobody can log into the MariaDB root user without the proper authorisation. You already have your root account protected, so you can safely answer 'n'. Switch to unix_socket authentication [Y/n] Enabled successfully! Reloading privilege tables.. ... Success! You already have your root account protected, so you can safely answer 'n'. Change the root password? [Y/n] New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y ... Success! By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] y ... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB installation should now be secure. Thanks for using MariaDB! |
mariadb msec 단위 시간 얻기 (0) | 2022.08.31 |
---|---|
mariadb c# connector (0) | 2021.10.22 |
HeidiSQL (2) | 2021.08.18 |
sql zerofill (0) | 2019.11.25 |
mysql-dump compatible 함정 -_- (0) | 2019.09.04 |
-H를 주면 hex mode로 출력되는데 작동중에 모드 전환하는건 없나?
$ minicom --help Usage: minicom [OPTION]... [configuration] A terminal program for Linux and other unix-like systems. -b, --baudrate : set baudrate (ignore the value from config) -D, --device : set device name (ignore the value from config) -s, --setup : enter setup mode -o, --noinit : do not initialize modem & lockfiles at startup -m, --metakey : use meta or alt key for commands -M, --metakey8 : use 8bit meta key for commands -l, --ansi : literal; assume screen uses non IBM-PC character set -L, --iso : don't assume screen uses ISO8859 -w, --wrap : Linewrap on -H, --displayhex : display output in hex -z, --statline : try to use terminal's status line -7, --7bit : force 7bit mode -8, --8bit : force 8bit mode -c, --color=on/off : ANSI style color usage on or off -a, --attrib=on/off : use reverse or highlight attributes on or off -t, --term=TERM : override TERM environment variable -S, --script=SCRIPT : run SCRIPT at startup -d, --dial=ENTRY : dial ENTRY from the dialing directory -p, --ptty=TTYP : connect to pseudo terminal -C, --capturefile=FILE : start capturing to FILE -F, --statlinefmt : format of status line -R, --remotecharset : character set of communication partner -v, --version : output version information and exit -h, --help : show help configuration : configuration file to use These options can also be specified in the MINICOM environment variable. This variable is currently unset. The configuration directory for the access file and the configurations is compiled to /etc/minicom. Report bugs to <minicom-devel@lists.alioth.debian.org>. |
-H, --displayhex Turn on output in hex mode. |
[링크 : https://www.systutorials.com/docs/linux/man/1-minicom/]
minicom에서 stty로 터미널 폭 조절하기 (0) | 2023.10.24 |
---|---|
minicom lf에 cr 붙이기 (0) | 2023.01.05 |
minicom 로그 저장하기 (0) | 2021.09.16 |
minicom timestamp (0) | 2021.09.16 |
minicom 폭 늘리기 (0) | 2021.01.28 |
오랫만에 생각난김에 검색했는데 8월 2일 커밋된 따끈한 녀석 발견!
[링크 : https://gitlab.freedesktop.org/wayland/weston/-/commits/main?search=atomic]
음.. 잘 해결되면 좋겠네..
backend-drm: improve atomic commit failure handling When an atomic commit fails then the output will be stuck in REPAINT_AWAITING_COMPLETION state. It is waiting for a vblank event that was never scheduled. If the error is EBUSY then it can be expected to be a transient error. So propagate the error and schedule a new repaint in the core compositor. This is necessary because there are some circumstances when the commit can fail unexpectedly: - With 'state_invalid == true' one commit will disable all planes. If another commit for a different output is triggered immediately afterwards, then this commit can temporarily fail with EBUSY because it tries to use the same planes. - At least with i915, if one commit enables an output then a second commit for a different output immediately afterwards can temporarily fail with EBUSY. This is probably caused by some hardware interdependency. Signed-off-by: Michael Olbrich's avatarMichael Olbrich <m.olbrich@pengutronix.de> |
libweston/backend-drm/drm.c의 drm_repaint_flush()와
libweston/compositor.c의 output_repaint_timer_hander() 쪽에 수정이 가해진다.
[링크 : https://gitlab.freedesktop.org/wayland/weston/-/commit/3b3fdc52c31f828ff0fb71d2c6ce7bdcc64f20a1]
weston 커서 숨기기 (0) | 2024.02.26 |
---|---|
wayland hdmi - touch 연결 (0) | 2023.09.08 |
weston screen shooter 뜯어보기 (0) | 2022.08.17 |
wayland glreadpixels 실패 (0) | 2022.08.16 |
sway + wayvnc (0) | 2022.08.10 |
weston_screenshooter_shoot()을 따라오는데 영 어딜 파야 나올지 감이 안온다.
아무튼.. libweston의 screenshooter.c가 실제적으로 수행되는 부분 같은데
//git\include\libweston\libweston.h int weston_screenshooter_shoot(struct weston_output *output, struct weston_buffer *buffer, weston_screenshooter_done_func_t done, void *data); //git\libweston\screenshooter.c WL_EXPORT int weston_screenshooter_shoot(struct weston_output *output, struct weston_buffer *buffer, weston_screenshooter_done_func_t done, void *data) { struct screenshooter_frame_listener *l; if (!wl_shm_buffer_get(buffer->resource)) { done(data, WESTON_SCREENSHOOTER_BAD_BUFFER); return -1; } buffer->shm_buffer = wl_shm_buffer_get(buffer->resource); buffer->width = wl_shm_buffer_get_width(buffer->shm_buffer); buffer->height = wl_shm_buffer_get_height(buffer->shm_buffer); if (buffer->width < output->current_mode->width || buffer->height < output->current_mode->height) { done(data, WESTON_SCREENSHOOTER_BAD_BUFFER); return -1; } l = malloc(sizeof *l); if (l == NULL) { done(data, WESTON_SCREENSHOOTER_NO_MEMORY); return -1; } l->buffer = buffer; l->output = output; l->done = done; l->data = data; l->listener.notify = screenshooter_frame_notify; wl_signal_add(&output->frame_signal, &l->listener); weston_output_disable_planes_incr(output); weston_output_damage(output); return 0; } |
아무튼 추적을 계속해보면 아래와 같이 event_loop에 wl_event_loop_add_idle() 실행해서 추가해주고 끝.
//git\libweston\compositor.c static void weston_schedule_surface_protection_update(struct weston_compositor *compositor) { struct content_protection *cp = compositor->content_protection; struct wl_event_loop *loop; if (!cp || cp->surface_protection_update) return; loop = wl_display_get_event_loop(compositor->wl_display); cp->surface_protection_update = wl_event_loop_add_idle(loop, notify_surface_protection_change, compositor); } WL_EXPORT void weston_output_disable_planes_incr(struct weston_output *output) { output->disable_planes++; /* * If disable_planes changes from 0 to non-zero, it means some type of * recording of content has started, and therefore protection level of * the protected surfaces must be updated to avoid the recording of * the protected content. */ if (output->disable_planes == 1) weston_schedule_surface_protection_update(output->compositor); } |
struct content_protection은 누가 만드나 하면서 따라가보니
weston_compositor_enable_content_protection() 함수에서 만들어 주고 해당 함수는
//git\libweston\content-protection.c WL_EXPORT int weston_compositor_enable_content_protection(struct weston_compositor *compositor) { struct content_protection *cp; cp = zalloc(sizeof(*cp)); if (cp == NULL) return -1; cp->compositor = compositor; compositor->content_protection = cp; wl_list_init(&cp->protected_list); if (wl_global_create(compositor->wl_display, &weston_content_protection_interface, 1, cp, bind_weston_content_protection) == NULL) return -1; cp->destroy_listener.notify = cp_destroy_listener; wl_signal_add(&compositor->destroy_signal, &cp->destroy_listener); cp->debug = weston_compositor_add_log_scope(compositor, "content-protection-debug", "debug-logs for content-protection", NULL, NULL, NULL); return 0; } |
drm_backend_create() 시에 b->atomic_modeset 조건에 의해서 생성된다.
//git\libweston\backend-drm\drm.c static struct drm_backend * drm_backend_create(struct weston_compositor *compositor, struct weston_drm_backend_config *config) { if (b->atomic_modeset) if (weston_compositor_enable_content_protection(compositor) < 0) weston_log("Error: initializing content-protection " "support failed.\n"); } |
이름이 비슷한건지 걸려나오는 다른 녀석.
//protocol\weston-screenshooter-client-protocol.h #define WESTON_SCREENSHOOTER_SHOOT 0 static inline void weston_screenshooter_shoot(struct weston_screenshooter *weston_screenshooter, struct wl_output *output, struct wl_buffer *buffer) { wl_proxy_marshal((struct wl_proxy *) weston_screenshooter, WESTON_SCREENSHOOTER_SHOOT, output, buffer); } |
wl_proxy_marshall()은 또 멀까해서 따라가 보지만.. 답이 안나온다 -_ㅠ
//wayland-main\src\wayland-client.c WL_EXPORT struct wl_proxy * wl_proxy_marshal_array_constructor_versioned(struct wl_proxy *proxy, uint32_t opcode, union wl_argument *args, const struct wl_interface *interface, uint32_t version) { return wl_proxy_marshal_array_flags(proxy, opcode, interface, version, 0, args); } WL_EXPORT struct wl_proxy * wl_proxy_marshal_array_constructor(struct wl_proxy *proxy, uint32_t opcode, union wl_argument *args, const struct wl_interface *interface) { return wl_proxy_marshal_array_constructor_versioned(proxy, opcode, args, interface, proxy->version); } WL_EXPORT void wl_proxy_marshal(struct wl_proxy *proxy, uint32_t opcode, ...) { union wl_argument args[WL_CLOSURE_MAX_ARGS]; va_list ap; va_start(ap, opcode); wl_argument_from_va_list(proxy->object.interface->methods[opcode].signature, args, WL_CLOSURE_MAX_ARGS, ap); va_end(ap); wl_proxy_marshal_array_constructor(proxy, opcode, args, NULL); } |
wayland hdmi - touch 연결 (0) | 2023.09.08 |
---|---|
wayland atomic commit 패치? (0) | 2022.08.22 |
wayland glreadpixels 실패 (0) | 2022.08.16 |
sway + wayvnc (0) | 2022.08.10 |
wayvnc 0.5 릴리즈 (0) | 2022.08.09 |
C Specification void glReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * data); Parameters x, y Specify the window coordinates of the first pixel that is read from the frame buffer. This location is the lower left corner of a rectangular block of pixels. width, height Specify the dimensions of the pixel rectangle. width and height of one correspond to a single pixel. |
[링크 : https://docs.gl/es3/glReadPixels]
static void screenshooter_shoot(struct wl_client *client, struct wl_resource *resource, struct wl_resource *output_resource, struct wl_resource *buffer_resource) { struct wlsc_output *output = output_resource->data; struct wl_buffer *buffer = buffer_resource->data; if (!wl_buffer_is_shm(buffer)) return; if (buffer->width < output->current->width || buffer->height < output->current->height) return; glPixelStorei(GL_PACK_ALIGNMENT, 1); glReadPixels(0, 0, output->current->width, output->current->height, GL_RGBA, GL_UNSIGNED_BYTE, wl_shm_buffer_get_data(buffer)); } |
You can't take screenshots with glReadPixels! |
[링크 : https://stackoverflow.com/questions/44634621/glreadpixels-with-screen-pixels]
대충 짰는데 안되는 듯..
$ cat gl_cap.c #include <stdio.h> #include <GLES2/gl2.h> #include <EGL/egl.h> #include <EGL/eglext.h> void main() { GLubyte color[1024*768*4]; glReadPixels(0,0, 1024, 768, GL_RGBA, GL_UNSIGNED_BYTE, &color); // printf("R:%d G:%d B:%d A:%d", color[0], color[1], color[2], color[3]); for(int y =0 ; y<768;y++) for(int x =0 ; x < 1024; x++) printf("%4d,%3d R:%d G:%d B:%d A:%d\n", x,y ,color[y*1024+x+0] ,color[y*1024+x+1] ,color[y*1024+x+2] ,color[y*1024+x+3] ); } |
링크는 아래와 같이 해주면 되긴 한데...
-lwayland-egl -lGLESv2 |
흐으으으음...
# head dump 0, 0 R:0 G:0 B:0 A:0 1, 0 R:0 G:0 B:0 A:0 2, 0 R:0 G:0 B:0 A:0 3, 0 R:0 G:0 B:0 A:0 4, 0 R:0 G:0 B:0 A:0 5, 0 R:0 G:0 B:0 A:0 6, 0 R:0 G:0 B:0 A:0 7, 0 R:0 G:0 B:0 A:0 8, 0 R:0 G:0 B:0 A:0 9, 0 R:0 G:0 B:0 A:0 # tail dump 1014,767 R:0 G:0 B:0 A:0 1015,767 R:0 G:0 B:0 A:0 1016,767 R:0 G:0 B:0 A:0 1017,767 R:0 G:0 B:0 A:0 1018,767 R:0 G:0 B:0 A:0 1019,767 R:0 G:0 B:0 A:0 1020,767 R:0 G:0 B:0 A:0 1021,767 R:0 G:0 B:0 A:0 1022,767 R:0 G:0 B:0 A:0 1023,767 R:0 G:0 B:0 A:0 |
wayland atomic commit 패치? (0) | 2022.08.22 |
---|---|
weston screen shooter 뜯어보기 (0) | 2022.08.17 |
sway + wayvnc (0) | 2022.08.10 |
wayvnc 0.5 릴리즈 (0) | 2022.08.09 |
capture drm screen (0) | 2022.08.08 |