Disable middle mouse button (paste) on Debian KDE

Every now and again I will accidentally click the middle mouse button when I go to grab my mouse, and KDE will dump my clipboard buffer into a BASH shell. Not good. Could run something damaging if I'm unlucky. So see here for the solution. Basically run this to get the mouse device ID:

xinput list | grep 'id='

Then to edit e.g. device 10 to disable middle mouse button:

xinput set-button-map 10 1 0 3

To persist the changes add the set-button-map command to e.g. ~/.xstartup.

Or you can add a pointer configuration to ~/.Xmodmap like this:

pointer = 1 0 3 4 5 6 7 8 9 10

And make sure xmodmap is applied at start-up with an autostart file like e.g. ~/.config/autostart/mouse-config.desktop:

[Desktop Entry]
Comment=Disables middle mouse button.
Exec=xmodmap /home/jj5/.Xmodmap

KDE Plasma Desktop hacks

I managed to get my desktop settings so that files on the desktop were sorted automatically. But I didn't want that. I edited the ~/.kde/share/config/plasma-desktop-appletsrc file and set the sortingStrategy=0 and that disabled automatic alphabetical desktop sorting.

I wanted to run an application on my desktop when I dropped some files on it. To do that I created a process.desktop file like this:

#!/usr/bin/env xdg-open
[Desktop Entry]
Exec=/home/jj5/bin/tmp/process-test %F

Note the "%F" to receive the file list. More information here and here.

Disabling sound in Debian KDE

I'm having a problem whereby my KDE session is "locking up" periodically for 5 or 10 minutes at a time. I checked /var/log/syslog and dmesg and it *seems* as though the high-priority audio threads are staving other threads, so I figure I'll try to disable sound and see if my system continues to lock up. To disable sound I used:

root@mercy:/home/jj5# alsa force-unload
Unloading ALSA sound driver modules: snd-ens1371 snd-ac97-codec snd-seq-midi snd-seq-midi-event snd-rawmidi snd-pcm snd-page-alloc snd-seq snd-seq-device snd-timer (failed: modules still loaded: snd-ens1371 snd-ac97-codec snd-rawmidi snd-pcm snd-page-alloc snd-seq-device snd-timer).

How do I permanently disable Linux’s console screen saver, system-wide?

I was wondering how I could disable the console screen saver on my server (so I can watch progress of stuff in the background) and I found this article, How do I permanently disable Linux's console screen saver, system-wide?

One of the solutions suggests installing the console-tools package, but there is another solution that looks like it doesn't need any package installed, so I'm gonna give that a try first. The solution is to edit /etc/kbd/config and specify:


I've configured that now but won't be able to test for a while as I can't reboot my server just at the moment.

While I was at it I figured I'd have num lock enabled by default too:


Update: I was finally able to reboot my system and test that config, and: it didn't work.

I tried to apt-get install console-tools, but that make things even worse! I recommend that you don't try and install console-tools on Ubuntu Lucid, if my experience is anything to go by. Lucky I could still SSH to my server, because there was no console!

In the end I settled on a solution I found over here, being to add the following to /etc/rc.local:

setterm -blank 0 -powersave off -powerdown 0