Flash Player y GNU/Linux – Instalación – Presente y Futuro

Para cuando se necesita acceder a contenido de sitios que aún utilizan Adobe Flash, desde GNU/Linux. ¿Pero, de dónde viene la necesidad, cuando ya existen APIsen que permiten cubrir las funcionalidades antes sólo suministradas por los plugins?

Soporte Flash bajo GNU/Linux


Revisiones:

2017/06/23, 2017/06/24, 2017/11/09, 2017/12/02, 2018/01/10, 2018/01/13

Para cuando se necesita acceder a contenido de sitios que aún utilizan
Adobe Flash, desde GNU/Linux.
¿Pero, de dónde viene la necesidad, cuando ya existen APIs en que permiten
cubrir las funcionalidades antes sólo suministradas por los plugins?

Se intenta responder a esta pregunta, y de paso, cómo hacer funcionar
Flash bajo GNU/Linux, sea uno de usar Chromium (derivado de Google Chrome,
Open Source) o de Firefox (derivado de mozilla.org… y resulta que también
Google).

Se pasa a organizar la información de lo más práctico a lo más teórico…

4. Sitios de prueba de Flash plugin

2017/06/24

– Referencias:

www.codegeek.net/services/resources/flash-player-test-page/

Which Flash Player Version Do You Have Installed?
Javascript is enabled in your browser.
You have Flash player 26.0.0 installed.

2018/01/12
Which Flash Player Version Do You Have Installed?

Javascript is enabled in your browser.
You have Flash player 28.0.0 installed.

4.1 Sitios que utilizan Flash como plataforma

– Aunque parezca mentira, todavía hay plataformas de enseñanza que suministran
no sólo video, sino todo el motor de aula virtual, en Flash…

Ejemplo: Educación a distancia de UTN

www.adistancia.frba.utn.edu.ar/documentos/Tutorial/inicio.html
Ok

-> Animación que muestra uso de cada función del sitio.
www.adistancia.frba.utn.edu.ar/login/index.php

3. NPAPI Flash Plugin – Uso bajo Firefox con Netscape API

3.1 Instalación de Firefox


https://www.mozilla.org/en-US/firefox/new/?utm_medium=referral&utm_source=firefox-com

Linux 32 bits -> firefox-57.0.4.tar.bz2

Se descomprime y se mueve a $HOME:
$ tar xjf firefox-57.0.4.tar.bz2
$ mv firefox ~/

Se agrega a $PATH (desde .bashrc)

3.2 Instalación de Flash plugin

Primero, tener en cuenta que la última versión de Firefox en soportar
los plugins NPAPI es la 52 ESR

https://support.mozilla.org/en-US/kb/npapi-plugins?as=u&utm_source=inproduct

https://support.mozilla.org/en-US/questions/1030381

Extraer flash_player_28_npapi_linux.i386.tar.gz a /tmp/flashplayer u
otro directorio temporario.

Copiar libflashplayer.so a:
$HOME/.mozilla/plugins/

System Wide:
32 bits: /usr/lib/firefox/browser/plugins/

64 bits: /usr/lib64/firefox/browser/plugins/

Probando con el directorio en .mozilla, al REINICIAR Firefox, y
cargar en una pestaña nueva “about:plugins”, se observa:


Shockwave Flash

    File: libflashplayer.so
    Path: /home/dafo/.mozilla/plugins/libflashplayer.so
    Version: 28.0.0.137
    State: Enabled
    Shockwave Flash 28.0 r0

application/x-shockwave-flash	Shockwave Flash	swf
application/futuresplash	FutureSplash Player	spl

Ok

2. PPAPI flash plugin – Pepper based plugin

Referencias:

https://wiki.debian.org/PepperFlashPlayer

“This is the homepage of pepperflashplugin-nonfree, a Debian package for
installing Pepper Flash Player, like FlashPlayer is the homepage of the
flashplugin-nonfree package.”

“Pepper Flash Player is maintained by Google, and is newer than Adobe Flash
Player.”
– Adobe currently still provides security fixes for Adobe Flash Player.
– Google provides newer features in Pepper Flash Player.
– Pepper Flash Player can currently only be used with Chromium
(and with Chrome).

2.1. Instalación de Chromium y Flash bajo GNU Kali Linux

