루 분투에 시각 장애인을위한 ‘로 케이트 포인터’도우미가 있습니까? 귀중한 도구를 가지고 있지 않으며

시각 장애가있는 사람들에게 가장 어려운 것 중 하나는 화면을 바라 보는 마우스를 찾는 것입니다.

따라서 CTRL을 누른 후 시각적 인주의 (주황색 원 / 파동 깜박임)를 활성화 locate mouse하거나 locate pointer약간 더주의하십시오. (스크린 샷을 잡기가 어려움 : 왼쪽)

우분투에서 마우스를 찾습니다

Xubuntu는이 귀중한 도구를 가지고 있지 않으며 Ubuntu는 1GB, 듀얼 코어 구형 하드웨어에 비해 너무 무겁습니다. 그놈, 유니티, 컴 피즈, 민트 도 있습니다. Xubuntu / XFCE에는 없습니다.

더 큰 마우스에 관한 것이 아니며 조금 도움이됩니다. 약간의주의가 필요합니다.

고 대비 테마 사용.

Lubuntu에 있으면 Xu에서 Lu로 전환하는 것이 좋습니다.



답변

  • 에서 분투 로 이동 설정 관리자마우스 및 터치 패드테마 . 마우스 커서 크기를 더 크게 만들 수 있습니다.

    Xubuntu 마우스 및 터치 패드 설정

  • 또한 마우스를보다 쉽게 ​​볼 수 있도록 마우스에 대한 추가 테마를 다운로드 할 수 있습니다. xfce-look.org를 참조하십시오 . 취향에 따라 테마를 선택할 수 있습니다.

    나는 이것이 당신의 요구에 가장 잘 맞는다고 생각합니다 : DMZ with Yellow Background Multisized .

    에 관해서는 루 분투 : 자사의 위키 사이트에 따르면, PCManFM 및 LxPanel 커서 테마를 사용하지 않는 수동으로 커서를 변경해야합니다. 자세한 내용은 여기를 참조하십시오 : https://wiki.archlinux.org/index.php/LXDE#Cursors

  • 그리고 하나 이상의 옵션 : 우분투에 MATE 환경설치 하면 512MB RAM 컴퓨터에서 경량으로 실행되며 검색중인 마우스 플래시 옵션이 있습니다.

    sudo apt-add-repository ppa:ubuntu-mate-dev/ppa
    sudo apt-add-repository ppa:ubuntu-mate-dev/trusty-mate
    
    sudo apt-get update && sudo apt-get upgrade
    sudo apt-get install ubuntu-mate-core ubuntu-mate-desktop
    

    하나의 환경 만 원한다면 Ubuntu Mate 버전을 단일 OS로 다운로드하여 설치할 수도 있습니다 (단, Canonical은 공식적으로 지원하지 않습니다).

    https://ubuntu-mate.org/longterm/

    MATE 환경을 설치 한 후 마우스 플래시를 설정할 수 있습니다.

    1. 메뉴로 이동하여 환경 설정마우스 및 터치 패드를 선택하십시오 .
    2. Control 키를 눌렀을 때 포인터 위치 표시 ”옆에있는 눈금 표시를 활성화하십시오 .

    자세한 내용은 링크를 참조하십시오. Linux Mint / Ubuntu에서 마우스 포인터를 빠르게 찾기 | 나는 PC가있다 .


답변

  1. locate-pointer.c 다운로드

    wget https://gist.githubusercontent.com/sneetsher/d6d35b6181aa70c27a85/raw/dd874ac535d511c675724fa30d9e12ba5b810c37/locate-pointer.c
    
  2. 빌드 요구 사항 설치

    sudo apt-get install build-essential libx11-dev libcairo2-dev
    
  3. 그것을 구축

    gcc `pkg-config --cflags x11 cairo` locate-pointer.c -o locate-pointer `pkg-config --libs x11 cairo` -lm
    
  4. 시스템에 복사 bin/

    sudo cp locate-pointer /usr/local/bin/
    
  5. 바로 가기 만들기

  6. 컴포지트 사용

    루 분투

    1. 복합 관리자 설치

      sudo apt-get install xcompmgr
      
    2. 그것에 대한 라인을 추가

      ~/.config/lxsession/Lubuntu/autostart
      

    쉬 분투

    1. 실행 xfwm4-tweaks-settings→ 합성기 → 디스플레이 합성 활성화 확인

노트

  • 당신은 합성없이 검은 배경을 얻을거야. : 당신이 직장에 그것을 얻을 수없는 경우, 같은 다른 복합 관리자를 시도 compton, cairo-compmgr.

xcompmgr을 사용하는 Lubuntu의 위치 추적기

Xubuntu 세션에서 포인터 찾기

다음은 locate-pointer.c링크가 끊어진 경우에 대한 전체 코드입니다 .

/*
 * locate-pointer.c
 * Some windows manager missing option to locate mouse pointer as accessibity feature.
 * To get transparent window need to activate `composite` service for wm.
 * Coded in c / xlib so it can work in most wm's.
 *
 * Coded by:    Abdellah Chelli
 * Date:    January 2015
 *
 * Original code by:    Bernhard R. Fischer <bf@abenteuerland.at>
 *          Cairo graphics and X11/Xlib motion example.
 *          https://www.cypherpunk.at/2014/11/cairo-graphics-and-x11xlib/
 *
 * gcc `pkg-config --cflags x11 cairo` locate-pointer.c -o locate-pointer `pkg-config --libs x11 cairo` -lm
 */

#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <cairo.h>
#include <cairo-xlib.h>

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>

int cairo_check_event(cairo_surface_t *sfc, int block, double *mx, double *my)
{
   char keybuf[8];
   KeySym key;
   XEvent e;
   XSync(cairo_xlib_surface_get_display(sfc),False);
   for (;;)
   {
      if (block || XPending(cairo_xlib_surface_get_display(sfc)))
         XNextEvent(cairo_xlib_surface_get_display(sfc), &e);
      else
         return 0;

      switch (e.type)
      {
         case ButtonPress:
            return -e.xbutton.button;
         case KeyPress:
            XLookupString(&e.xkey, keybuf, sizeof(keybuf), &key, NULL);
            return key;
         case  MotionNotify:
            *mx = e.xmotion.x;
            *my = e.xmotion.y;

         default:
            //fprintf(stderr, "Dropping unhandled XEevent.type = %d.\n", e.type);
            return 0;
      }
   }
}


