Choose style:

Author Topic: Add full touchscreen support to Peppermint 6 & 7  (Read 4617 times)

0 Members and 1 Guest are viewing this topic.

Offline Timo

  • Member
  • ***
  • Posts: 163
  • Karma: 37
  • Open Source is more than the sum of its bytes
    • View Profile
  • Peppermint version(s): PM7 Respin (64bit) & PM8 (64bit)
Add full touchscreen support to Peppermint 6 & 7
« on: March 09, 2016, 06:00:15 pm »
Hello,

here my short and easy tutorial on how to get proper touchscreen support in Peppermint 6 & 7 (P7 has touchscreen support, but without multitouch. If you want multitouch [like 2 fingers for right click] this tutorial will still work):

After this tutorial you will be able to control your windows manager with touch, even if it has no native touch-support and you can easily set up other touch-commands (for example right mouse click with 2 fingers).

You need "touchegg", a programme developed to add multitouch to windows managers. Then you need to get it to start on boot and to set it up the way you want.
According to Taskmanager it uses 27,8MB RAM and 208,7MB HDD

This Tutorial is for people who might use linux for the first time, so I will show two ways of doing it here. The first is just using the GUI (graphical user interface), that basically worḱs like in WindowsOS. The second is using Terminal/Bash (Bash is the language you're using in the terminal). You will end up with the same result.

GUI
1. Installing touchegg:
To install touchegg, start the software manager (menu -> software manager), search for "touchegg" (should be the first hit) and install it.

2. Starting touchegg on boot:
We want to make an entry in ~/.xprofile. Start the file manager (menu -> file manager) and right click, click "show hidden files" (or something like this, my OS isn't English)  If there is no .xprofile create a new file called .xprofile (right click -> create new document -> empty document). (If filenames start with . they are hidden by default.) Then open it and add this line:
Code: [Select]
touchegg &
save and exit

Now we have touchegg installed and it's starting on boot, so just reboot and touchegg will start and create it's config-file.

3. Set up your touch-commands
navigate to ~/.config/touchegg/touchegg.config
Open this and add the following lines:
Code: [Select]
<gesture type="DRAG" fingers="1" direction="ALL">
            <action type="DRAG_AND_DROP">BUTTON=1</action>
        </gesture>
(to move windows)
Code: [Select]
<gesture type="TAP" fingers="1" direction="">
            <action type="MOUSE_CLICK">BUTTON=1</action>
        </gesture>
(a tab with 1 finger is now a left mouse click -> programmes that don't recognize touch-commands like xfwm4 will recognize them now)

And find this:
Code: [Select]
<gesture type="DRAG" fingers="2" direction="ALL">
            <action type="SCROLL">SPEED=7:INVERTED=true</action>
        </gesture>
set inverted to true, if you want to scroll down wenn you're moving you're finger up

This will give you a basic set of touch-commands, however you can set this up like you want, it's pretty much self explanatory.


Terminal/Bash
1. Installing touchegg:
Code: [Select]
sudo apt-get install touchegg

2. Starting touchegg on boot:
We want to make an entry in ~/.xprofile. If there is no .xprofile create it with
Code: [Select]
touch .xprofile
then open it with a texteditor, for example:
Code: [Select]
gedit .xprofile
and add this line:
Code: [Select]
touchegg &
save and exit

Now we have touchegg installed and it's starting on boot, so just reboot and touchegg will start and create it's config-file.

3. Set up your touch-commands
navigate to ~/.config/touchegg/touchegg.config
Open this with a texteditor and add the following lines:
Code: [Select]
<gesture type="DRAG" fingers="1" direction="ALL">
            <action type="DRAG_AND_DROP">BUTTON=1</action>
        </gesture>
(to move windows)
Code: [Select]
<gesture type="TAP" fingers="1" direction="">
            <action type="MOUSE_CLICK">BUTTON=1</action>
        </gesture>
(a tab with 1 finger is now a left mouse click -> programmes that don't recognize touch-commands like xfwm4 will recognize them now)

And find this:
Code: [Select]
<gesture type="DRAG" fingers="2" direction="ALL">
            <action type="SCROLL">SPEED=7:INVERTED=true</action>
        </gesture>
set inverted to true, if you want to scroll down wenn you're moving you're finger up

This will give you a basic set of touch-commands, however you can set this up like you want, it's pretty much self explanatory.




I found this in the ArchWiki and added the left mouse click, to get it to work with xfwm4.

I hope this helps someone. If you have mistakes, ways that would be easier or any suggestions feel free to write them, I'm new to Linux and English isn't my native language, so there might be some mistakes.
« Last Edit: July 24, 2016, 09:39:38 am by Timo »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25684
  • Karma: 2819
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Add full touchscreen-support to Peppermint 6
« Reply #1 on: March 09, 2016, 06:34:03 pm »
That's a terrific tutorial there Timo .. nicely done, and thanks :)

Might have been better to have used the default GUI text editor though, so
Code: [Select]
gedit .xprofile
instead of
Code: [Select]
nano .xprofile
but each to their own :)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline scifidude79

  • Global Moderator
  • Hero
  • *****
  • Posts: 4029
  • Karma: 863
    • View Profile
  • Peppermint version(s): Peppermint 9
Re: Add full touchscreen-support to Peppermint 6
« Reply #2 on: March 10, 2016, 01:13:51 am »
Nice tutorial.  It will come in handy for people who need that function.  :)

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4808
  • Karma: 1013
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 8 Respin-2 (64-bit)
Re: Add full touchscreen-support to Peppermint 6
« Reply #3 on: March 10, 2016, 02:53:59 am »
Thanks Timo, future touchscreen users are going to find this very useful  8).  The only edit I would make is as PCNetSpec has already mentioned, the use of nano over the default graphical text editor gedit.  Most new users will find nano a little alien and rather intimidating.  The end results are the same.  I use nano for small, quick edits of a line or two.  I find it really useful for doing things like that.  Anything else, I find gedit more convenient.  The use of the ArchWiki is rubbing off on you  :D.  It's very impressive you're using it.  Have you tried the command line editor vim yet?  I've tried to learn it several times.  I personally hate it, but most command line jockeys and especially server engineers swear by it.  It's universal to every distro too  ;).
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline Timo

  • Member
  • ***
  • Posts: 163
  • Karma: 37
  • Open Source is more than the sum of its bytes
    • View Profile
  • Peppermint version(s): PM7 Respin (64bit) & PM8 (64bit)
