|
|
To make a Desktop cursor change, perform the following steps. You must be logged into the system as root to perform this task.
!Cursor !Name: xdt3.name !Class: XDesktop3.Cursor.Bitmap *resource_name.data: bitmap_filenameWhen you are finished, save your changes and exit the resource file.!Mask !Name: xdt3.name !Class: XDesktop3.Cursor.Bitmap *resource_name.mask: bitmap_filename
The default Desktop cursors are located
in the default picture directories,
/usr/lib/X11/IXI/XDesktop/bitmaps/xdt_c_[large|small].
You can look in the files located in these directories to see sample
bitmap files and filenames, but do not edit the files in this directory.
If you want to edit a default Desktop cursor, copy the default bitmap
file, then make desired changes to the copy.
In addition, instead of adding your new bitmap file(s) to one of these directories, it is recommended that you create your own picture directory and store the customized bitmaps in this new directory. The picture directory can be located anywhere, but make sure it is in a logical place so that subsequent bitmap files can be stored in this directory also. For example, it is probably logical to create a directory in a system path to store cursors that affect the Desktop system-wide. A recommended location would be in /usr/include/X11; for example, creating a directory called /usr/include/X11/Newbitmaps would probably be more logical than creating a directory in your $HOME directory path. Nevertheless, you can designate any directory to be the new bitmap directory.
The default resource file for the Desktop is /usr/lib/X11/app-defaults/XDesktop3. The resources in this file are read when the Desktop is invoked. If you want to specify Desktop resources that affect all users on your system, this is the file to edit.
See also:
There are two different resource specifications you might need to set: the cursor resource specification, which consists of the pair of resources resource_name.data and resource_name.mask, and the picture directory specification, which involves setting the pictureDirectory resource.
Cursor resource specifications must use the following format:
!Cursor !Name: xdt3.name !Class: XDesktop3.Cursor.Bitmap *resource_name.data: bitmap_filenameThe lines preceded by an exclamation mark ``!'' are comments. It is important to comment your new resources so that you or other users can understand the intent of the specifications.!Mask !Name: xdt3.name !Class: XDesktop3.Cursor.Bitmap *resource_name.mask: bitmap_filename
*resource_name.data represents the resource name of the data pixmap. See ``Resources that control Desktop cursor appearance'' for a list of valid cursor names. The data pixmap defines the image associated with the cursor, for example, a hand or an hourglass. *resource_name.mask represents the resource name of the mask pixmap. The mask pixmap defines the shape, or the outline, upon which the data pixmap is drawn. The mask is needed so that the image shows up on any color of background.
bitmap_filename refers to the name and location of the
new bitmap file. You can indicate where the new bitmap file is located
by specifying the new bitmap location with an absolute pathname
in both the .data and .mask cursor resources.
For example, if your data and mask pixmap files are located
in /usr/include/X11/Picture in files hand_d_xbm
and hand_m_xbm, respectively, and you want these pixmaps
to represent the idle cursor on the Desktop,
specify their location by adding the following to the cursor resource:
*idle.data : /usr/include/X11/Pictures/handbit_d_xbm
*idle.mask : /usr/include/X11/Pictures/handbit_m_xbm
If you do not indicate an absolute pathname in the .data and .mask resources, you must specify the pictureDirectory resource.
The pictureDirectory resource contains the list of directories that are searched when a picture file with a relative name is specified. This list is searched sequentially, so the most frequently accessed directories should be placed at the beginning of the list.
If you do not specify an absolute pathname for the .data and .mask cursor resources, you must add the pathname of the new picture directory (the directory where your bitmap file is located) to the pictureDirectory resource in the XDesktop3 resource file. By default, the resource looks like this:
!Name: xdt3.pictureDirectory !Class: XDesktop3.PictureDirectory !Default: No default value. *pictureDirectory: $XDTBITMAP/xdt_c_large \ $HOME/.xdt_dir/bitmaps/xdt_large \ $XDTBITMAPS/xdt_large \ /usr/include/X11/bitmapsThe first directory indicated is the first path searched, when relative pathnames are specified in cursor resources.
Add the absolute pathname of the directory created in Step 1 to the beginning of this resource. For example, if you decide to store your bitmaps in a directory called /usr/include/X11/Pictures, make sure this directory is the first directory indicated. The resource line is similar to this:
*pictureDirectory: /usr/include/X11/Pictures \ $XDTBITMAP/xdt_c_large \ $HOME/.xdt_dir/bitmaps/xdt_large \ $XDTBITMAPS/xdt_large \ /usr/include/X11/bitmaps
See also:
Once you have made the desired cursor changes to the Desktop resource file, the new specifications are immediately available to all users. However, if users were running the Desktop while you made your changes, they need to restart the Desktop before they see the new cursors.