Category Archives: programming

How to work around inoperable Fn key

How to disable touch pad with broken Fn key.

The laptop that I primarily use has a touch pad. While I researched the processor, screen, etc prior to purchase, I ignored this part of the computer and have regretted it ever since. Probably due to poor posture or the way my hands are put together, I have a tendency to inadvertently contact the touch pad while typing with wildly unpredictable results. The screen focus or cursor may go anywhere causing chaos and frustration. The touch pads with a separate buttons never caused me such frustration but the one on my computer is very difficult to use.

I discovered that Fn-F7 would disable this touch pad, restoring predictability to my computer operations. Additionally, a usb mouse restored my sanity and allowed me to enjob my laptop despite the touch pad. All of this changed about a week ago when, for some unknown reason, the Fn key stopped functioning. Now I was unable to disable the touch pad and my laptop was frustrating again. How could I turn it off if I couldn’t fix the Fn key?

Fortunately, in linux there is a solution. I’m currently running Linux Mint 17.2. Here’s how I fixed the problem:

First, in a terminal screen type

 xinput list

which resulted, in my case, in the following output:

⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech USB Optical Mouse id=9 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=12 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
 ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
 ↳ Power Button id=6 [slave keyboard (3)]
 ↳ Power Button id=7 [slave keyboard (3)]
 ↳ Sleep Button id=8 [slave keyboard (3)]
 ↳ HD WebCam id=10 [slave keyboard (3)]
 ↳ AT Translated Set 2 keyboard id=11 [slave keyboard (3)]
 ↳ Acer WMI hotkeys id=13 [slave keyboard (3)]

The key to see here is that the id of the Synaptics TouchPad in my case is 12.  Knowing this, we can turn this device off without having to use the Fn key after all using the following instruction:

 

xinput set-prop 12 "Device Enabled" 0

If you’d like to turn the touch pad back on, type the following

xinput set-prop 12 "Device Enabled"  1

You can also make a desktop launcher by right clicking on the desktop and selecting “Create Launcher” from the menu that pops up.

Interrupted WordPress Update Leads to Crash

I’ve been busy lately with various things, and haven’t paid much attention to my blog.  I keep planning to make a post, but never get around to it for some reason.  I finally decided that I had something to share, and noted that there was an update for WordPress that I could install.  I clicked the “install” button, and waited as things began to happen.

 

Once they started to happen, they never stopped.  My site never finished updating, and I was now left with a blog that didn’t display anything at all-just a blank, white screen.

After waiting a long time (hours), I decided that I’d probably broken things completely.  I searched for an answer, thinking this must be fairly common, but didn’t find anything that was useful.  I finally contact my hosting expert, who also publishes this great food-critic blog.  I was able to get FTP access to my site after a couple of password resets, and I was able to get to the files for my WordPress blog.  The first thing I did was look at the error messages that php had recorded.  Here’s what I found:

[14-Nov-2013 01:35:31 UTC] PHP Fatal error: Call to a member function reset_postdata() on a non-object in /myhostingrootpath/www.corneroftherooftop.com/directorytofiles/query.php on line 118

(Note that I did change the path information slightly so as to not give all the internal details of my hosting server.)

This didn’t really help me that much, but a internet search on this error wasn’t really all that promising.  I then downloaded and installed the latest version of WordPress using FTP, but still I got nothing but a blank screen upon entering the web address.  I then decided to look at my wp-config.php file.  I had previously noted from the timestamp associated with the files that this one hadn’t changed when I had attempted the update from within WordPress.  I also logged in to my host user management site and discovered what my problem was.

The address for the mysql server that my WordPress site was using was different in the wp-config.php file and what the host noted was to be used on its website.  This probably resulted from an upgrade to a newer version of mysql on the hosts server farm, and when I attempted to update WordPress the old mysql address became obsolete.   I changed the address in the wp-config.php file to match the new mysql server url, and off we went. The line specifically that I had to change was similar to this one:

define('DB_HOST', 'theactaullwebaddressfortheMysqlserver');

I had to undo a few other things that I had tried in the interim, such as moving all of my content via FTP to my computer to see if content specifically was the problem, which it wasn’t.  I also turned debugging mode on which resulted in some notifications but didn’t really help.

To summarize, the mysql host changed for some reason, most likely being the new version of WordPress and an updated version of Mysql from my hosting platform.  After changing to the new mysql server address, my problems went away.

I hope this will be of help if anyone stumbles into the same problem that I did.