Unfortunately, the Raspberry Pi 7 Touchscreen does not support right-click or long touch if used with Raspbian Jessie. You can add this functionality by using a two-finger touch on the Touchscreen with the program Twofing.
Contents
Install Twofing
-
You need a few programs in order to compile Twofing. In case one of those programs is already installed apt-get will automatically recognize this.
sudo apt-get update && sudo apt-get install build-essential libx11-dev libxtst-dev libxi-dev x11proto-randr-dev libxrandr-dev
-
Download Twofing.
wget http://plippo.de/dwl/twofing/twofing-0.1.2.tar.gz
-
Extract the downloaded file.
tar -xvzf twofing-0.1.2.tar.gz
-
Navigate to the folder that was created during the extraction.
cd twofing-0.1.2
-
Start the compilation and install Twofing
make && sudo make install
-
Optional
I used an original Raspberry Pi 7 Touchscreen with Raspberry Jessie and an error occured during the first start of Twofing.twofing, the two-fingered daemon Version 0.1.2.20120708 /dev/twofingtouch: No such file or directory
You can fix the error as following.
Open the 70-touchscreen-egalax.rules file with the nano text editor.sudo nano /etc/udev/rules.d/70-touchscreen-egalax.rules
Delete the complete content and add the following lines.
KERNEL=="event*",ATTRS{name}=="FT5406 memory based driver",SYMLINK+="twofingtouch",RUN+="/bin/chmod a+r /dev/twofingtouch"
Exit the text editor with CTRL+X and confirm the changes with Y
-
Restart the Raspberry Pi.
sudo reboot
-
Delete the obsolete folder of Twofing in the home folder.
rm ~/twofing-0.1.2
-
Start Twofing in debug mode and test with two fingers if the right-click works on the Touchscreen.
twofing --debug
You can exit the program with CTRL+C.
When running the command through SSH and not directly on the Raspberry Pi, the commandtwofing --debug
will not work. You must first set that Twofing uses the Touchscreen. Therefore, add the following commandexport DISPLAY=:0
and restart Twofing afterwards.
twofing --debug
In case you connected an additional monitor through HDMI you need to check the index number of the Touchscreen. You can get the index numbers of all connected monitors using
who
.
Source: http://raspberrypi.stackexchange.com/a/27881/14517
Twofing autostart
In order to not start Twofing after a restart manually you can add a autostart file.
-
Navigate to the autostart folder of your home folder.
cd ~/.config/autostart
-
Create a file with the name twofing.desktop and open it.
nano twofing.desktop
-
Add the following text to the file.
[Desktop Entry] Type=Application Name=Twofing Exec=twofing StartupNotify=false
Exit the text editor with CTRL+X and confirm the changes with Y