- # apt-get install chromium

  Configurando chromium (59.0.3071.104-1) ...
  update-alternatives: utilizando /usr/bin/chromium para proveer
  /usr/bin/x-www-browser (x-www-browser) en modo automático
  update-alternatives: utilizando /usr/bin/chromium para proveer
  /usr/bin/gnome-www-browser (gnome-www-browser) en modo automático

  Procesando disparadores para libc-bin (2.23-4) ...

- $ dpkg -l | grep chromium
  ii  chromium           60.0.3112.78-1   i386  web browser
  ii  chromium-common    0.0.3112.78-1    i386  web browser - common resources

El plugin de Flash no es parte de la versión GPL del navegador, por lo que debe descargarse del sitio de Adobe.


– Otros detalles de la distribución:

  Es una GTK+ app
  $ ldd $(which chromium)
  no es un ejecutable dinámico

  /usr/bin/chromium es un script "helper" para inicio de la aplicación.

La aplicación se encuentra en ruta /usr/lib/chromium/chromium

  $ ldd /usr/lib/chromium/chromium | grep -i gtk
  libgtk-x11-2.0.so.0 => /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0


– Perfil de usuario en:

  /home/dafo/.config/chromium

– Iniciando con perfil temporario (en caso de corrupción de perfil de
usuario):

  $ chromium --temp-profile


– Verificando versión:

  $ chromium --version
  Chromium 59.0.3071.104 built on Debian 9.0,
  running on Debian Kali Linux Rolling


– Opciones de línea de comandos:

  $ chrome --help

Soporta iniciar página web en modo “aplicación”, sin ninguna barra
de herramientas.
Ver opción “–app=URL”.

2.1.1. Instalación de extensiones de Chromium


– Referencias:


www.ghacks.net/2017/01/29/google-removes-plugin-controls-from-chrome/

“Google made a change in Chrome 57 that removes options from the browser to manage plugins such as Google Widevine, Adobe Flash, or the Chrome PDF Viewer.”


– Users may overcome this by enabling this flag:

    chrome://flags/#prefer-html-over-flash

– All other plugins (NaCL and WideVine) are considered integral part of the browser and can not be disabled.

+ Cargar URL: chrome://extensions/
(o también: Settings -> More tools -> Extensions)


Preinstalados:

– Bookmark manager
– Chromium PDF Viewer
– CryptoTokenExtension

– Agregar extensiones para manejar estado de plugin Flash
https://chrome.google.com/webstore/category/extensions?hl=en-US

– “Flashcontrol”

2.1.2. Activación de Flash Player Pepper-API en GNU


Referencias:

  - https://askubuntu.com/questions/578175/pepper-flash-plugin-is-installed-but-doesnt-work-on-chromium

  - Download Google Chrome and extract libpepflashplayer.so from
    /opt/google/chrome/PepperFlash in the Chrome deb file

  - Copy libpepflashplayer.so to /usr/lib/chromium-browser/plugins

  - Make the necessary changes to the Chromium startup
    sudo gedit /etc/chromium-browser/default

    Add this to the CHROMIUM_FLAGS
    CHROMIUM_FLAGS="--ppapi-flash-path=/usr/lib/chromium-browser/plugins/libpepflashplayer.so --ppapi-flash-version=11.5.31.2"

    You can get the correct version of the flash plugin from the "version":
    json tag in the manifest.json from /opt/google/chrome/PepperFlash in the
    Chrome deb file.

2.1.3 Descargando plugin oficial de Adobe (PPAPI)


https://get.adobe.com/flashplayer/

- Version 26.0.0.131
  - System requirements
    Linux 32-bit, English, Chrome


– Descargar versión en formato “tar.gz”


– Verificando contenido:

  $ tar tzf flash_player_ppapi_linux.i386.tar.gz
  libpepflashplayer.so
  manifest.json
  readme.txt
  license.pdf
  LGPL/
  LGPL/LGPL.txt
  LGPL/notice.txt

  $ file libpepflashplayer.so
  libpepflashplayer.so:
  ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV),
  dynamically linked,
  BuildID[sha1]=61cd86db71d155fe5b5ed177f438cc3437677188, stripped

– Las instrucciones de instalación indicadas en el sitio de Adobe no son
correctas.
“Unpack the plugin tar.gz and copy all the files to
/usr/lib/adobe-flashplugin/”

– Usar directorio indicado por referencia de Ubuntu:
“/usr/lib/chromium-browser/plugins”

