I wasn't able to change the mouse cursor on my light weight window manager, even with the instructions on the forums until recently. The size needed to be larger. There's two different places that the mouse size and style can be changed: on descendant windows/applications, and for the background (root window).
Cursor on descendant windows/applications
Adjust and soft link .Xdefaults to .Xresources if you haven't already.
16, 24, 32, 48 are common sizes.
Optionally before this line, use the directory of the font:
This is a default which comes with x11-themes/xcursor-themes. This theme comes with: redglass, whiteglass and handhelds. Ports for cursors install to /usr/local/share/icons/, and the directory name from here is used for identifying cursor sets. To install more cursor themes from ports, look in the directory of /usr/ports/x11-themes/, then
To add custom files outside of ports, use ~/.icons/ or alternatively ~/.local/share/icons/. Place and unpackage custom cursor themes locally to your icon folder.
These icon locations are according to Xcursor(3).
Cursor on background desktop (root window)
Setting the cursor on your background requires the use of xsetroot(1) for basic window managers, then add this to your .xinitrc or .xsession file.
Other options include: X_cursor, gumby, ul_angle, ur_angle, right_ptr
For this, you can also use the name of the specific file, within the directory under /usr/local/share/icons/. Not the directory as in the window/application setting. However, this icon will take that cursor from the cursor theme used on your desktop.
For more xcursor fonts for xsetroot, see Xlib - C Language X Interface: Appendix B (X Font Cursors): https://x.org/releases/current/doc/libX11/libX11/libX11.html#x_font_cursors
Screenshots
whiteglass in increased size:
Image on far right has resize whiteglass cursor in the bottom right.
redglass on the left in increased size, and "handhelds" on the far right which comes small:
The first two are from x11-themes/cursor-crystal-theme of crystalblue and crystalgreen. The one on the far right is Vanilla-DMZ-AA from x11-themes/cursor-dmz-aa-theme:
Vanilla-DMZ from x11-themes/cursor-dmz-theme isn't shown. It has the same style as Vanilla-DMZ-AA, except it is white with a black outline. Their style also differs from the default (of whiteglass), for example, the resize icon is different as you can see on the bottom right of the far right image.
X_cursor and gumby over xsetroot:
These are xsetroot cursors over three images of featherpad, (the previous examples were over the actual featherpad application). The first two are X_cursor and the last one is gumby. They are over crystalblue, redglass and generic.
For these examples: LGPL, MIT and Creative Commons' licensed cursor ports were used.
Onwards
If you can load more cursors into ~/.icons/ for use, let us know! https://iconduck.com/licenses is one location for cursors and icons categorized by opensource license. Show examples of opensource and freeware cursors. While GPL can be included, give focus to cursors with nonviral or less viral opensource licenses including LGPL. Proprietary cursors can be merely mentioned, as long as they're legitimate copies.
I've also used the gumby cursor for x11/xdm, by placing
For additional tailored information about cursors, see the tag: https://forums.freebsd.org/tags/cursor-customization/. If you have more caveats, please show them!
Cursor on descendant windows/applications
Adjust and soft link .Xdefaults to .Xresources if you haven't already.
xrdb $HOME/.Xresources
is supposed to reload this, but in my case, it required restarting the window manager. The cursor settings may reload faster limited to restarting windows/applications for testing. To simply increase the cursor size, insert into .Xresources:
Code:
Xcursor*size: 32
Optionally before this line, use the directory of the font:
Code:
Xcursor*theme: whiteglass
ls | grep cursor
To add custom files outside of ports, use ~/.icons/ or alternatively ~/.local/share/icons/. Place and unpackage custom cursor themes locally to your icon folder.
These icon locations are according to Xcursor(3).
Cursor on background desktop (root window)
Setting the cursor on your background requires the use of xsetroot(1) for basic window managers, then add this to your .xinitrc or .xsession file.
Code:
xsetroot -cursor_name left_ptr
For this, you can also use the name of the specific file, within the directory under /usr/local/share/icons/. Not the directory as in the window/application setting. However, this icon will take that cursor from the cursor theme used on your desktop.
For more xcursor fonts for xsetroot, see Xlib - C Language X Interface: Appendix B (X Font Cursors): https://x.org/releases/current/doc/libX11/libX11/libX11.html#x_font_cursors
Screenshots
whiteglass in increased size:
Image on far right has resize whiteglass cursor in the bottom right.
redglass on the left in increased size, and "handhelds" on the far right which comes small:
The first two are from x11-themes/cursor-crystal-theme of crystalblue and crystalgreen. The one on the far right is Vanilla-DMZ-AA from x11-themes/cursor-dmz-aa-theme:
Vanilla-DMZ from x11-themes/cursor-dmz-theme isn't shown. It has the same style as Vanilla-DMZ-AA, except it is white with a black outline. Their style also differs from the default (of whiteglass), for example, the resize icon is different as you can see on the bottom right of the far right image.
X_cursor and gumby over xsetroot:
These are xsetroot cursors over three images of featherpad, (the previous examples were over the actual featherpad application). The first two are X_cursor and the last one is gumby. They are over crystalblue, redglass and generic.
For these examples: LGPL, MIT and Creative Commons' licensed cursor ports were used.
Onwards
If you can load more cursors into ~/.icons/ for use, let us know! https://iconduck.com/licenses is one location for cursors and icons categorized by opensource license. Show examples of opensource and freeware cursors. While GPL can be included, give focus to cursors with nonviral or less viral opensource licenses including LGPL. Proprietary cursors can be merely mentioned, as long as they're legitimate copies.
I've also used the gumby cursor for x11/xdm, by placing
xsetroot -cursor_name gumby &bg
into /usr/local/etc/X11/xdm/Xsetup_0.For additional tailored information about cursors, see the tag: https://forums.freebsd.org/tags/cursor-customization/. If you have more caveats, please show them!