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!):

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…

How to install WordPress MU using SVN

I had to get my head around this for WP standard work recently, and thought I would combine it with some WP-MU experimentation.

Current release (at time of writing) WP-MU 2.6.5

Page on WP Codex on setting up WP with Subversion (not MU specific, but you can usually add ‘-mu’ on the end of WP πŸ™‚

So if your host, like mine, supports SVN , navigate to your chosen directory and create a subdirectory if you want one:

mkdir blog
cd blog

svn co .

EDIT: Don’t install WP-MU in a subdirectory!

The space AND dot is VERY important (I did forget it a few times while trying this out)

Create new database on Dreamhost (or whatever host you use):

Make a note of the details and proceed with a standard install procedure or edit your wp-config.php if you would rather.

Updating WP-MU to run off a later tag

svn sw .

or off ‘trunk’ (not recommended for production environments)

svn sw .

This will replace all files that were associated with the tagged files from the repository (in our example, from 2.6.5) to the newer version, in this case 2.7 (at the time of writing WP 2.7 is out but not WP-MU 2.7).

Easy peasy!

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…

Why I think Open-Source Software is key to human evolution…

Have we stopped evolving? Only time will tell of course… but I don’t think so – I think we have started our own evolutionary track – call it ‘technology’. It remains to be seen whether we will continue to evolve physically, but I suspect we will just re-engineer ourselves and possibly everything around us based on the current mindset of the majority. It might get a bit out of hand though.

It is fair to say we are at a fairly crucial stage in our relationship with the natural world, having given up being shaped by our environment and deciding to make it do our bidding…

I am not really wanting to get into Oryx and Crake territory – although I suspect that if things go horribly wrong for us in the future – it will be because someone in the present wants to maximise their gain by exploiting present day resources at the expense of successive generations. This will probably be due to shareholders wanting to increase their value in a company so that they can sell it off and enjoy the profits before they shuffle off this mortal coil. Very few corporations are concerned with ‘doing the right thing’ – it is contrary to their nature, and usually if they seem to do so, it is because they see it as a PR opportunity – a chance to ‘sell more stuff‘ by convincing you that they are doing it for your benefit.

I find the non-commercial nature of open source technology refreshing. It’s about people coming together to solve a problem because it needs solving, and often the participants want nothing in return except to see the software evolve. The value is in the solution and the reward is in contributing.

So, back to the title of this post, I think that the dystopia can be avoided by taking the open-source movement’s approach and applying it to almost everything. Let’s start with the foundation for life – our planet. It is our planet, yes. But it is also their planet – like this kid:

So – let’s imagine we are on his side, and we are capable of thinking beyond our own life span – how would we actually make a difference? I can assure you that it won’t be big business that saves his world, we won’t get there by buying more stuff – no matter how much is spent on persuading us otherwise. It probably won’t be government to the rescue either, politicians are more concerned with staying in office or getting into it. All this ‘Punch and Judy’ party politics is just a big distraction. So – what exactly am I proposing? Well, for now I propose that we get together and work it out. After all – there are some great open source software tools out there that will help the process, by connecting together the greatest minds and problems solvers, and let’s remember, as we surf around, that much of what we are doing is only made possible because of the fundamental human drive to sort out problems and that things only start to happen, and evolve when you get involved and contribute.

In the words of the great Buckminster Fuller:

“Take the initiative. Go to work, and above all co-operate and don’t hold back on one another or try to gain at the expense of another. Any success in such lopsidedness will be increasingly short-lived. These are the synergetic rules that evolution is employing and trying to make clear to us. They are not man-made laws. They are the infinitely accommodative laws of the intellectual integrity governing universe.”