– Para editar correctamente las opciones de arranque en
“/etc/chromium-browser/default”, variable “CHROMIUM_FLAGS”, verificar
“manifest.json”, parte de distribución descargada desde Adobe,
tag “version”


En este caso:

  "description": "Pepper Flash Player",
  "name": "Flapper",
  "version": "26.0.0.131",
  "x-flapper-revision": "YPAFP",
  "x-ppapi-arch": "ia32",
  "x-ppapi-os": "linux",

  /etc/chromium.d/default-flags

  # Configuración de plugin flash, Adobe, PPAPI (interfaz pepper):
  export CHROMIUM_FLAGS="$CHROMIUM_FLAGS \
  --ppapi-flash-path=/usr/lib/chromium/plugins/libpepflashplayer.so \
  --ppapi-flash-version=26.0.0.131"

2.1.4 Conexiones activadas en transfondo por plugin de Flash bajo Chromium

Resulta importante verificar conexiones iniciadas por navegador cuando
no posee ningún documento cargado:


– Cargando sitio de prueba de flash:

  Active Internet connections (w/o servers)
  Proto Recv-Q Send-Q Local Address        Foreign Address         State
  tcp     0      0 kali-dafo:53614         ec2-107-21-1-61.c:https ESTABLISHED
  tcp     0      0 kali-dafo:43416         ec2-52-77-181-198:https ESTABLISHED
  tcp     0      0 kali-dafo:43420         ec2-52-77-181-198:https TIME_WAIT
  tcp     0      0 kali-dafo:53606         ec2-107-21-1-61.c:https ESTABLISHED
  tcp     0      0 kali-dafo:38238         63.96.196.104.bc.:https ESTABLISHED
  tcp6    0      0 kali-dafo:46572         2800:3f0:4002:804:https ESTABLISHED
  tcp6    0      0 kali-dafo:44360         2800:3f0:4002:804:https ESTABLISHED
  tcp6    0      0 kali-dafo:35876         2800:3f0:4002:804:https ESTABLISHED
  tcp6    0      0 kali-dafo:47606         2800:3f0:4002:806:https ESTABLISHED
  tcp6    0      0 kali-dafo:35828         2800:3f0:4002:804:https ESTABLISHED
  tcp6    0      0 kali-dafo:37026         2800:3f0:4002:806:https TIME_WAIT


– Luego de finalizada carga:

Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp6 0 0 2800:af0:1408:10d:35828 2800:3f0:4002:804:::443 ESTABLISHED


– Para verificar direcciones IPv6, se necesitan DNS IPv6

Actualmente, los DNS de sistemas:

  $ cat /etc/resolv.conf
  ...............................................
  # Resolución DNS
  #
  # Generated by NetworkManager
  # search hitronhub.home
  # nameserver 192.168.0.1
  # nameserver 2800:af0:1408:31f::1

  nameserver 8.8.8.8
  nameserver 8.8.4.4

  # Hitron CPE - ISP DNS, lado WAN
  nameserver 190.105.0.2
  nameserver 190.105.0.3


– Agregando DNS IPv6:

https://developers.google.com/speed/public-dns/docs/using

“When you use Google Public DNS, you are changing your DNS “switchboard”
operator from your ISP to Google Public DNS.”



The Google Public DNS IPv6 addresses are as follows:

  2001:4860:4860::8888
  2001:4860:4860::8844

Sin notación “::” -> reemplaza grupos contínuos de “0”s hexadecimal.

  2001:4860:4860:0:0:0:0:8888
  2001:4860:4860:0:0:0:0:8844

  2800:3f0:4002:807
  7 grupos de 4 dígitos hex
  8 x 16 bits: 112 bits = 128 bits

  2001:4860:4860:0:0:0:0:8888

  # ping 2001:4860:4860:0:0:0:0:8888
  PING 2001:4860:4860:0:0:0:0:8888(2001:4860:4860::8888) 56 data bytes
  64 bytes from 2001:4860:4860::8888: icmp_seq=1 ttl=56 time=15.5 ms
  64 bytes from 2001:4860:4860::8888: icmp_seq=2 ttl=56 time=22.3 ms
  64 bytes from 2001:4860:4860::8888: icmp_seq=3 ttl=56 time=17.9 ms

