Run the program
xev from a terminal to see the keycode sent by the CapsLock key. That's the number just after
keycode on the third line from the
KeyPress event line corresponding to pressing the key. On a PC, the keycode is 66.
Create a file called
.Xmodmap in your home directory and add the line
keycode 66 = Mode_switch
Mode_switch is the weird name that X11 gives to Compose.
clear Lock is necessary to avoid the key occasionally acting like Caps Lock even though it isn't Caps Lock (
Lock is the Caps Lock modifier, and some applications behave a bit strangely when modifier declarations and keysym declarations aren't consistent). Alternatively, you can use the lines
keysym Lock = Mode_switch
which causes any key currently sending Caps Lock to be rebound to sending Compose instead. Either way, you need to arrange for the command
to be executed when your session starts. This is a common convention, but not all combinations of distribution/desktop environment do it automatically. If yours doesn't, add the command to the list of commands executed at the session start (in the XFCE4 configuration editor, go to “Session and Startup” → “Application Autostart” and add that command).
XKB is neater and more powerful, but more cumbersome to use in general than xmodmap. There is a preset in the standard configuration to do what you want, so it's easy in your case: run the following command:
setxkbmap -option compose:caps
See the previous section for how to run this command when your session starts.
Find out the keycode of the CapsLock key. Run
showkey on a text console, press CapsLock, then wait 10 seconds for
showkey to exit. On a PC, the keycode is 0x3a. You need to have the following line in your console keymap file:
keycode 0x3a = Compose
The default console keymap file is
/etc/console/boottime.kmap.gz on Debian with the
console-tools package. It may be a different file under Mint; this is the file that
loadkeys is invoked on in the boot scripts. If you prefer, you can leave the distribution-provided files intact, create a file with the line above, and run
loadkeys /path/to/your/file.kmap from