11

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?

14
  • Not sure how it works under VcXsrv in Windows 10, but on Linux, the X server uses a "cursor font" from which it selects the cursors. You can select the cursor font as command line argument -fc when you start the X server. See man Xserver. It's not possible to set just the size of the cursor.
    – dirkt
    Apr 8, 2017 at 16:20
  • And maybe this helps, if you don't have alternate cursor fonts installed already.
    – dirkt
    Apr 8, 2017 at 16:22
  • @dirkt Thanks! I'm experimenting with this right now, but I'm at a loss on the format of the argument to -fc. Should it be the font name, the path to the font name, including the extension, etc? The big search engine didn't turn up anything useful. Apr 10, 2017 at 10:54
  • Good question, I don't know. I'd assume "font name" (-fp is the search path for fonts, and there are also font servers, which are separate programs). Give it a try and watch Xorg.log (whereever that is in Windows 10) to find out what happens
    – dirkt
    Apr 10, 2017 at 11:07
  • 1
    It's an annoying issue. As far as I can tell its not related to the windows-linux-subsystem but just to VcXsrv. I'm having this issue with all xclients independently on where they are running.
    – Reto Gmür
    May 30, 2017 at 15:21

4 Answers 4

9

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.

2
  • Thanks! Since I still have this problem, this is very welcome. I will try it out and come back here with the results. Nov 5, 2018 at 14:51
  • 1
    Seems I never came back - this worked perfectly! Aug 13, 2019 at 12:19
4

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.

3
  • 1
    Didn't work for me. Tried starting VcXsrv from within LSW bash shell, and tried starting from within windows with that set in the environment. The big-cursor method above worked. Jan 22, 2020 at 19:39
  • When I try this, the cursor does increase in size, but it seems the "window" it has to be visible stays the same - so it's now larger but the bottom half of it is cut off. Mar 10, 2020 at 20:52
  • Worked for me on Cygwin/X + Putty to decrease cursor size (32 was the right one for me).
    – yvf
    Jun 27, 2020 at 22:23
1

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

3
  • 2
    While this may answer the question, it would be a better answer if you could provide some explanation how to change that setting.
    – DavidPostill
    Mar 15, 2018 at 12:33
  • 1
    This did not work for me (I added the option in my shortcut to vcxsrv.exe). The only difference I noticed was that the pointer was much slower and lagged. Mar 19, 2018 at 12:15
  • This also worked on Xming for me. I modified the "Target" property on the Xming shortcut and added "-dpi 100 -swcursor" to increase both font and mouse cursor size. Mar 31, 2020 at 16:41
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.