Re: Add full touchscreen-support to Peppermint 6
« Reply #4 on: March 10, 2016, 04:10:01 pm »
I changed nano to gedit and added a second way, without using the terminal at all. Thats for people coming from windows, who aren't interested in Linux to much and just want a working OS. (And to show that you don't need to use the terminal, because a common bias seems to be that you need to work with the terminal, if you're using Linux.)

The ArchWiki is just awesome :D  (In Germany every mechanic has a "Tabellenbuch Metall" and every electrician has a "Tabellenbuch Elektrotechnik", which contains probably everything most of them will ever need and ArchWiki semms to be the Tabellenbuch Linux^^)

I will look at vim, but first I have to go through you're SSD-links, thanks for all those references...

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4808
  • Karma: 1013
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 8 Respin-2 (64-bit)
Re: Add full touchscreen-support to Peppermint 6
« Reply #5 on: March 10, 2016, 05:16:36 pm »
Hi Timo, thank you so much for making your GUI amendment.  That was an awesome thing to do.  You're going to make a lot of people feel very comfortable.  I know what you mean about the ArkWiki, anything you want to know about Linux is in that Wiki  ;).  The SSD tweaks will really improve the performance and the longevity of your device.  Have fun, with vim - if that is at all possible  ;)!
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25684
  • Karma: 2819
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Add full touchscreen-support to Peppermint 6
« Reply #6 on: March 10, 2016, 05:22:29 pm »
Seriously I don't think people should be afraid of the command line, and don't take this the wrong way but I'm not that bothered if CLI help on a forum gives people the false impression that's the only way it can be done .. this is a support forum and IMHO command line instructions are better for a number of reasons:-