– Se agregan estos IP a resolv.conf -> Importante: resolv.conf se puede
editar siempre que NetworkManager de FreeDesktop no modifique dicho
archivo al cargar configuración por DHCP de las interfaces.

– Ver “man resolv.conf”

       nameserver Name server IP address
              Internet address of a name  server  that  the  resolver  should
              query,  either  an  IPv4  address (in dot notation), or an IPv6
              address in colon (and possibly dot) notation as per  RFC  2373.

Se agregan direcciones IPv6 antes que las direcciones IPv4, para dar
prioridad.


– Verificando funcionalidad:

  # nslookup www.google.com 2001:4860:4860::8888
  Server:		2001:4860:4860::8888
  Address:	2001:4860:4860::8888#53

  Non-authoritative answer:
  Name:	www.google.com
  Address: 172.217.30.164

Ok


– Luego de cargar youtube.com, y habilitar flash con flash control:

  $ netstat -t | less
  Active Internet connections (w/o servers)
  Proto Recv-Q Send-Q Local Address        Foreign Address         State
  tcp        0      0 kali-dafo:56478      ec2-23-21-193-210:https ESTABLISHED
  tcp      343      0 kali-dafo:56474      ec2-23-21-193-210:https ESTABLISHED
  tcp6       0      0 kali-dafo:35990      2800:3f0:4002:807:https ESTABLISHED
  tcp6       0      0 kali-dafo:45092      2800:3f0:4002:807:https ESTABLISHED
  tcp6       0      0 kali-dafo:35942      2800:3f0:4002:804:https ESTABLISHED
  tcp6       0      0 kali-dafo:55564      2800:3f0:4002:804:https ESTABLISHED
  tcp6       0      0 kali-dafo:47686      2800:3f0:4002:806:https ESTABLISHED

A los minutos:

  # netstat -t
  Active Internet connections (w/o servers)
  Proto Recv-Q Send-Q Local Address           Foreign Address         State

Ok

1. Flash player e interfaces para Plugins


Referencias:


www.howtogeek.com/193876/using-firefox-on-linux-your-flash-player-is-old-and-outdated/

“In 2012, Adobe announced they would no longer developing the NPAPI
plug-in for Linux, but they would continue developing the Pepper-based
Flash plug-in used in Chrome.”

Según tipo de navegador, se tienen distintas interfaces para “plugins”
o módulos:


– Internet Explorer on Windows uses ActiveX plugins.

+ Other browsers on all operating systems, Firefox, Safari, and even Chrome
  until recently, used the NPAPI framework.
  NPAPI was originally developed for Netscape
  - NPAPI stands for "Netscape Plugin Application Programming Interface"
    It became the standard plug-in architecture that all
    non-Internet-Explorer browsers used.

  - But NPAPI is very old. In 2013, Google announced their intention to
    remove NPAPI support from Chrome because NPAPI's 90s-era architecture
    has become a leading cause of hangs, crashes, security incidents, and
    code complexity.

  - They've replaced NPAPI with Pepper, also known as PPAPI.
    Adobe signed on, and the Flash Plugin distributed with Chrome on Linux,
    Windows, and Mac OS X uses Pepper instead of NPAPI.

  - On Windows and Mac OS X, Adobe is continuing to develop the NPAPI version
    of Flash used by Firefox and other browsers. On Linux, the NPAPI
    plug-in is stuck at 11.2.

    -> Este hecho cambió para 2018, se continuó con el desarrollo para
       GNU/Linux, tanto NPAPI (Firefox) como PPAPI (Chrome / Chromium).

1.1 Verificando disponibilidad de plugin Flash desde sitio de Adobe


https://get.adobe.com/flashplayer/

GNU/Linux
- YUM, TAR.GZ, RPM and APT packages for NPAPI and PPAPI
- Latest versions of Firefox or Google Chrome

https://get.adobe.com/flashplayer/otherversions/
Linux 32 bits
FP 28 tar.gz NPAPI -> Firefox
FP 28 tar.gz PPAPI -> Chromium

1.2. Soporte futuro de plugins según Mozilla/Firefox

NPAPI Plugins in Firefox

"Because Adobe Flash is still a common part of the Web experience for most
 users, we will continue to support Flash within Firefox as an exception
 to the general plugin policy".

"Websites and publishers which currently use plugins such as Silverlight or
 Java should accelerate their transition to Web technologies."

