How do I create a custom cursor theme from png files?

So I’ve been trying a few things such as xcursor and clickgen and icotool but couldn’t get any of them to work(might just be being noob at this). I also tried using pling where the KDE store is which is what is refrenced when you go to get custom themes, but trying to add a product results in an error, let alone I don’t yet have the working cursor theme. So does anyone know what does work or how to get one of those to work when creating a cursor theme from a png?

Ty in advance

What error?


https://userbase.kde.org/Create_your_own_mouse_cursor_theme

As for error it would say unauthorized user. Which I take to mean as to contribute something you need approval from the site. As for kde user base thing how/where exactly do i create. new to this.
So the first step is just grab the image and save it as a png. second seems easy, but the third is confusing. What do I throw into the command line? Doing the sample listed it just outputs that 32 isn’t a command and when I do manage to get it to create a file each space makes a seperate file while the demo command on the kde page says to just do 32 10 5 default.png to make the .cursor file which for me just makes 4 files 32, 10, 5, default.png with no image data. and attempting to throw that into xcursogen does nothing other than tell me wrong file types. Also the usage and droppage of the $ in the sample code on the kde page is confusing, when do I use it and when do I not?

So then what is the exact thing I enter into the command line to create the proper files?

Please read carefully. It does not state to run any command. You need to create a text file with some contend. You can use any text editor you like. Just make sure it is all in one line.

Re-reading your first post, was it about uploading the theme you are creating?
I don’t have an account there, so if you have a trouble with yours, you should rather seek support there for this point.

A bit of both. I saw the option to upload your own so I wanted to go to it and see what file it needed and such, only to find authorized user.

The plan was to then figure out how to upload what it needed, but since I couldn’t figure that out it was down to figuring out how to create the cursor theme from a png via something like xcursorgen which I couldn’t figure out how to work nor could find something that I could understand of what I run in the command line to get it to work.

Ohhhh, the entry on the site is confusing because the use of the $ and code blocks makes it seem like it is something to run in the console.

So I just go in the console and use touch test.cursor then pull up the new file in a text editor and then add the 32 10 5 test.png like that?

Then the next step would be to use xcursorgen test.cursor test and then from there I have a cursor file that if i were to go into cursor settings and click the import from file option that would be recognized?

A $ does not always starts a command in documentations. It is also often used to indicate a variable that needs to be filled or an actually bash variable. But the context in this how-to should be very clear.

Well, test is not a good example. The name of the png and filename are important and used to identify the cursor for specific use cases. Since I don’t create my own themes, I can’t help you much further.

You need to create a theme with an index.theme and the correct structure. The Arch wiki also has some wiki articles about that.
https://wiki.archlinux.org/title/Xcursorgen
More general information about this and for different DEs
https://wiki.archlinux.org/title/Cursor_themes

I have no idea if this is more than a draft, but it lists some possible cursor types and the names. But I would suggest you check some example themes. Sometimes there is code that generates the theme that might be helpful.
https://www.freedesktop.org/wiki/Specifications/cursor-spec/

Well sadly now I get a png error when the test.png is being read.

As for the wiki’s I’ve tried to read them, but I either run into an issue where an error pops up OR I can’t figure out what is meant by the wiki in steps.

Edit: I ran xcursorgen test.cursor test again and it worked this time apparently idk what I changed.

update: at this current point I have the x11 versions of the cursor but when i do Create symlinks for all the aliases of the cursors ln -s $(filename).png $(alias).png (e.g. ln -s default.png left_ptr.png). [2] See /usr/include/X11/cursorfont.h for a list of cursors. it creates a bunch of new files and then selecting the cursor theme just shows whatever I had on previously. So I guess the question this time is what is this step wanting me to do exactly? As when I look at other cursor’s files I see that in the cursor folder there is a bunch of x11’s linked to other x11/s but I can’t figure out how that was done. let alone get my cursors to show up.

A cursor theme consists of many different pictures. You need to create for every possible cursor state a picture. But if the picture would be the same, you can just create a symbolic link. You also could just copy the file and rename it.
Links can be created with the ln command. Read the manual page on how to use it (man ln).

You need to create a theme and place it in a appropriate folder.

But what am I linking them to? running the command links them a file that it makes and doing a test by replacing the main cursors like select and resize does nothing when the cursor theme is applied.

Or the list of the cursor theme I use.

Did you just replaces the files? Keep in mind there might be a cache and you would at least need to logout and in again. But this might be KDE specific.

I’ve done restart to no avail. Also when I ask about linking them too I mean I linked them to

default		left_ptr			# kcontrol mouse theme selection
right-arrow	right_ptr			# not seen by now
right-arrow	arrow				# nedit menu
up-arrow	center_ptr			# QT examples cursors
cell		cross				# QT examples cursors
all-scroll	fleur				# mozilla move cursor
help		question_arrow			# kcontrol mouse theme selection
wait		watch				# kcontrol mouse theme selection
progress	left_ptr_watch			# kcontrol mouse theme selection
pointer		hand2				# kcontrol mouse theme selection
col-resize	sb_h_double_arrow		# kcontrol mouse theme selection, mozilla resize cursor
row-resize	sb_v_double_arrow		# mozilla resize cursor
text		xterm				# konsole, konqueror, ...

and that creates the new files in the cursor folder and selecting the theme will end up just using whatever cursor theme was last used