Trackpad (touchpad) too sensitive on Ubuntu?

I resurrected a Dell Latitude e6420 a couple of weeks ago after it was kindly donated to me. It just needed some RAM and a Hard Drive and an operating system. I might get around to writing that process up at some point but for the sake of brevity, I’ll cut to the chase.

After installing Ubuntu 16.04 LTS on it and spending a fair while messing around with it, the final thing I wanted to do was sort out the trackpad/touchpad. It seemed to be far too sensitive (as opposed to ‘fast’), I would be accidentally selecting text on web pages, unintentionally dragging files around and all of that. In fact, it was so sensitive that I could move the cursor around by hovering my finger a few millimetres over it. There’s nothing in the standard Ubuntu GUI to adjust this sensitivity, but there is a command that you can plug into a terminal that sorts it out:

synclient FingerHigh=100

I have mine set to 100, but you can easily run the command again with a different integer value if it doesn’t work for you. The bigger the number, the less sensitive and vice-versa.

There are a lot of parameters you can tweak with synclient – no doubt I’ll be trying some of those out in the future, but for now that fixed most of the issues I’ve been having. Here’s the man page for synclient in case you want to have a go.

Once you’re happy with the way your touchpad is behaving, you’ll need to create a script to make the settings ‘stick’ on reboot. Now, you could follow my steps and export your synclient settings or you could actually copy mine and tweak from there. If you’re a glutton for punishment, in terminal type:

synclient -l > touchsettings

This will dump all the settings to a new file called ‘touchsettings’ – you’ll need to make a load of edits:

nano touchsettings

Then you need to make the format like this (just copy mine!):

#!/bin/bash
synclient LeftEdge=300
synclient RightEdge=1700
synclient TopEdge=210
synclient BottomEdge=1190
synclient FingerLow=12
synclient FingerHigh=100
synclient MaxTapTime=180
synclient MaxTapMove=107
synclient MaxDoubleTapTime=100
synclient SingleTapTimeout=180
synclient ClickTime=100
synclient EmulateMidButtonTime=75
synclient EmulateTwoFingerMinZ=141
synclient EmulateTwoFingerMinW=7
synclient VertScrollDelta=48
synclient HorizScrollDelta=48
synclient VertEdgeScroll=0
synclient HorizEdgeScroll=0
synclient CornerCoasting=0
synclient VertTwoFingerScroll=1
synclient HorizTwoFingerScroll=1
synclient MinSpeed=1
synclient MaxSpeed=1.75
synclient AccelFactor=0.0819336
synclient TouchpadOff=2
synclient LockedDrags=0
synclient LockedDragTimeout=5000
synclient RTCornerButton=2
synclient RBCornerButton=3
synclient LTCornerButton=0
synclient LBCornerButton=0
synclient TapButton1=1
synclient TapButton2=3
synclient TapButton3=0
synclient ClickFinger1=1
synclient ClickFinger2=1
synclient ClickFinger3=0
synclient CircularScrolling=0
synclient CircScrollDelta=0.1
synclient CircScrollTrigger=0
synclient CircularPad=0
synclient PalmDetect=0
synclient PalmMinWidth=10
synclient PalmMinZ=100
synclient CoastingSpeed=20
synclient CoastingFriction=50
synclient PressureMotionMinZ=15
synclient PressureMotionMaxZ=80
synclient PressureMotionMinFactor=1
synclient PressureMotionMaxFactor=1
synclient ResolutionDetect=1
synclient GrabEventDevice=0
synclient TapAndDragGesture=1
synclient AreaLeftEdge=0
synclient AreaRightEdge=0
synclient AreaTopEdge=0
synclient AreaBottomEdge=0
synclient HorizHysteresis=12
synclient VertHysteresis=12
synclient ClickPad=0

Press ctrl-O to save the file. Then you’ll need to make it ‘executable’ with this command:

sudo chmod u+x touchsettings

Now you’ll need to add it to your ‘Startup Applications’ – this is probably possible via terminal but I did it with the ‘Search your computer’ button in Unity like so:

Open ‘Startup Applications’ and then ‘Add new’:

And that *should* do it…

Increase disk space on debian VM filesystem with command line

If, like me, you’re a bit of a linux n00b and you’ve made the mistake of setting up a development VM-based linux server (in my case Debian) that ended up being a production server but you failed to provision enough disk space (it was only a dev server am I right?!) then you’ll probably have tried increasing the disk space in vSphere or similar and wondered how to make the OS see that extra disk space…

What you need to do is rebuild the partitions and then get the filesystem to fill the space, particularly the rootfs, which is probably where you are see 90%+ when you run:

$ df -h

First thing you need to do is have a read of this excellent guide: Live resizing of an ext4 filesytem on linux

Pay particular attention to the disclaimer about data loss. You MUST create a backup in case you mess this up.

This is actually magic. After adding additional disk via your VM management tool, you’re going to log in to your linux system and using fdisk you’ll delete active partitions, all of them. While you are logged on! Then you’re going to create new partitions and then get use resize2fs to get the OS to recognise the new space.

A colleague and I practiced this on a clone, and this morning I came in early and we did it on the production server.

The only slightly complicated bits were picking the right number of sectors to give to sda1 (we went with 60000000) leaving enough room for sda2 (Extended) and sda5 (Linux swap / Solaris).

The other bit we stumbled on while trying to follow the codesilence recipe was that the code section for resize2fs at the bottom of the post didn’t show the command to edit fstab, and we tried to do that last… that didn’t work 🙂 We reread it and realised the correct order is stated in this bit:

run mkswap, adjust /etc/fstab to the new UUID and turn the swap on

After you run mkswap, it will give you a UUID that you need to copy (or screenshot) which you then enter into /etc/fstab using your preferred editor (that’s nano for me, but you may prefer vim or vi… you sick puppy) THEN you do the swapon bit…

Enjoy your new space!

Correct location to mount a permanent drive in linux

There isn’t one.

I have a CIFS network drive mounted in /mnt/cifs on a Debian system at work, I’m then symlinking that to a subdir of the Apache web directory to enable me to get around that old issue of not being able to easily link to ‘local’ files due to differences in cross browser implementation of UNC… (it works BTW).

However, I noticed that the mount had stopped working today. I tried a few things, ‘mount’ was telling me it already existed, but I couldn’t see the directory in /mnt

I asked another guy who has access to the server (and who also knows a hell of a lot more about sysadmin than me) if he knew what might be going on, he said “Yeah – that was me, I needed to temporarily mount a drive and that’s what /mnt is for”.

He’s right too, I saw a few discussions of this while I was trying to find out what was wrong, one here another here and yet another here. Like I said, there is no place ‘correct’ place for permanently mounting a drive in linux, but it sure as hell isn’t in /mnt if you’ve got more than one sysadmin.

I think I’m going to go with the option of creating a new dir in root /network and mount any more permanent drives in there. But that lonely /srv directory is pretty tempting…

iPlayer gets deep linking back

Earlier in the year, BBC rolled out a new version of iPlayer and one of the ‘updates’ was removing the deep linking facility – where you could share a link to a specific point in the audio/video. That was really useful.

So I got in touch with them to ask if they’d put it back:

Me:
“We’ve been using the ability to deep link to a specific point in time on iPlayer content for years (e.g. ?t=2m13s) but we’ve just noticed that it doesn’t seem to work any longer. Could you please explain why it is no longer possible? If it is possible another way, please let me know how?”

Them:
“Thank you for contacting us at BBC iPlayer.
We understand you valued the ‘deep linking’ facility that was possible with a previous version of iPlayer.
This feature was removed from the new versions of iPlayer. We appreciate that you would like it to be reinstated. We do encourage people to use the play controls to navigate to the exact point within the programme that they wish to use.
Other detail about the features which have been developed and introduced, together with the issues involved in those kind of decisions, is available on this blog here:
http://www.bbc.co.uk/blogs/internet/posts/new-iPlayer-preview-feedback-and-live-launch”

Anyway. A couple of months pass, and then I notice the ‘chapters’ functionality on BBC iPlayer Radio – it turns out they’ve rolled out a new version of the deep linking!
They’ve dropped the question mark and gone for hash # instead, like this:

http://www.bbc.co.uk/iplayer/episode/b01q0k5b/wallace-and-gromit-a-close-shave#playt=0h3m50s

It doesn’t autoplay, but that’s fine by me.

Error 70: Permission denied Burnatonce

Are you trying to use the old but excellent Burnatonce software to burn a TOC and DAT file on Windows 7/8 or possibly Vista and getting an error saying “Error 70: Permission denied Error occurred in: frmMain:cmdWrite_Click” when you try to write?

The fix is to right click the burnatonce.exe (or shortcut) and select ‘run as administrator’ – et voila.

XP blank desktop – explorer.exe not loading (virut)

A friend of mine dropped off her Compaq laptop the other day, apparently it had been running slow and a friend of hers came round and “did stuff” to “sort it” – unfortunately it didn’t go to plan, and instead of the system performance improving as a result of the activity – it deteriorated to the stage where XP would display a blank desktop on startup (as in no taskbar, start menu, desktop shortcuts or anything).

So this was the state it was in when I got it. Here’s what I did:

Step 1: Get access to Windows Explorer
Hit ctrl-alt-delete – this only worked after leaving it alone for a couple of minutes after boot-up. Click “File>New Task (run) and type “explorer”. This brings up the windows desktop furniture.

Step 2: Find out why it isn’t loading
I wondered what her friend did.. I looked at the most recent installed apps in Programme files – there was an app called “TuneUp Utilities 2009”. A likely suspect I thought. In the wrong hands these tweak/tuneup utils can do more harm than good. I loaded up the app and undid all the “fixes”

Step 3: Check a little deeper
Restoring the TuneUp files didn’t solve the explorer.exe problem, so I figured that something else must be up with it. I suspected malware. I have rescued several Windows systems from malware (spyware, trojans etc) before using a great bit of software called MalwareBytes AntiMalware. I couldn’t get the faulty system to read the installer from my USB drive, so I had to burn it off onto CD. While I was doing that – I also stuck ‘FixShell‘ on there (a visual basic script that restores explorer.exe to the XP shell).

Step 4: Safe mode scanning
I restarted the PC and hit F8 repeatedly as the laptop started up, which brought up the XP menu with the option to load ‘safe mode’. I did this and logged in as administrator (which for some reason had not appeared during normal startup). This time it loaded up with explorer.exe no problem. I ran MalwareBytes AntiMalware quick-scan and it picked up 27 items. Some were trojans, mentions of rootkit (eek) and other registry entries (including disabling security centre). I opted to ‘fix’ them all and restarted again as prompted (some nasty bits of malware can only be deleted on boot). This still did not fix the issue. I ran another scan just in case. It found a few more bits. Restart.

Step 5. Manual(ish) restore of explorer.exe
…. this is where it got quite interesting… after several unsuccessful attempts to restore command.exe, including creating a slipstreamed SP3 disc to run sfc /scannow – I finally installed Avast Antivirus Home Edition and did a boot time scan (AVG8 was already installed but I removed it, finally realising it hadn’t done its job). Avast picked up lots of win32:JunkPoly infections. JunkPoly is Avast speak for Virut.

Virut is bad.

Very bad.

Worse than bad – it’s terminal.

Format and reinstall is the only option. Backing up is risky.

So now I need to get the photos off, scan them thoroughly and format the hard-drive and reinstall XP.

It probably came from a P2P service, somehow got passed AVG8 (outdated virus def probably), and started infecting the system with all kinds of malware.

Just downloading Ubuntu now – will attempt to back the data up tomorrow…

Give me your favourite quotes

I have been using a great little WordPress plug-in called ‘Quotes Collection‘ on this blog – it’s great for grabbing those quotes you see popping up over the web and adding them to your blog. It is my favourite aspect of my own blog actually – I like being inspired, challenged or reminded of important concepts and values by great thinkers.

You can get a sample of them by clicking on ‘Next Quote’ over there on the left- it doesn’t need to reload the page due to some javascript trickery (and you should see a non-javascript degraded version if you you don’t have js turned on).

Anyway – I want your quotes! What is your favourite quote? What makes a good quote?

If you have a favourite quote that covers anything in the category/tag cloud – please post them here and I will add them to my quotes collection… and others can grab them too.

Firefox 3.0.1 location url bar autocomplete broken (and rss live feed bookmarks)

My favourite web browser – Mozilla’s Firefox, has recently begun to cause consternation – only on my work PC. On the laptop it is fine. There are a gazillion blog/forum posts complaining about the new functionality of said URL bar, but so far I haven’t found anyone else describing the same issue as myself and several of my work colleagues.

This is what it looks like:

My broken Firefox 3
My broken Firefox 3

So – it looks like the autocomplete is ‘working’ (as in it brings up the icons for the pages) but it is not displaying the text – which makes it pretty useless. Even more odd is the fact that my Live Bookmarks (RSS) are no longer displaying either.

I tried everything (safe mode, delete localstore.rdf, new profile etc as per the Firefox Standard Diagnostic) ending in a complete and utter fresh install. A few of these seemed to fix it but on restart – the problem returned…

Another one of those annoyances I thought I would share just in case anyone else out there has the same/similar issue.

I will keep you updated as to whether a fix is found.

UPDATE: Today’s 3.0.2 update didn’t fix it either… well – it did until system restart (just like all the other installs I performed). Another thing I noticed today is that it doesn’t reload tabs when it does a browser restart, also ‘recently closed tabs’ is greyed out.

I am thinking that my initial conviction that it is caused by Group Policy at work is still the most likely… although our IT guy says he has the same problem at home (but there is a connection there ;-))

UPDATE: Today’s 3.0.3 update didn’t fix anything, although I notice that if I right click the url bar (where the star is) and select ‘customize…’ then click ‘Done’ – all my live bookmark feeds in the toolbar re-appear (until the next restart). Hmmmm…

Wireless trouble after installing XP SP3

I finally succumbed to installing Windows XP Service Pack 3 on my Asus F5RL laptop yesterday… it all seemed to go well, until I was surfing around the web and noticed that my internet connectivity dropped out (but my wireless connection to the router seemed fine). I tried an ipconfig /flushdns in the command prompt, but that didn’t help. In the end I managed to temporarily get back on the internet by ‘repairing’ my wireless connection. It seems to happen randomly every hour or so – I haven’t yet discovered a pattern.

This is what Firefox tells me:

Connection Interrupted

The document contains no data

The network link was interrupted while negotiating a connection. Please try again.

It doesn’t actually help that I had some trouble with my ADSL the evening before the SP3 install, that’s just muddying the waters. That turned out to be fixed by unplugging the telephone lead from the router for no less that 70 mins – but not before the muppets at plus.net made me reset my router back to factory settings of course. I wish they would rip that page out of their crib sheets where it says “Get the numpty customer to reset their router and reinstall their operating system before you actually listen to their description of the problem” 😉

Anyway – my next step at trying to fix the annoying SP3 issue (which, incidentally – I recommend you do not install unless you have read find a thread here with a cluster of folks who had similar symptoms… no real solution there – the reset the Winsock Catalog comment looks promising – I might try that if I can replicate the error after I changed the DNS settings to point to the ISPs DNS server, rather than the routers IP address.

Are you with me so far? I will be back in a bit with some updates – I need to see if I get the error again.

UPDATE – I got the error again. Clicked ‘try again’ and it loaded the page up… mmm

UPDATE – I also found this which discusses possible issues with WPA-PSK and TKIP… great!

UPDATE: I changed the wireless channel on my router a couple of days ago from ch 13 to ch 11, and haven’t had any issues since. As far I am concerned – this is fixed.