Tag Archives: linux

Touchpad gestures in Linux KDE with Libinput-gestures

This post is based on my Dell M3800 with Linux Neon.

KDE already does a good job with touchpad gestures (e.g., two fingers for scrolling, 3 finger tap for pasting, etc.) but it does not support 3 finger swype gestures like in MacOs, e.g., for displaying all the windows or for showing the desktop.

Today I tried this utility, Libinput-gestures, which works like magic! The utility comes with good default for typical gestures (including pinch) but I configured that to fit my needs (in particular, I wanted to mimic MacOs behavior for 3 finger swypes: up = display all windows, down = display all windows of the same class and for pinch out = show desktop.

The installation of Linput-gestures is really easy (just follow the instructions at its web page).

Remember that, first of all, your user must be in the input group, so first run

Then logout from your current session, and login again.

Then, in Ubuntu, it’s just a matter of running

and install the software like this (you need git):

You can already start the program like this

and if you want it to be started at login time, then run

The default gestures are in /etc/libinput-gestures.conf. If you want to create your own custom gestures then copy that file to ~/.config/libinput-gestures.conf and edit it.

These are the lines I changed in my configuration (remember that each time you modify the configuration you need to restart libinput-gestures, i.e., instead of start in the command line above, just use restart):

You only need to know the keyboard shortcuts of the actions you want to associate to mouse gestures. With that respect, you might want to have a look at the current shortcuts in KDE Settings (the interesting components are “KWin” and “Plasma”):

This is a video demoing the gestures:

Happy gestures! 🙂

Be Sociable, Share!

Flickering for Intel graphic card in Linux 4.2

After I upgraded my Dell Precision m3800 to the new Kubuntu Wily 15.10 I had a very bad surprise: the screen was continuously flickering in a way that it was unusable. This happens only if you are NOT using the default highest resolution 3200×1800 which, at least for me, is really too small.

I thought it was a problem with the new Plasma, but the culprit is the Intel i915 driver in the 4.2 kernel which comes with the new version of (K)ubuntu, as reported in this bug: https://bugs.freedesktop.org/show_bug.cgi?id=91393. In particular, two commits seem to be the cause, and reverting them fixes the problem (hopefully the whole bug will be fixed).

I’m detailing the procedure to get the kernel sources, reverting the two commits, and compile your own fixed kernel:

  • You need git to revert the patches (though you’re not getting the kernel sources from the git repository), so you need to install that if it’s not already installed.
  • Install the kernel sources for your current kernel:
    apt-get source linux-image-$(uname -r)
    this will unpack the kernel sources in the current directory (you don’t need to use sudo for this; if you use sudo, you may want to change the owner of the sources’ directory to match your user, so that you won’t need to compile the kernel as root)
  • Install required packages to compile the kernel
    sudo apt-get build-dep linux-image-$(uname -r)
  • Install other required packages (needed when you install your compiled kernel later):
    sudo apt-get install linux-cloud-tools-common linux-tools-common
  • Save the above mentioned two commits into two local files, in the following order (e.g., name them patch1.txt and patch2.txt):
  • Enter in the directory where the kernel sources have been unpacked and revert the two commits in the reversed order:
    git apply -R patch2.txt
    git apply -R patch1.txt
  • Run the following commands in the kernel sources directory as described here:
    chmod a+x debian/scripts/*
    chmod a+x debian/scripts/misc/*
    fakeroot debian/rules clean
  • “In order to make your kernel “newer” than the stock Ubuntu kernel from which you are based you should add a local version modifier. Add something like “+test1″ to the end of the first version number in the debian.master/changelog file, before building. This will help identify your kernel when running as it also appears in uname -a.”
  • Compile the kernel (this will take some time, and require some free space on your hard disk):
    fakeroot debian/rules binary-headers binary-generic
  • This will create in the end some .deb files in the parent folder; install them all with dpkg, e.g., with
    sudo dpkg -i linux*4.2*.deb
  • reboot and enjoy your Linux without flickering 🙂
Be Sociable, Share!

Installing Linux Kubuntu on a Dell Precision M3800

Dell-m3800I recently had to install Linux Kubuntu 13.10 Saucy Salamander (at the time of writing I’ve already upgraded it to 14.04 Trusty Tahr) on a Dell Precision M3800 (a really cool and powerful laptop, see the details here).

The installation went really smooth, and I’m enjoying a very fast and stable Linux OS on this laptop.

In this blog post I’ll detail only a few tips and further tweaks after the installation.

As for the initial setup (Hard disk resize, Backup and UEFI Boot issues) I followed this really nice detailed guide, http://www.everydaylinuxuser.com/2013/09/install-ubuntu-linux-alongside-windows.html, and I strongly suggest to do the same, especially if you have the same laptop.

Tweaks after installation

Here some tweaks after the installation.

Adjust Screen Resolution

This laptop comes with the “crazy” resolution of 3200×1800! Unfortunately, this is barely usable at least in my experience: everything is so small that I can’t read almost anything… adjusting the DPI as suggested here really did not help: the fonts, window border become readable and usable, but the system looks ugly… (by the way, the same problem holds in Windows 8, at least for my everyday program, i.e., Eclipse: most fonts and icons are not readable)… until these resolution problems are fixed in Kubuntu (and in some applications as Eclipse), I reverted the resolution to something smaller (and still the resolution is high :), that is 1920×1080.


Enable Hibernate

First check that hibernate actually works by running (remember that your swap partition is at least as large as your available RAM):

After you computer turns off, try and switch it back on. If your open applications re-open you can re-enable hibernate: run below command to edit the config file:

Copy and paste below lines into the file and save it.

Enable Scheduled Trim

First of all, make sure you enable the anotime option for your SSD partition in /etc/fstab to avoid further writings to your SSD disk.

As reported here, http://askubuntu.com/questions/18903/how-to-enable-trim/, scheduled trim seems to be the preferred way to keep your SSD performant.

Run the following command to create and edit the file in cron.daily

And copy and paste this:

Then make the file executable:

Power optimizations

To keep power consumption low, install the following tools

then TLP:

Also run powertop when you’re on battery to check for further optimizations.

Install Bumblebee, as detailed here: https://wiki.ubuntu.com/Bumblebee.

The problem with Fn keys

At first, I thought that Function keys were not working at all… then I discovered that on new laptops like this one F-keys are default to their media mode (!). You can change the default behavior of the F keys in the BIOS, but I prefer the F-Lock icon on the Esc button: this will take them back to their standard behavior.

Be Sociable, Share!

Install Adobe Reader in Ubuntu 12.10 Quantal Quetzal 64bit

Acrobat Reader used to be available from Ubuntu Partner repository, but it is not available anymore in Ubuntu 12.10 Quantal Quetzal!

So you have to download the .deb package from adobe.com and install it:


However, if you have a 64bit system, do not forget to install also these packages:

Otherwise, acroread will fail

acroread: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory

Be Sociable, Share!

Accessing your remote Ubuntu machine with VNC and ssh

If you want to access your remote Ubuntu machine with VNC, in particular by tunnelling through ssh, there is already some documentation which can be found here. However, at least for me, the procedure explained there does not work out of the box. So here’s what I had to do to make it work.

First of all you need to install in the machines the following packages:

  • remote machine: xvfb x11vnc openssh-server
  • local machine: xtightvncviewer openssh-client

Then, the script to run on your client machine to access the server has to be slightly modified as follows

where you will have to replace USER with your user on the remote machine, and REMOTEIP with the address of your remote machine.

Basically, the changes I had to make to the original script were to add the -auth command line option specifying the path to the .Xauthority, and the command line option -create to actually start an instance of the X server on the remote machine.

Be Sociable, Share!