I hate the mouse, so I wanted to have an equivalent of xterm's ctrl-ins (clipboard paste) in every window. mmc on irc.freenode.net's #sawfish channel was kind enough to whip this up for me:
(require 'sawfish.wm.util.selection)
(define (send-string-to-window s w)
(let ((i 0))
(while (< i (length s))
(let* ((ch (substring s i (setq i (1+ i))))
(e (cond ((equal ch "n") "RET")
(t ch))))
(synthesize-event e w)))))
(defun send-selection (window)
(interactive "%W")
(send-string-to-window
(x-get-selection 'PRIMARY) window))
Just put that in ~/.sawfish/rc (or ~/.sawfishrc if you already have one,) restart sawfish and edit your bindings. You'll see a new action called send-selection that you can bind to whatever key you want. I chose ctrl-; because it seemed unlikely that any app would use that binding already.
]]>Another utility that I assume everyone knows about is Xclip. Xclip provides a command line (think std in/out) interface to the X11 clipboard. It's amazingly handy and works over X11 forwarding SSH. There are even Debian packages, so stop reading and go get it!
]]>Some Googling turned up an article at KernelTrap.org that recaps a very interesting discussion between Linus and Vojtech Pavlik on the Linux Kernel Mailing List this past November about The Mouse in 2.6. It turns out that the 2.4 kernel performs absolutely no mouse initialization, while the 2.6 kernel performs quite a bit. Pavlik emphasizes that the mouse initialization in 2.6 makes things better in most cases, but the discussion makes clear that there are a few cases when it just doesn't work. And to make matters worse in those cases, there's currently no way in 2.6 to change the kernel's decisions, because, according to Linus, the new input-mode driver in 2.6 doesn't allow the user to send information back to the mouse like the old psaux driver allowed. But there's a way to get around all this: Passing psmouse_noext=1 to the kernel at boot will bring back the old 2.4 behavior of no mouse initialization. After reading the discussion, I thought that there was a good chance that I had found the fix, or at least a workaround.
But, alas, psmouse_noext=1 didn't change anything for me one way or the other. But I still learned a lot from the LKML discussion, including some interesting information about Linus' philosophy about how things should work in Linux, so I highly recommend it.
Some more Googling turned up the Synaptics TouchPad driver for XFree86. According to the driver's FAQ, it works with the 2.6 kernel (2.4 too) and facilitates lots of advanced touchpad features including:
So, I decided to give this new driver a try to find out if it would clear up the problem and get the touchpad working again. The answer is yes, it works wonderfully! The driver compiled easily and the INSTALL file that comes with the source explains everything you need to know to install the driver including how to modify your XF86Config config file. The README file explains all of the options available for making use of the advanced Synaptics features.
So grab a copy of the driver and have fun! By the way, thanks very much to Deadman for letting me use his forum!
]]>