"Site maintainers should prepare for plugins to stop working in all versions
 of Firefox by the end of 2016."

"Oracle recommends that sites currently using Java applets consider switching to plugin-free solutions such as Java Web Start."

1.2.1 Web technologies / WebPlatform:

Resulta importante conocer lo que está disponible como alternativa
para construir “rich web applications” sin necesidad de plugins como
Flash, Silverlight, Java Applets, etc.


– Refs:
https://en.wikipedia.org/wiki/WebPlatform

  WebPlatform consists of several APIs to create web and mobile applications.
  The WebPlatform APIs give developers device and vendor-neutral access to
  common device aspects, such as[1][2]:

  - Geographical Positioning system
  - Energy Management (e.g. battery management)
  - Filesystem
  - Video capture (e.g. integrated camera)
  - Sound recording (e.g. microphone)
  - Gyroscopic sensors (e.g screen orientation, direction of movement).
  - Light sensors (ambient light)
  - Proximity sensors
  - Other sensors

  In addition, the WebPlatform APIs provide interfaces for the following:
  - Real-time communication
  - Long-running background processes
  - Making HTTP requests
  - Playing audio and video

Todo lo indicado, sin necesidad de plugins o software extra, más allá
del soporte en el navegador para HTML5 / CSS3 / Javascript.

As of September 2015 it has been discontinued with the notice
“The WebPlatform project has been discontinued when the Stewards
partnership agreement ended in September 2015. This site has been frozen,
and the assets we have created will remain.”


– La continuación de esta estandarización, es la “Open Web Platform”.

https://en.wikipedia.org/wiki/Open_Web_Platform

  Year started	2010
  Base standards: HTML5, CSS3, SVG, MathML3
  Domain: Web 3.0

En detalle, y para tener en cuenta a la hora de pensar nuevos
desarrollos, las funcionalidades que implementan total o parcialmente,
los navegadores modernos. Se indican tecnologías que afectan también
al software del servidor:

  - HTTP 1.1 (part 1-7), TLS 1.2,
  - HTML5
    - WebGL -> Javascript API para creación de gráficos 2D y 3D interactivos
      sin plugin
      Acceso: DOM -> HTML5 Canvas element


– File API,

  + CSS 2.1, CSS3, including,
    - CSS Namespaces,
    - Selectors, Media Queries, Text, Backgrounds and Borders, Colors,
    - 2D Transformations, 3D Transformations,
    - Transitions, Animations, and Multi-Columns modules,

  - SVG 1.1 -> Scalable vector graphics

  - MathML 3 -> Lenguaje de marcas para presentación de fórmulas matemáticas.

  - WAI-ARIA 1.0 -> Identificación de contenido dinámico para accesibilidad

  - W3C DOM: document objet model level 2 / level 3
    - Todos los elementos de un documento web registrado en un árbol
      de objetos.
    - Con DOM level 2, los navegadores pasan a suministrar una interfaz
      estándar para registro de eventos asociados a objetos
      del árbol.
    + Esto genera el vínculo con lenguajes manejados por eventos:
      - ECMAScript y sus implementaciones.

  + Web Storage
    - DOM Storage -> almacenamiento directo en navegador, sin transferir
      contenido a través de HTTP header.
      - Local storage -> sucesor de "persistent cookies"
      - Session storage -> sucesor de "session cookies"

  + ECMAScript 5 -> ECMA-262 and ISO/IEC 16262 -> Standard for client-side
    scripting. Best known implementation: Javascript.
    -> Server side scripting: Node.js

    - Selectors API: e.g. jQuery / otros Javascript frameworks

    - XMLHttpRequest -> AJAX: Async Javascript and XML
      - Implementado por navegadores nativamente (XMLHttpRequest Javascript
        object).
      - Afecta a software de servidor.


  - WebSocket Protocol/API -> e.g Ratchet PHP + React + Guzzle + Synfony2

  - W3C Geolocation API,
    - Obtener información de geolocalización del lado cliente, a través
      de un conjunto de rutinas ECMAScript (Javascript), consultando
      en forma transparente servidores de tipo "Location Information Servers".

  - Indexed Database API -> W3C WebSimpleDB
    -> Transactional local database of indexed JSON objects.
    "IndexedDB can be used for browser implemented functions, such as
     bookmarks, as well as web applications, such as email."

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *