Crouton is a nice set of scripts for running Ubuntu on a Chromebook. These notebooks have no middle mouse button. If you also run emacs in crouton, this is for you.
This article describes how to simulate a middle mouse click in emacs in order to paste the primary clipboard.
Map [alt] + [click] to middle button in crouton
This official wiki page
click can be mapped to the middle button in crouton:
xdotool in your chroot:
# apt-get install xdotool
2) Create in your chroot
; Map Alt+click to middle button ; Map on Release so that it does not appear both buttons are pressed (xbindkey '(release alt "b:1") "xdotool click --clearmodifiers 2")
3) Restart your chroot.
In each chroot, crouton starts for you Xbindkeys
$ ps aux | grep xbind /usr/bin/xbindkeys -f /home/lourot/.xbindkeysrc.scm
and you've just told it to use xdotool to simulate another key when releasing
Unfortunately with the previous trick, emacs hears
middle-click instead of just
middle-click. Therefore we need to make
middle-click paste the primary clipboard in
emacs. To do so, add the following line to your emacs configuration and restart it:
(global-set-key (kbd "<M-mouse-2>") 'mouse-yank-primary)
For other emacs configuration tips for crouton, see crouton-emacs-conf.