Lubuntu中是否有“定位指针”帮助器(视障人士)

视障人士最困难的事情之一是找到望向屏幕的鼠标。

因此,按下CTRL后,启用locate mouselocate pointer给予一些额外的视觉注意(闪烁的橙色圆圈/波浪)。 (很难在截图中看到:左侧)

在Ubuntu中找到鼠标

Xubuntu没有这个宝贵的工具,Ubuntu对于1GB双核旧硬件来说太重了。 Gnome拥有它,Unity拥有它,Compiz拥有它, Mint拥有它。 Xubuntu / XFCE没有它。

它不是一个更大的鼠标,这有点帮助。 需要一些闪光的注意力。

使用高对比度主题。

如果Lubuntu有它,我考虑从徐切换到陆。

  • Xubuntu中,转到设置管理器鼠标和触摸板主题 。 在那里你可以使鼠标光标尺寸更大。

    Xubuntu鼠标和触摸板csettings

  • 您还可以下载鼠标的其他主题,以便更轻松地查看鼠标。 见xfce-look.org 。 您可以根据自己的喜好选择主题。

    我认为这个最适合您的需求: DMZ黄色背景多尺寸 。

    至于Lubuntu :根据其wiki网站,PCManFM和LxPanel不使用光标主题,您必须手动更改光标。 有关更多详细信息,请参见此处: https : //wiki.archlinux.org/index.php/LXDE#Cursors

  • 还有一个选择:在你的Ubuntu上安装MATE环境 ,它在512 MB 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版本作为一个操作系统(但请注意,Canonical不支持)。

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

    安装MATE环境后,您可以设置鼠标闪存:

    1. 转到菜单,然后选择首选项鼠标和触摸板
    2. 启用“ 按下Control键时显示指针位置 ”旁边的刻度线。

    有关详细信息,请参阅链接: 在Linux Mint / Ubuntu中快速查找鼠标指针 我有个电脑 。

  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. 启用复合

    Lubuntu

    1. 安装复合管理器

       sudo apt-get install xcompmgr 
    2. 为其添加一行

       ~/.config/lxsession/Lubuntu/autostart 

    Xubuntu的

    1. 运行xfwm4-tweaks-settings →Compositor→选中“启用显示合成”

笔记

  • 你会得到没有复合材料的黑色背景。 如果你无法使它工作,请尝试其他复合管理器,如: comptoncairo-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  * 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  #include  #include  #include  #include  #include  #include  #include  #include  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个像素。

它将覆盖图片,一秒钟,在鼠标的位置,如果图片是动画gif,你得到的东西非常类似于你要求的东西。

您只需将键盘快捷键映射到新应用程序即可。

在preloader.net上有一些不错的动画(我没有检查过版权问题)

希望能帮助到你。