Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-03-2009, 03:51 PM   #1
LQ Newbie
Registered: May 2009
Posts: 6

Rep: Reputation: 0
X11 Mouse Cursors

I was looking to make a cursor of a guitar but I been trying to for ages and failing miserably and I can't find anyone who seems to know anything about how to make the mouse cursors but there's loads of so clearly people do know how xD can anyone help me?
Old 06-03-2009, 04:06 PM   #2
LQ Guru
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292

1) Draw the image and save as .png, and make sure it is square like 32x32 or so. If this is the main cursor name it 'ptr.png'.
2) Write a text file called 'ptr.conf' that contains:
32 15 0 ptr.png
The first number is size, in this case 32 (32x32), the next is the hotspot (where you click), the pixels start from the upper left corner and numbering goes to the right for x and down for y. So 15 0 means 15 pixels from the left edge and 0 pixels down.
0 1 2 3 4 5 ... x
... y
3) Run:
xcursorgen ptr.conf ptr
making sure ptr.png is in this some directory. This will generate a cursor file 'ptr'.
4) Replace it in a theme or add it to a new theme, and that's it. You can also make animated cursors. Read 'man xcursorgen' for more info:
       Each line in the config file is of the form:
       <size> <xhot> <yhot> <filename> <ms-delay>

       Multiple  images  with the same <size> are used to create animated cur-
       sors, the <ms-delay> value on each line indicates how long  each  image
       should  be  displayed  before switching to the next.  <ms-delay> can be
       elided for static cursors.
If you want to start off with a theme you can try one that I made:
I've included various scripts to make things easier, at least for me. Now all I have to do is edit the images every time I want to make a new cursor theme and then run the scripts.

You can also use another cursor theme as a model for what you want to do, but make sure to find a FLOSS one. Some are not and don't include the images...

Last edited by H_TeXMeX_H; 06-03-2009 at 04:08 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
X11 cursors in WINE? kahlil88 Linux - General 2 03-08-2007 07:27 PM
x11 cursors and xfce4 question. extrasolar Linux - General 1 02-13-2007 05:50 AM
Mandriva default X11 cursors nucleocide Linux - Software 0 01-02-2006 04:05 PM
How to create new mouse cursors Hendrix Linux - Software 1 08-17-2003 01:57 AM
Mouse Cursors in KDE / GNOME pavkb Linux - General 3 03-03-2003 02:50 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:32 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration