0

I'm running Firefox on Ubuntu 18.10 with a laptop that has a touchscreen. Apparently, Firefox needs to be told to support this by launching it with this command:

MOZ_USE_XINPUT2=1 /usr/bin/firefox

Now I normally launch firefox using the search key and then typing "firefox" followed by enter. How can I keep that process and have it launch with the xinput2 params I need?

vince
  • 88
  • 7
  • Possible duplicate of [How can I edit/create new launcher items in Unity by hand?](https://askubuntu.com/questions/13758/how-can-i-edit-create-new-launcher-items-in-unity-by-hand) – grooveplex Oct 31 '18 at 22:45
  • Since GNOME is used instead of Unity, suggest looking at https://askubuntu.com/questions/112186/how-do-you-create-a-custom-application-launcher-in-gnome-shell/920078 – K7AAY Nov 01 '18 at 15:47
  • Found a workaround for needing the custom launcher. The Arch Wiki has the details: https://wiki.archlinux.org/index.php/Firefox/Tweaks#Enable_touchscreen_gestures – vince Nov 08 '18 at 07:07

1 Answers1

0

You should first create your own new .desktop file by running

gedit ~/.local/share/applications/firefoxtouch.desktop

substitute gedit with any text editor you prefer

Now, put inside those file

    [Desktop Entry]
Name=Firefox Touch
Comment=
Exec=env MOZ_USE_XINPUT2=1 /usr/bin/firefox %u
Icon=firefox
Terminal=false
Categories=GNOME;GTK;Network;WebBrowser;
Type=Application
StartupNotify=true

and save. Now searching for Firefox should five you another entry for Firefox with custom parameter you need.

Kuribo Kutsu
  • 331
  • 4
  • 13
  • That works well, except searching now brings up both versions. Any way to consolidate so I only see one of them? – vince Nov 01 '18 at 00:49
  • If you have root access you can edit "system" one instead of creating your personal. "/usr/share/applications/firefox.desktop" is system one. However i advise you against doing that - on each version update you will have to reedit it again. Maybe giving it somehow unique name is option? – Kuribo Kutsu Nov 01 '18 at 00:55