static void fullscreen(Display* dpy, Window win)
{
  Atom atoms[2] = { XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", False), None };
  XChangeProperty(dpy, win, XInternAtom(dpy, "_NET_WM_STATE", False),
                  XA_ATOM, 32, PropModeReplace, (unsigned char*) atoms, 1);
}


cairo_surface_t *cairo_create_x11_surface(int *x, int *y, double* mx, double *my)
{
   Display *dsp;
   Drawable da;
   Screen *scr;
   int screen;
   cairo_surface_t *sfc;

   XVisualInfo vinfo;
   XSetWindowAttributes win_attr;
   int mousex, mousey;

   if ((dsp = XOpenDisplay(NULL)) == NULL)
      exit(1);
   //XSynchronize(dsp,True);
   screen = DefaultScreen(dsp);
   scr = DefaultScreenOfDisplay(dsp);

   XMatchVisualInfo(dsp, screen, 32, TrueColor, &vinfo);
   win_attr.colormap = XCreateColormap(dsp, DefaultRootWindow(dsp), vinfo.visual, AllocNone);
   win_attr.background_pixel = 0;
   win_attr.border_pixel = 0;

   *x = WidthOfScreen(scr), *y = HeightOfScreen(scr);

   da = XCreateWindow(dsp, DefaultRootWindow(dsp),
           0, 0, *x, *y, 0, vinfo.depth, InputOutput,
           vinfo.visual,
           CWColormap | CWBorderPixel | CWBackPixel, &win_attr);

   fullscreen (dsp, da);

   XSelectInput(dsp, da, PointerMotionMask | ButtonPressMask | KeyPressMask);
   XMapWindow(dsp, da);

   sfc = cairo_xlib_surface_create(dsp, da, vinfo.visual, *x, *y);
   cairo_xlib_surface_set_size(sfc, *x, *y);

   Window rw=DefaultRootWindow(dsp);
   Window cw=da;
   int rx, ry;
   unsigned int mr;
   XQueryPointer(dsp, da, &rw, &cw, &rx , &ry, &mousex, &mousey, &mr);
   *mx = mousex;
   *my = mousey;

   return sfc;
}


void cairo_close_x11_surface(cairo_surface_t *sfc)
{
   Display *dsp = cairo_xlib_surface_get_display(sfc);

   cairo_surface_destroy(sfc);
   XCloseDisplay(dsp);
}

int main(int argc, char **argv)
{
   cairo_surface_t *sfc;
   cairo_t *ctx;
   int x, y;
   struct timespec ts = {0, 5000000};

   double mx, my;
   int c = 0;
   double dr0, dr1, dr2, a;

   int running;

   x = y = 0;

   sfc = cairo_create_x11_surface(&x, &y, &mx, &my);
   ctx = cairo_create(sfc);

   for (running = 1; running;)
   {

      dr0 = 20 * sin(c*M_PI/180.0);
      dr1 = 20 * sin((c+45)*M_PI/180.0);
      dr2 = 20 * sin((c+90)*M_PI/180.0);
      a = c*M_PI/720.0;

      cairo_save (ctx);
      //cairo_set_source_rgba (ctx, 0, 0, 0, 1);
      //cairo_set_operator (ctx, CAIRO_OPERATOR_SOURCE);
      cairo_set_operator (ctx, CAIRO_OPERATOR_CLEAR);
      cairo_paint (ctx);
      cairo_restore (ctx);

      cairo_push_group(ctx);
      cairo_translate(ctx, mx, my);
      cairo_rotate(ctx,a);
      cairo_translate(ctx, -mx, -my);
      cairo_set_source_rgba(ctx, 0, 0, 0, 0.1);
      cairo_paint(ctx);

      cairo_set_line_join (ctx, CAIRO_LINE_JOIN_MITER);
      cairo_set_source_rgba(ctx, 1, 0, 0, 1);
      cairo_set_line_width (ctx, 30);
      cairo_move_to (ctx, mx-50, my-100-dr0);
      cairo_rel_line_to (ctx, 50, 30);
      cairo_rel_line_to (ctx, 50, -30);
      cairo_move_to (ctx, mx+100+dr0, my-50);
      cairo_rel_line_to (ctx, -30, 50);
      cairo_rel_line_to (ctx, 30, 50);
      cairo_move_to (ctx, mx+50, my+100+dr0);
      cairo_rel_line_to (ctx, -50, -30);
      cairo_rel_line_to (ctx, -50, 30);
      cairo_move_to (ctx, mx-100-dr0, my+50);
      cairo_rel_line_to (ctx, 30, -50);
      cairo_rel_line_to (ctx, -30, -50);
      cairo_stroke(ctx);
      cairo_set_source_rgba(ctx, 1, 0, 0, 0.5);
      cairo_move_to (ctx, mx-50, my-150-dr1);
      cairo_rel_line_to (ctx, 50, 30);
      cairo_rel_line_to (ctx, 50, -30);
      cairo_move_to (ctx, mx+150+dr1, my-50);
      cairo_rel_line_to (ctx, -30, 50);
      cairo_rel_line_to (ctx, 30, 50);
      cairo_move_to (ctx, mx+50, my+150+dr1);
      cairo_rel_line_to (ctx, -50, -30);
      cairo_rel_line_to (ctx, -50, 30);
      cairo_move_to (ctx, mx-150-dr1, my+50);
      cairo_rel_line_to (ctx, 30, -50);
      cairo_rel_line_to (ctx, -30, -50);
      cairo_stroke(ctx);
      cairo_set_source_rgba(ctx, 1, 0, 0, 0.3);
      cairo_move_to (ctx, mx-50, my-200-dr2);
      cairo_rel_line_to (ctx, 50, 30);
      cairo_rel_line_to (ctx, 50, -30);
      cairo_move_to (ctx, mx+200+dr2, my-50);
      cairo_rel_line_to (ctx, -30, 50);
      cairo_rel_line_to (ctx, 30, 50);
      cairo_move_to (ctx, mx+50, my+200+dr2);
      cairo_rel_line_to (ctx, -50, -30);
      cairo_rel_line_to (ctx, -50, 30);
      cairo_move_to (ctx, mx-200-dr2, my+50);
      cairo_rel_line_to (ctx, 30, -50);
      cairo_rel_line_to (ctx, -30, -50);
      cairo_stroke(ctx);
      cairo_pop_group_to_source(ctx);
      cairo_paint(ctx);
      cairo_surface_flush(sfc);

      switch (cairo_check_event(sfc, 0, &mx, &my))
      {
         case 0xff1b:   // Esc
         case -1:       // left mouse button
            running = 0;
            break;
      }

      c++;
      nanosleep(&ts, NULL);
   }

   cairo_destroy(ctx);
   cairo_close_x11_surface(sfc);
   return 0;
}


답변

비교적 간단한 창을 생성하는 도구 인 “yad”를 사용하는 간단하고 더러운 트릭이 있습니다. (그것은 zenity에서 포크입니다)

따라서 스크립트를 작성하는 경우 다음 내용으로 $ HOME / bin을 말하십시오.

yad --picture  --width=68 --height=68 --no-buttons --size=fit --filename=ANY_PICTURE_YOU_LIKE --timeout=1 --mouse --undecorated  --on-top  > /dev/null 2>&1

너비와 높이 값은 그림의 실제 크기보다 4 픽셀 더 커야합니다.

마우스 위치에서 그림을 1 초 동안 오버레이합니다. 그림이 애니메이션 GIF 인 경우 요청한 위치와 상당히 유사한 것을 얻습니다.

키보드 단축키를 새 앱에 매핑하면됩니다.

preloader.net에 멋진 애니메이션이 있습니다
(저는 저작권 문제를 확인하지 않았습니다)

도움이 되길 바랍니다.


답변