18

I am running Ubuntu 16.04 on the Windows Subsystem for Linux on Windows 10 (with the Creators update). I have an X server (VcXsrv) running in Windows and from bash I open an lxterminal on that X server. My laptop has a resolution of 3840x2160 pixels.

My problem is that the mouse pointer in the lxterminal window is so small I can not find it even if I move it, so I have to move it out of the terminal window and then carefully move it to the place I want it to be.

This setup is so unusual (yet!) that I haven't found anything by searching.

How can I make the mouse pointer bigger?

Peter Jaric
  • 2,156
  • 5
  • 28
  • 37

4 Answers4

14

The following works, though might not be the best solution. Install package big-cursor

sudo apt-get install big-cursor

Then go to the directory you installed VcXsrv in, to the directory fonts/misc (e.g C:\Program Files\VcXsrv\fonts\misc), rename the file cursor.pcf.gz to cursor-small.pcf.gz, and then copy, from the linux system, /usr/share/fonts/X11/misc/big-cursor.pcf.gz to cursor.pcf.gz in the fonts/misc directory on the Windows side (where VcXsrv resides)

I'm sure there is a more elegant way to do this, but on my machine it works.

5

Set cursor size with this variable:

export XCURSOR_SIZE=64

Run this command in linux terminal. Choose suitable size: 16, 32, 64. To persist this settings between terminal sessions, add this command in ~/.bashrc.

I've tested this solution with VcXsrv and X410 X-Servers.

andrew
  • 151
5

I didn't like the accepted answer because big-cursor is pretty ugly actually, and I want something that's a bit nicer (and possibly larger). I couldn't find any cursors in the .pcf.gz format, so I tried looking for another solution.

Anyway, it turns out that that you don't need to do this at all. With the current version of VcXsrv, you can just install any cursor theme in Linux and if you set it up right, VcXsrv will use it. I think the tiny black cursor is there only as a fallback, but I really have no idea. Anyway, here's how I did it.

My setup was Windows 10, VcXsrv 1.20.14.0, Ubuntu 20.04, WSL2. It should work on other distros and in other configurations, though, since I was using generic X11 stuff. I'm not a Linux expert, though.

First, install this package:

sudo apt install x11-xserver-utils

Create an ~/.Xresources file with the contents:

Xcursor.theme: default
Xcursor.size: 48

Then run:

xrdb -load ~/.Xresources

Restart the X11 server and then start a GUI application (I'm assuming the DISPLAY is set up already). The cursor should change. You can fiddle with the size field to make it larger.

If this doesn't work, I think it's possible you don't have themes installed.

I wanted to install a different cursor theme since I didn't like the default ones anyway, so here's how I did that.

I chose https://github.com/manu-mannattil/adwaita-cursors, downloaded, and unpacked:

wget https://github.com/manu-mannattil/adwaita-cursors/releases/download/v1.2/adwaita-cursors.tar.gz
tar -xvzf adwaita-cursors.tar.gz

In general, you should be able to unpack the cursor theme to ~/.icons, or according to other sources ~/.local/share/icons. I didn't have any luck with that, no idea why.

Instead, I had to unpack it to what looks like the root folder for icon themes, /usr/share/icons.

sudo mv adwaita-cursors/Adwaita /usr/share/icons/adwaita

The directory structure of the theme needs to be THEME_NAME/cursors, so make sure whatever you're unpacking has that format.

After you're done with that, modify the .Xresources file you created earlier to use the THEME_NAME from before (in my case, adwaita):

Xcursor.theme: THEME_NAME
Xcursor.size: 48

Then run this again:

xrdb -load ~/.Xresources

Restart your GUI application (and maybe the X11 server), and there ya go.

GregRos
  • 178
0

Setting the option -swcursor for VcXsrv worked for me.

Update for "VcXsrv X Server" 1.20.8.1 (7 Apr 2020) to answer one of the comments. Client side is Putty session with X11 forwarding. Tested on VSCode (code) window on Manjaro with XFCE installed (Current Manjaro Linux as of April 19, 2020). Full XFCE is not running, just VSCode window.

Under additional settings in VcXsrv add this parameter:

-swcursor

how to set -swcursor option

The configuration is most likely specific to just "Multiple windows" mode:

enter image description here

with "Start no Client" option:

enter image description here

Sergei G
  • 203
Bassam
  • 37