How to check for a mouse and disable the trackpad

So I love my new massive desktop replacement of a laptop.  It’s fast, has plenty of RAM (for now at least), and plenty of Cores.  But it suffers from some of the same old issues every other laptop with a touchpad causes me.  When typing, it occasionally causes my cursor to end up in really strange places on my screen which results in messed up words or variable names.  On my MacBook Pro and in Windows I could disable the touchpad as soon as a mouse was connected.  I spent days trying to find the same settings on Linux and then ran across a few articles written by people who just wanted to turn off the trackpad for good.  That sounds good until you forget your mouse at home.  So I decided I needed to write my own script.  In a mere 38 lines(without comments) I came up with a script that looked to see if my mouse was connected and if so disable the trackpad.  If the mouse disappears or is removed the trackpad is re-enabled within 30 second.  If you want to use this script you will want to do a few things first:

  1. remove your mouse
  2. run “xinput list” determine what the system thinks your trackpad is called 
  3. plug-in the external mouse/pointer
  4. run “xinput list” again and determine what the system thinks it’s name is

My trackpad comes up as a ALPS GlidePoint.  If yours is different, which it likely will be, then you need to replace ‘ALPS GlidePoint’ in line 5 with the name of your trackpad.  If it is the same name then you don’t have to do anything with line 5.

My mouse comes up as ‘Logitech USB Receiver’ cause that sounds like a mouse right?  Well it is really the name of the wireless receiver for my mouse.  I shorted the name to just ‘USB Receiver’ in the hopes that any future wireless mice I may buy will use that part of the same name.  (Yeah I know there is about a 0% chance of that happening but I can dream can’t I?)  If yours is different, which like above it likely probably be, replace ‘USB Receiver’ in line 6 below.  If it’s the same then you don’t have to do anything with line 6.

The complete script can be found at this link.

One thing I did above that you may want to try in your scripts was to use the logger command instead of echo.  Logger uses the syslog subsystem and lets you write whatever you want to the default log for syslog.  Where to write is of course configurable if you need it to go somewhere else.  A word of warning though, logger will not move on if there is nothing to log.  It freezes and waits for you.  So like I did above, check to see if there is something in the variable before using it with logger.  Logger is available on most *nix versions.  If it’s missing you can normally find it as part of a syslog related package.

 

PCWorld is at war with itself over Linux on the Desktop…

So the story all starts with a very misguided reporter,  Tony Bradley,  failed to give Linux a chance to grow and change.  So much so that he declared it dead on the desktop.  He tried linux as his primary machine for 30 days.  Sounds like a good trial?  Well maybe it was but that was almost 2 years ago.  In the last two years for example Unity came from Shuttleworth’s dreams to reality.  OpenOffice forked and LibreOffice has seen development explode. In general the world of Linux marches on and at an impressive pace.  Microsoft and Apple have been around for since the 1970’s which makes them a little more than 30 years old.  As everyone will remember Linux just turned 20 last summer/fall.  So all things considered it’s amazing how far it’s come with no major financial backers.  You can read my own account of my life with Linux.  Oh yeah I am still using it as my main OS and using Windows 7 as little as possible.  I have found the latest versions of LibreOffice function nearly flawlessly and transparently with their Windows counterparts.  I digress though because this is supposed to be about the fact that even his fellow reporters at PCWorld don’t agree.  This where things get interesting.

Katherine Noyes wrote a rebuttal that pretty much attacked Bradley for saying Linux only makes up 1% of the desktop market.  She goes on to rant amazingly for Linux on the desktop is not dead yet.  She makes some great points and finished by agreeing with us on the fact that while Tablets are here we certainly not seeing the end of the PC era as lots of people would like us to believe.

Bradley can’t seem to just let this die and write another even more insulting response.  He goes off again about how few people are using Linux on the desktop.  He is of course forgetting that Linux is only sold, the numbers he is using, on about 30-40 models of PC’s.  Most of those are from Linux Speciality builders not the mainstream builders.  This isn’t to say none of them are the big builders, except Apple of course, all have a few PC’s you can buy with Linux.  What he is missing is people like me and many friends of mine who are repurposing old PC’s as Linux machines.  I know of a few companies that are also doing this for Kiosks, Point of Sale/Service Machines, School terminal servers and Terminal emulators.  So while Linux may not be a contender yet they are moving in and picking off the low hanging fruit.  So like the improvements we have seen in the interface and easy of install the number of users is growing fast.

At this point I thought the story would be over.  Then the Mayor of Munich came out last week and gave an interview about how easy, fast and cheaply they have managed to switch over to their own custom version of Linux called LiMux.  Even with them spinning their own version, standing up a development environment, hiring staff to do all of this, they still will save 4 Million Euros in the switch.  Then an additional 2.8 Million Euros each year in lowered/eliminated license fees.  Then there is the fact that helpdesk calls complaining about the change dropped from 70 a month to just 46 as the number of PC’s running LiMux increased from 1,500 to 9500.  It’s stories like these that will make CEO’s and more likely CFO’s sit up and take notice.  This isn’t a small business, it’s not a simple environment, it’s a large cities entire infrastructure being converted to Linux.  What else comes close to a modern Enterprise.

So in conclusion, yes you should look to see if you could switch out some Windows machines with Linux.  The exercise and evaluation of whether it’s possible is relatively cheap, fast and low impact.  If you could save even 25% off your Windows related software fees wouldn’t it be worth it?

Episode 67 – Bring out your dead Linux Desktops…

Does Desktop Linux Need a Steve Jobs?

What an interesting question.  Apple had Jobs and Windows had Gates.  Do we really need a persona like that to get linux on the desktop rolling?  Answering that question is the attempt of this article over at Datamation.com.  The concept seems to completely fly in the face of the community focus that the Open Source strives to be.  At the same time the kernel has Linus.  That one person who everyone knows and associates with it.  One of the big challenges we have with that is that there isn’t only one desktop.  Gnome, KDE, XFCE and most recently Unity are some of the biggest.  But there are more.  So which team should be that person?  Let us know.

 

What do you think?