a) Providing help on a forum it's MUCH easier to type up command line instructions, and MUCH easier for the person getting the help to give a concise response via copy/pasting the terminal output.
(it also leaves little room for misunderstanding)

Try typing full GUI instructions to simply copy a file from one place to another .. it's going to take a paragraph compared to:
Code: [Select]
cp /file/to/be/copied /place/to/put/it/
b) Command line instruction leave no room for "interpretation" being MUCH more concise .. "go into your menus and click the  media player icon" is not as clear as .. run:
Code: [Select]
vlc
for all I know he has more than one media player, or doesn't understand what I mean by "menu" or which submenu .. or even what "go to" means for that matter.

c) GUI applications give little in the way of feedback .. a misbehaving app started via the GUI is more likely to fail silently, whereas attempting to run it from the command line nearly always returns useful information on *where/why* it failed, this output is generally invaluable in troubleshooting..

d) When the user makes a mistake with your instructions, it's easier to see precisely where they went wrong with CLI output .. whereas when you give a string of GUI instructions, they could have gone wrong anywhere along the line and you'll likely not be able to pinpoint precisely where, specially(but not only) where there's a language barrier.
(believe me I've been there .. a LOT ;))

e) And most importantly of all - Command line instruction can be copy/pasted into the terminal, and the output copy/pasted back to the forum .. eliminating all room for misunderstandings to arise, and generally just making things easier for everyone.
(try copy/pasting 'point and click' assistance)

My point is, use the best tool for the job .. where the command line is the best tool why use an often inferior GUI front end that makes things unnecessarily more difficult ?

That said, I have no objections to GUI instructions .. I just think they confuse matters when mixed with CLI instructions .. okay that may say more about my inadequacies  than others :)



@Timo

Please don't think I'm knocking your tutorial (which is absolutely fantastic by the way) .. I just hear the CLI comment a lot so wanted to take this opportunity to press home 'why' CLI instructions are seen a lot in Linux forums .. it's not because they are the only way to do things, it's because they're simply the best method on a forum which is after all TEXT based .. if that leaves the occasional person (who hasn't taken the time to do their homework) with the mistaken impression Linux is all about the CLI when they're obviously staring at a GUI desktop , so be it :)

In short...

When TYPING instructions, I think the CLI is nearly always the best way to go.

when SHOWING someone how to do something, I think the GUI is generally the best way to go.
« Last Edit: March 10, 2016, 08:20:29 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Timo

  • Member
  • ***
  • Posts: 163
  • Karma: 37
  • Open Source is more than the sum of its bytes
    • View Profile
  • Peppermint version(s): PM7 Respin (64bit) & PM8 (64bit)
Re: Add full touchscreen-support to Peppermint 6
« Reply #7 on: March 11, 2016, 02:31:15 am »
I'm with you there ;)

However I thought (and still think) the GUI fits here as well.
You will encounter this issue from the first minute on, if you're using a touchscreen. And the OS is appealing for touchscreen devices like convertibles or even pure tablets, because they have often rather slow hardware and SSB is very nice for them, too. And they will find everything they need in the software manager, except for proper touchscreen-support. So they might not even be interested in the technical things so much.

I'm trying to do things CLI-only, I want to learn it, because I like the tweakabilty of Linux and I will need it anyways. For people searching for a lighweight distro to make their (touchscreen-)device run better CLI is probably not necessary.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25684
  • Karma: 2819
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Add full touchscreen-support to Peppermint 6
« Reply #8 on: March 11, 2016, 08:46:24 am »
I changed nano to gedit and added a second way, without using the terminal at all. Thats for people coming from windows, who aren't interested in Linux to much and just want a working OS. (And to show that you don't need to use the terminal, because a common bias seems to be that you need to work with the terminal, if you're using Linux.

