Touchpad Gestures in Linux Mint and Ubuntu

So I know I have done a post earlier on using touchegg for 3 finger gestures.

But, there were far too many issues with that. Specifically, that I needed to set things in .xprofile, and for me, the gestures would become functional only if I had Suspended the desktop once after booting, and reran the script to disable 2 finger and 3 fingers in synclient, and then ran touchegg, which is basically a horrible experience.

There’s a better way, by switching to libinput from synaptics, which is a newer driver with input multitouch detection for touchpads.

sudo apt-get remove --purge xserver-xorg-input-synaptics
sudo apt-get install xserver-xorg-input-libinput
sudo gpasswd -a $USER input

Restart your laptop.

Ideally at this point, your default synaptics drivers have been removed, and the libinput drivers will take over.
You can check that by running

xinput list
xinput list-props \<device-id-of-touchpad-from-above\>

Once you’ve confirmed you’re running libinput, run the following commands :

sudo apt-get install xdotool wmctrl
sudo apt-get install libinput-tools
git clone
cd libinput-gestures
sudo ./libinput-gestures-setup install

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.

Here’s a more detailed howto to refer:

Here are the gestures from the file I use, to get you running quicker.

gesture swipe left 3 _internal ws_up
gesture swipe right 3 _internal ws_down
gesture swipe left 2 xdotool key alt+Right
gesture swipe right 2 xdotool key alt+Left
gesture swipe up 3 xdotool key shift+alt+Down
gesture swipe down 3 xdotool key super+d
gesture swipe up 4 xdotool key shift+alt+Up
gesture swipe down 4 xdotool key alt+F4

Invert Fn Function Key Behaviour in Linux

Hey all,

Here’s a small tip that I thought should be documented.

If your fn key is behaving opposite to the way you want it to, there are likely 2 causes:

  1. Either your bios setting is the opposite of what you want
  2. Or your linux is interpreting differently.

Here are a few solutions :

  1. Try pressing fn + NumLock key
  2. Try pressing fn + ~ key (it’s the one before a 1 on most US keyboards)
  3. Press fn + Esc Key (Or look for a key with a lock sign on it)
  4. Go to the bios and look for the function key option to change it.

2 worked for me on linux!


Linux : Access Mounted Drive from Media Servers

So for the longest time, I had been annoyed, because I could just not get plex media server to access all the songs, or videos on my partitioned hard drive, which I had configured to mount at boot time.

I went deep with it, trying to figure out if there was any way to change the default umask for mounting drives so that I could give any system process the permission to read contents from the drive.

And finally the solution:

Mount your drive at /mnt instead of /media. The instructions on how to mount your drive are here.The only difference will be to use this line in the fstab entry.

 UUID=<previously-copied-uuid> /mnt/<mydiskname> ntfs defaults 0 0 

doing this allowed my drive to be accessed by the plex media server, since the system treated it not as an external removable drive with limited permissions.

Run Wireshark (not) as Root

We all know, that capturing packets on any interface requires root access.(ok maybe not all, but it’s true) But wireshark is too large and complex a program to be given root permissions. (Do keep this in mind, programs with more than 20,000 lines of code are a risk in sudo).

Luckily for us, the portion of Wireshark that does packet capturing is a much smaller program, which can easily be allowed some capabilities. So we just set some obscure variable names from the kernel  into this thing, and voila, it works.

Here’s the best way to make it work.

sudo apt-get install libcap2-bin
sudo groupadd -g wireshark
sudo usermod -a -G wireshark &lt;Insert-Your-Username-Here&gt;
sudo chmod 750 /usr/bin/dumpcap
sudo setcap cap_net_raw,cap_net_admin=eip /usr/bin/dumpcap

Thank this guy (he has a better explanation too)

Install Whatsapp on Ubuntu 12.04, 12.10, 13.04, 13.10, 14.04, Mint 13/14/15/16/17

While I would recommend you to simply go for Viber instead, because it’s available for all operating systems; Here’s how to do it for whatsapp. However, if the same number is registered to two devices, Whatsapp doesn’t like you accessing both simultaneously. I’ve read, one at a time works fine.

sudo apt-get install python python-dateutil python-argparse
sudo wget
sudo unzip
cd yowsup-master/src
cp config.example yowsup-cli.config
vi yowsup-cli.config #(Write the following according to you)
#phone=34123456789 #(Phone number with country code)
chmod +x yowsup-cli
./yowsup-cli --requestcode sms --config yowsup-cli.config
#status: sent
#retry_after: 3605
#length: 6
#method: sms

You will receive an sms with a code on the above written mobile number. Use that in the next request.

./yowsup-cli --register 123-456 --config yowsup-cli.config (replace 123-456 with the code)
#status: ok
#kind: free
#pw: S1nBGCvZhb6TBQrbm2sQCfSLkXM=
#price: 0,89
#price_expiration: 1362803446
#currency: EUR
#cost: 0.89
#expiration: 1391344106
#login: 34123456789
#type: new
cat yowsup-cli.config

If you don’t have pidgin, install it (From software center or by sudo apt-get install pidgin in terminal) Now open a terminal and write

sudo add-apt-repository ppa:whatsapp-purple/ppa
sudo apt-get update
sudo apt-get install pidgin-whatsapp

Now simply launch Pidgin. Add a whatsapp account, put username as the phone number with country code ( as written above) and password as the string we obtained earlier. Use whatsapp on your laptop. (PS- Don’t use it simultaneously on your mobile) Better still, use viber, and ask your friends to do the same! : it has a desktop client. Credits for this :

Edit : If you’re having trouble registering the number on whatsapp, you can use this service here.

Update : The latest update to whatsapp has broken the functioning of the yow-sup api used here.
The issues have been created and developers are working on it. Hopefully it will be sorted soon, but till then, all we can do is wait.