Tutorial
Open up a terminal, and create a folder within your /etc/X11/ directory called xorg.conf.d and navigate to it:
sudo mkdir /etc/X11/xorg.conf.d
cd /etc/X11/xorg.conf.d/
Within this folder, make a file called 00-mouse-remap.conf, so bust open a text editor:
sudo gedit 00-mouse-remap.conf
The X Server should scan this directory for custom X11 scripts to load up at boot time. So the next step is to copy a config setting similar to this into the 00-mouse-remap.conf file you have just opened (customise to your will):
Section "InputClass"
Identifier "Microsoft Bluetooth Mouse 5000 button remap"
MatchProduct "Microsoft Bluetooth Notebook Mouse 5000"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "SendCoreEvents" "true"
Option "Buttons" "8"
Option "ButtonMapping" "3 2 1 4 5 0 7 0"
EndSection
Since this is mapped for a specific product, you should have separate configurations for your left and right handed mice. :P
You can find the name of your device by entering in to terminal:
xinput list
You will then need to edit a gnome configuration entry, so run (in terminal or type it into a run session using ALT+F2):
gconf-editor
(In case you have upgraded to a version that uses dconf, that is, 11.10 and everything later, run dconf-editor instead)
And navigate to this entry, and uncheck the box next to the entry that says active:
apps > gnome_settings_daemon > plugins > mouse
(In case of dconf, is org > gnome > settings_daemon > plugins > mouse)
Just be aware, that this disables the Gnome mouse pointer settings for when you modify your pointer settings within the GUI. So if you want to use the Mouse Settings GUI, you'll have to reactivate this - although, it could take over your new lefty settings. ^^
Examples
For example, my xinput list is:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Acer T230H id=8 [slave pointer (2)]
⎜ ↳ Logitech USB Gaming Mouse id=9 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Power Button id=7 [slave keyboard (3)]
↳ Apple, Inc Apple Keyboard id=10 [slave keyboard (3)]
↳ Apple, Inc Apple Keyboard id=11 [slave keyboard (3)]
So I would configure my 00-mouse-remap.conf to look like so:
Section "InputClass"
Identifier "Logitech USB Gaming Mouse button remap"
MatchProduct "Logitech USB Gaming Mouse"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "SendCoreEvents" "true"
Option "Buttons" "8"
Option "ButtonMapping" "3 2 1 4 5 0 7 0"
EndSection
References:
Ubuntu Forums Post by walkeraj
Best Answer
It does not seem there are many left-handed cursor themes. You have the following options:
comixcursors-lefthanded (ugly)
You have to install comixcursors-lefthanded
and gcursor
(gnome cursor theme managing software). Although
gcursor
doesn't seem to do install the theme for me it is useful to see what a cursor theme looks like.The theme ComixCursors-LH-White-Small looks the most decent, so let's pick that one
Installation
First we need to add an extra line to the themes
index.themes
file. All themes are located in/usr/share/icons
, and for the ComixCursors-LH-White-Small theme we need to doThis file looks like this:
Now we need to add the following line at the bottom (of course if you pick another theme, you should write the name of the other theme)
Now save and close the file.
On Ubuntu the utility
update-alternatives
manages the cursor themes, so we need to tell it about this new theme we want to use, executeNow if you log out and log in again, you should have your new cursors.
Note:
You can use
to change between the installed cursor themes.
Modifying the default (DMZ-White) theme (beautiful)
The above approach works but the cursors are ugly, however you can also modify the default theme. The cursors that you use most are the normal pointer and the hand (which appears if you hover over a link):
which are
/usr/share/icons/DMZ-White/cursors/left_ptr
and/usr/share/icons/DMZ-White/cursors/hand2
.The DMZ-White theme also provides a pointer that points to the right, and I made my own mirrored hand using gimp
(see note at the end):
The pointer is
/usr/share/icons/DMZ-White/cursors/right_ptr
, and mirrored hand is calledhand3
and I made it available on mediafire (if you follow the instructions below, you will download it automatically to the correct directory).Now we need to replace these cursors. First go to the DMZ-White cursor directory
Then download the
hand3
cursorNow backup the original
left_ptr
andhand2
filesNow let the new
left_ptr
andhand2
point to theright_ptr
andhand3
filesNow if you log out and log in again, you should have your new (beautiful) cursors.
Note: Editing cursor files using gimp
which is a free alternative to Photoshop. If you want to save your file choose Export to and then pick X11 Mouse Cursor. This will save your file with the
You can edit cursor files (and make your own cursor theme :) ) using gimp
.xmc
extension, but you can simply remove the extension.