It was purely that comment that set me off (and I know it's not YOUR belief) .. I'm just so tired of refuting that belief that it's unreal, in fact I don't even think the belief exists much outside a small but vocal group of Anti-Linux Windows fans that try to perpetuate it for political reasons .. heck go to Microsoft Help and you'll often see registry edits and CMD commands (and more recently powershell commands), but nobody's under the impression that using Windows is all about the registry/cmd/powershell  ???
« Last Edit: March 11, 2016, 08:49:23 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Timo

  • Member
  • ***
  • Posts: 163
  • Karma: 37
  • Open Source is more than the sum of its bytes
    • View Profile
  • Peppermint version(s): PM7 Respin (64bit) & PM8 (64bit)
Re: Add full touchscreen-support to Peppermint 6
« Reply #9 on: March 11, 2016, 03:09:23 pm »
Got that belief in the real-life, told someone I've installed Linux and got asked if I want to be a hacker or why I'm doing this to myself. Tried to explain that Linux isn't stuck in the 90s, but I didn't succeed :(. In the end "Everybody uses Windows, look what PCs can do today" defeated my arguments. I gave up at that point :-X.

That's probably the Dunning-Kruger effect here.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25684
  • Karma: 2819
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Add full touchscreen-support to Peppermint 6
« Reply #10 on: March 11, 2016, 03:35:32 pm »
This would have crippled me with laughter

"Everybody uses Windows, look what PCs can do today"

on so many levels :))
« Last Edit: March 11, 2016, 03:37:48 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4808
  • Karma: 1013
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 8 Respin-2 (64-bit)
Re: Add full touchscreen-support to Peppermint 6
« Reply #11 on: March 11, 2016, 03:46:35 pm »
Got that belief in the real-life, told someone I've installed Linux and got asked if I want to be a hacker or why I'm doing this to myself. Tried to explain that Linux isn't stuck in the 90s, but I didn't succeed :(. In the end "Everybody uses Windows, look what PCs can do today" defeated my arguments. I gave up at that point :-X.

That's probably the Dunning-Kruger effect here.
They haven't defeated your argument.  The most important thing a Windows computer can do really well and Linux ones struggle with, is catching viruses  ;D.  Most Windows users just don't understand how technically superior and elegant Linux is in comparison to their clunky insecure spyware, that's broken out of the box.  You then have to pay M$ to use it and someone else to make it safe to use.   That's sounds like a system a mug would use.  There's really no comparison to be made.  Windows and Mac converts already know this  ;).  Use your Peppermint machine for a month and then try and use a Windows machine.  Most people find it really awkward to use.
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline mracz

  • Jr. Member
  • **
  • Posts: 61
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 7
Re: Add full touchscreen-support to Peppermint 6
« Reply #12 on: July 24, 2016, 02:54:56 am »
Anybody here with working experience on Peppermint 7 for touchscreen?

Tapatalkkal küldve az én ASUS_T00N eszközömről


Offline Timo

  • Member
  • ***
  • Posts: 163
  • Karma: 37
  • Open Source is more than the sum of its bytes
    • View Profile
  • Peppermint version(s): PM7 Respin (64bit) & PM8 (64bit)
Re: Add full touchscreen-support to Peppermint 6
« Reply #13 on: July 24, 2016, 09:33:50 am »
P7 has touchscreen support, but no multitouch. If you want multitouch (like 2 fingers for right click) this tutorial will still work.

Offline tppthpthp

  • Jr. Member
  • **
  • Posts: 28
  • Karma: 3
  • New Forum User
    • View Profile
  • Peppermint version(s): 6 & 7
Re: Add full touchscreen support to Peppermint 6 & 7
« Reply #14 on: July 27, 2016, 02:35:05 pm »
Just sent my wife a text telling her that I need to look into getting a touchscreen monitor...........

Her reply: "You've been reading that linux forum again, eh?"

As for the "everybody uses windows" argument, I converted my mothers laptop some time ago to Peppermint 6 after the win10 update rendered it useless.
She's 80 and her comments were to the effect that it was easier to use than windows. She even understands the update manager and checks for the ! in the icon.
Keep in mind, the bulk of her usage is cruising the web, paying bills and checking her bank accounts. Oh, And she prefers Firefox to IE any day (her words)

And I'll be updating my wifes machine from Ubuntu Mate to Peppermint 7 this weekend.
Excellent tutorial. Can't wait to give it a try.
tppthpthp aka: "bob"