[HowTo] Música sin pagar un céntimo. {y aún habrá quién pague por spotify y/o trague publicidad}
Posted: lunes, 2 de diciembre de 2019 by Termita in Etiquetas: icecast, internet 1.0, internet 4.0, jamendo, libre, lonchafinismo, mendicidad 4.0, música, pagar por todo, podcast, productividad, radio, radio online, spotify, streaming, suscripción, vlc- "Es que espotify me recomienda música que no conozco"
Ese es uno de los argumentos que los suscriptores a la mendicidad 4.0 que impera hoy dan a su cuota mensual.
Pareciera que los planteamientos de la SGAE han calado hondo, por otro lado.
Y yo no entiendo cómo existiendo aplicaciones como VLC y emisiones online o almacenes de música libre como Jamendo las pesonas siguen pagando -o tragando publicidad- por consumir música.
Cada cual con su dinero haga lo que considere menester, mas hay un adagio castellano que sabiamente postula que «un tonto y su dinero no permanecen mucho tiempo juntos» :D
Tras la chanza y la mofa sanas, vayamos al turrón, como diría maese Atareao.
Aplicaciones como VLC, que funcionan en cualquier sistema operativo -incluídos los móviles- tienen en su lista de reproducción "por defecto" el acceso a:
* Emisiones de música online y radiosAmén de que se puede fácilmente configurar tu sistema para poder reproducir tu biblioteca de música online allá donde estés.
* Directorios de música libre como Jamendo
* Podcasts
Y esto es así desde hace muchos años, décadas...
Generalmente basta con activar el mostrar la lista de reproducción para acceder a esos contenidos.
Las emisiones de música libre permiten, por supuesto, hacer búsquedas en los nombres de los emisores. Por ejemplo, si lo que apetece es escuchar rock clásico basta con introducir en la búsqueda "classic rock" y voilá, rocanroll del de toda la vida... grupos que vd conocía y otros muchos que no.
En cuanto a la música nueva, sobre todo a lo que a los melómanos respecta, qué mejor sitio para descubrir artistas nuevos que los directorios de Jamendo y similares.
[HowTo] Instalación de Typora en Linux Mint
Posted: domingo, 1 de diciembre de 2019 by Termita in Etiquetas: editor de textos, emacs, gedit, LaTeX, lenguaje de marcas, linux, linux mint, markdown, orgmode, pandoc, pluma, temas, typora, ubuntu, vi, vim, xedTypora es un editor de texto markdown. Para gustos, colores... pero va mejor que Remarkable.
Typora es uno de esos programas "prescindibles". No funciona desde línea de comandos -evidentemente- y lo que hace se puede llevar a cabo con las herramientas que por defecto vienen en la mayoría de distribuciones GNU Linux.
No obstante es una aplicación útil, tiene su momento y su espacio, sobre todo si uno -como es mi caso- no se ha metido aún de lleno en ese universo que son los editores de texto veteranos de GNU Linux.
Porque una alternativa digna de tener en cuenta es emplear un editor de texto convencional -Gedit, Pluma, etc- y agregarle un addon para poder previsualizar los "resultados" del lenguaje markdown. Esto me consta que se puede hacer, mas aun no lo probé. Cuando lo haga hablaré de ello.
Otra opción es instalar Pandoc y convertir lo escrito mediante el editor de texto convencional a pdf, html, etc... para visualizar los resultados.
Al turrón, como diría Atareao. Vamos a instalar Typora en Linux Mint y le vamos a agregar unos temas para que sea más agradable trabajar.
INSTALACIÓN DE TYPORA EN LINUX MINT
La instalación de Typora en Linux Mint es ligeramente diferente que en Linux Ubuntu.
El procedimiento es el siguiente:
wget -qO - https://typora.io/linux/public-key.asc | sudo apt-key add -
echo -e "\ndeb https://typora.io/linux ./" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt install typora
ADICIÓN DE TEMAS A TYPORA
Dependiendo del Tema (claro, oscuro, con un determinado tipo de letra, etc...) trabajaremos más a gusto con Typora y podremos exportar los resultados a pdf, html y demás con un aspecto concreto.
Los temas se pueden descargar de la sección de "Temas" de la página oficial de Typora.
Los menús de Typora que se ocupan de los temas son estos:
Archivo -> Apariencia -> Get Themes
Archivo -> Apariencia -> Abrir la carpeta de temas
Cada uno de los temas descargados ha de descomprimirse en la carpeta /home/tuusuario/.config/Typora/themes/ de forma correcta:
Cuando descomprimimos/exploramos el archivo que contiene un tema, vemos que existe una estructura de directorios por la que deberemos subir hasta llegar al directorio que contiene el tema en sí. Ese es el directorio que debemos descomprimir en la carpeta que menciono más arriba.
Por ejemplo:
El archivo "theme.zip" contiene la carpeta "theme" y dentro de ella la carpeta "xydark", que es la que deberemos extraer a la carpeta /home/tuusuario/.config/Typora/themes/
Particularmente me han gustado estos temas:
* Xydark
* Ash
* Solarized
* Monospace
[HowTo] Editar lista de ignorados en el cliente de sincronización ownCloud
Posted: sábado, 30 de noviembre de 2019 by Termita in Etiquetas: cliente-servidor, cloud, ignorados, linux, nextcloud, nube, nube privada, ownCloud, sincronización, sistemas operativos, ubuntuDesde el cliente de sincronización de ownCloud puedo visualizar la lista de archivos excluídos (ignorados) de la sincronización. También puedo añadir nuevos patrones, MAS NO PUEDO ELIMINAR NINGUNO DE LOS FILTROS QUE TRAE "DE SERIE".
Para poder hacerlo hay que hacer lo siguiente:
sudo cp /etc/ownCloud/sync-exclude.lst /etc/ownCloud/sync-exclude.lst.bkp
sudo nano /etc/ownCloud/sync-exclude.lst
(*) para nextCloud el método es similar
(**) Hay archivos como .htaccess que están excluídos desde el propio código del cliente por razonses de seguridad.
[HowTo] Instalar cliente de ownCloud en Ubuntu 18,04 y similares
Posted: by Termita in Etiquetas: backup, cliente-servidor, cloud, linux, nextcloud, nube, nube privada, ownCloud, sincronización, sistemas operativos, ubuntuAntecedentes
La última actualización (noviembre) del paquete nextcloud-client en Ubuntu 18.04 me está dando muchos problemas de sincronización.
No he conseguido instalar los paquetes que están disponibles en https://nextcloud.com/install/#install-clients y tampoco compilar el código fuente.
Lo más gracioso es la appimage que se ofrece... una vez descargada al hacerle doble click mi sistema no sabe qué hacer con ella. La verdad es que tampoco me he puesto a averiguar por qué.
Instalar cliente de ownCloud
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_18.04/ /' > /etc/apt/sources.list.d/isv:ownCloud:desktop.list"
wget -nv https://download.opensuse.org/repositories/isv:ownCloud:desktop/Ubuntu_18.04/Release.key -O Release.key
sudo apt-key add - < Release.key
sudo apt-get update
sudo apt-get install owncloud-client
Para otras versiones, bastará con seguir las indicaciones que se especifican detalladamente aquí.
------------------------------
Fuentes:
https://software.opensuse.org/download/package?project=isv:ownCloud:desktop&package=owncloud-client
Crónica de un desastre. Rsync en manos de un loco.
Posted: lunes, 18 de noviembre de 2019 by Termita in Etiquetas: backup, desastre, raspberry, rsync, sistemas operativosNo es la primera vez que me ocurre algo parecido. No hay duda de que aún no he logrado esa conexión espiritual con los sistemas GNU Linux que impide que estas cosas pasen.
Todo empezó cuando se me ocurrió instalarle al "sistema" NextCloudPi que tengo en Raspberry la extensión / aplicación de DropBox. Resultado: toda la instalación de NextCloud a la porra.
Lo que inicialmente constituía un mero incordio de restaurar una copia de seguridad iba a convertirse en un calvario merced a un "insignificante" error:
La copia de seguridad estaba hecha con rsync.
Conecto a un ordenador el disco duro de la Raspberry que contiene el sistema NextCloudPi "roto".
El disco se monta en /media/hdrpi
Borro el disco duro.
Desde la terminal, en /media/hdrpi/
sudo rsync -axv /backupnoviembre2019 /
DESASTRE: El sistema anfitrión -un Linux Mint- a freir espárragos en cuestión de segundos.
Entiendo que los usuarios como yo, que pareciera aún no estamos cien por cien en armonía con los sistemas GNU Linux, debemos pensarnos las cosas mucho -reflexionar- antes de apretar la tecla ENTER.
Ahora comprobaré qué tal funciona la restauración de backups de TimeShift arrancando desde un LiveUsb de Linux Mint. Desde línea de comandos, en el propio sistema, es posible que también funcionara dicha restauración, mas se me antoja más complejo pues a simple vista veo que faltan dependencias para que busybox pueda tratar correctamente la copia de seguridad.
[HowTo] Incorporar controlador de tarjeta wireless usb rtl8812au a Ubuntu y derivados sin que "se pierda" tras las actualizaciones de kernel
Posted: viernes, 15 de noviembre de 2019 by Termita in Etiquetas: 8812au.ko, compilar, debian, depmod, dkms, dpkg, hardware, incorporar módulo, insmod, linux, make, módulo, realtek, rtl8812au, sistemas operativos, tarjeta wireless, ubuntu, wirelessDespués de actualizar al kernel 5.0 de Linux, las tarjetas wireless ac con chip Realtek rtl8812au dejan de funcionar.
Este post trata de cómo solucionar esto de una vez por todas... o hasta que llegue otra actualización "letal" del Kernel.
Básicamente se trata de incorporar los "drivers" no oficiales ya actualizados para kernel > 5.0 del repositorio https://github.com/gnab/rtl8812au y seguir sus instrucciones, que básicamente son estas:
sudo apt-get remove --purge rtl8812au-dkms
dpkg --list
dpkg --list | grep rtl
dpkg --list | grep 8812
sudo dkms status
Descargo el paquete [https://github.com/gnab/rtl8812au/archive/master.zip] desde el repositorio https://github.com/gnab/rtl8812au
(*) Existe otro repositorio cuyo driver dicen que funciona: https://github.com/AstroDrabb/rtl8812au
sudo mkdir /usr/src/8812au-4.2.2
cd /
cd /usr/src/8812au-4.2.2/
sudo make
sudo insmod 8812au.ko
sudo cp 8812au.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless
sudo depmod
sudo dkms add -m 8812au -v 4.2.2
sudo dkms build -m 8812au -v 4.2.2
sudo dkms install -m 8812au -v 4.2.2
sudo dkms status
echo 8812au | sudo tee -a /etc/modules
ANTECEDENTES ****************
Hace tiempo que una tarjeta wireless ac con chip Realtek rtl8812au lleva dándome problemas en Ubuntu.
Para empezar, cuando se instala Ubuntu, éste no la reconoce. Cuando la máquina depende en exclusiva de la tarjeta wireless para conectarse a internet esto supone un problema, obviamente.
No queda otra que conectar otra tarjeta wireless que sí sea compatible y ponerse a solucionar el problema.
Encontré 3 drivers:
* El creado por un particular -gnab- y puesto a disposición pública en su repositorio de github: https://github.com/gnab/rtl8812au
* El creado por un particular -AstroDabb- y puesto a disposición pública en su repositorio de github: https://github.com/AstroDrabb/rtl8812au
* Un .deb (creo que "oficial" de Ubuntu): rtl8812au-dkms_4.3.8.12175.20140902+dfsg-0ubuntu8_all.deb [*] [**]
Opté primero por "incorporar" al sistema el primer driver (qnab) siguiendo las instrucciones de su creador.
Tras una actualización del Kernel, este driver dejó de funcionar. El método que tuve que emprender cada vez que se producía una de estas actualizaciones oficiales de Ubuntu que dejaban k.o. a mi tarjeta wireless era el siguiente:
"Software y Actualizaciones" → "Controladores Adicionales" → marcar "no usar este dispositivo"
Apagar el sistema
Conectar una tarjeta wireless compatible (o conectar la máquina directamente por red cableada).
Arrancar el sistema
"Software y Actualizaciones" → "Controladores Adicionales" → desmarcar "no usar este dispositivo"
Apagar el sistema
Desconectar la tarjeta wireless compatible o desconectar la máquina de la red cableada
Arrancar el sistema
Un procedimiento tedioso que -eso era lo peor- le dejaba a uno la sensación de no saber lo que estaba haciendo ni qué estaba pasando realmente.
Luego opté por instalar en el sistema el tercer driver (el .deb). Seguía ocurriendo lo mismo tras cada actualización importante del sistema.
Llegados a este punto, pasado un tiempo emprendí la solución -probablemente definitiva- incorporando al sistema el mismo driver ya actualizado por Qnab, su creador. Es el método que se enuncia al principio de este post.
[HowTo] Solucionar error "DistributedPixelCache" y "cache resources exhausted" en convert (imagemagick)
Posted: domingo, 10 de noviembre de 2019 by Termita in Etiquetas: cache resources exhausted, convert, convertir, debian, DistributedPixelCache, edición de imagenes, imagemagick, jpg, linux, pdf, sistemas operativos, ubuntuCuando tratamos de convertir mediante el comando convert un montón de, por ejemplo, imagenes jpg a un documento .pdf puede producirse el siguiente error masivamente:
«
convert-im6.q16: DistributedPixelCache '127.0.0.1' @ error/distribute-cache.c/ConnectPixelCacheServer/244.
convert-im6.q16: cache resources exhausted `fotografia098.jpg' @ error/cache.c/OpenPixelCache/3984.
[HowTo] Cambiar la fecha de un archivo
Posted: by Termita in Etiquetas: archivos, creación, fecha, linux, modificación, sistema de archivos, sistemas operativos, touchtouch -t aaaammddhhmm.ss archivo
por ejemplo:
touch -t 201911101420.15 archivo.txt
(*) Así cambiamos la fecha de modificación y creación del archivo al día 10 del mes 11 (noviembre) del año 2019 a las 14:20 horas y 15 segundos.
Existen otros parámetros que permiten ser más precisos:
-a: cambiar sólo la fecha del ultimo acceso al fichero
-m: cambiar sólo la fecha de modificación del fichero
[HowTo] Aumentar swap en Raspberry Pi 3B (RaspBian)
Posted: by Termita in Etiquetas: htop, linux, memoria, RaspberryPi, raspberryPi 3B, Raspbian, rendimiento, sistemas operativos, swapEstablecer CONF_SWAPSIZE=256
sudo dphys-swapfile setup
sudo dphys-swapfile swapon
cat /proc/meminfo | grep Swap
Después de aumentar la memoria de intercambio (swap) parece evidente que la máquina consume más memoria RAM.... No perderé de vista el asunto.
----------------------------------
Fuentes:
http://www.sensorsiot.org/raspberry-pi-tricks/
[HowTo] Deshabilitar hdmi en RaspBerry Pi con el comando tvservice
Posted: by Termita in Etiquetas: consumo eléctrico, hdmi, RaspberryPi, raspberryPi 3B, Raspbian, tv, tvservice/opt/vc/bin/tvservice -off
«««««««««««««««««««««««««««««««««««««««««««
Usage: tvservice [OPTION]...
-p, --preferred Power on HDMI with preferred settings
-e, --explicit="GROUP MODE DRIVE" Power on HDMI with explicit GROUP (CEA, DMT, CEA_3D_SBS, CEA_3D_TB, CEA_3D_FP, CEA_3D_FS), MODE (see --modes) and DRIVE (HDMI, DVI)
-t, --ntsc Use NTSC frequency for HDMI mode (e.g. 59.94Hz rather than 60Hz)
-c, --sdtvon="MODE ASPECT [P]" Power on SDTV with MODE (PAL or NTSC) and ASPECT (4:3 14:9 or 16:9) Add P for progressive
-o, --off Power off the display
-m, --modes=GROUP Get supported modes for GROUP (CEA, DMT)
-M, --monitor Monitor HDMI events
-s, --status Get HDMI status
-a, --audio Get supported audio information
-d, --dumpedid <filename> Dump EDID information to file
-j, --json Use JSON format for --modes output
-n, --name Print the device ID from EDID
-l, --list List all attached devices
-v, --device Specify the device to use (see --list)
-h, --help Print this information
[HowTo] Medir el rendimiento de un servidor mediante apachebench
Posted: by Termita in Etiquetas: apache2, apachebench, benchmark, linux, monitorización, servidor, sistemas operativosApache tiene una utilidad para medir el rendimiento de un servidor apache2. Se llama apachebench, o ab [Apache HTTP server benchmarking tool].
Se trata de una herramienta para hacerle benchmarking -poner a prueba- un servidor HTTP Apache. Está diseñada para proporcionar una impresión de cómo una determinada instalación de Apache se comporta. Especialmente muestra cuantas peticiones por segundo es capaz de servir.
INSTALACIÓN
sudo apt update
sudo apt install apache2-utils
ab -V
ANEXO 01 Explicación significado del resultado del test
««««««««««««««««««««««««««««««««««««««««««««««««
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
ANEXO 02
««««««««««««««««««««««««««««««««««««««««««««««««
Synopsis *-*-*-*-*-*-*-*
ab [ -A auth-username:password ] [ -b windowsize ] [ -B local-address ] [ -c concurrency ] [ -C cookie-name=value ] [ -d ] [ -e csv-file ] [ -E client-certificate file ] [ -f protocol ] [ -g gnuplot-file ] [ -h ] [ -H custom-header ] [ -i ] [ -k ] [ -l ] [
-m HTTP-method ] [ -n requests ] [ -p POST-file ] [ -P proxy-auth-username:password ] [ -q ] [ -r ] [ -s timeout ] [ -S ] [ -t timelimit ] [ -T content-type ] [ -u PUT-file ] [ -v verbosity] [ -V ] [ -w ] [ -x <table>-attributes ] [ -X proxy[:port] ] [ -y
<tr>-attributes ] [ -z <td>-attributes ] [ -Z ciphersuite ] [http[s]://]hostname[:port]/path
top
Options *-*-*-*-*-*-*-*-
-A auth-username:password
Supply BASIC Authentication credentials to the server. The username and password are separated by a single : and sent on the wire base64 encoded. The string is sent regardless of whether the server needs it (i.e., has sent an 401 authentication
needed).
-b windowsize
Size of TCP send/receive buffer, in bytes.
-B local-address
Address to bind to when making outgoing connections.
-c concurrency
Number of multiple requests to perform at a time. Default is one request at a time.
-C cookie-name=value
Add a Cookie: line to the request. The argument is typically in the form of a name=value pair. This field is repeatable.
-d
Do not display the "percentage served within XX [ms] table". (legacy support).
-e csv-file
Write a Comma separated value (CSV) file which contains for each percentage (from 1% to 100%) the time (in milliseconds) it took to serve that percentage of the requests. This is usually more useful than the 'gnuplot' file; as the results are
already 'binned'.
-E client-certificate-file
When connecting to an SSL website, use the provided client certificate in PEM format to authenticate with the server. The file is expected to contain the client certificate, followed by intermediate certificates, followed by the private key.
Available in 2.4.36 and later.
-f protocol
Specify SSL/TLS protocol (SSL2, SSL3, TLS1, TLS1.1, TLS1.2, or ALL). TLS1.1 and TLS1.2 support available in 2.4.4 and later.
-g gnuplot-file
Write all measured values out as a 'gnuplot' or TSV (Tab separate values) file. This file can easily be imported into packages like Gnuplot, IDL, Mathematica, Igor or even Excel. The labels are on the first line of the file.
-h
Display usage information.
-H custom-header
Append extra headers to the request. The argument is typically in the form of a valid header line, containing a colon-separated field-value pair (i.e., "Accept-Encoding: zip/zop;8bit").
-i
Do HEAD requests instead of GET.
-k
Enable the HTTP KeepAlive feature, i.e., perform multiple requests within one HTTP session. Default is no KeepAlive.
-l
Do not report errors if the length of the responses is not constant. This can be useful for dynamic pages. Available in 2.4.7 and later.
-m HTTP-method
Custom HTTP method for the requests. Available in 2.4.10 and later.
-n requests
Number of requests to perform for the benchmarking session. The default is to just perform a single request which usually leads to non-representative benchmarking results.
-p POST-file
File containing data to POST. Remember to also set -T.
-P proxy-auth-username:password
Supply BASIC Authentication credentials to a proxy en-route. The username and password are separated by a single : and sent on the wire base64 encoded. The string is sent regardless of whether the proxy needs it (i.e., has sent an 407 proxy
authentication needed).
-q
When processing more than 150 requests, ab outputs a progress count on stderr every 10% or 100 requests or so. The -q flag will suppress these messages.
-r
Don't exit on socket receive errors.
-s timeout
Maximum number of seconds to wait before the socket times out. Default is 30 seconds. Available in 2.4.4 and later.
-S
Do not display the median and standard deviation values, nor display the warning/error messages when the average and median are more than one or two times the standard deviation apart. And default to the min/avg/max values. (legacy support).
-t timelimit
Maximum number of seconds to spend for benchmarking. This implies a -n 50000 internally. Use this to benchmark the server within a fixed total amount of time. Per default there is no timelimit.
-T content-type
Content-type header to use for POST/PUT data, eg. application/x-www-form-urlencoded. Default is text/plain.
-u PUT-file
File containing data to PUT. Remember to also set -T.
-v verbosity
Set verbosity level - 4 and above prints information on headers, 3 and above prints response codes (404, 200, etc.), 2 and above prints warnings and info.
-V
Display version number and exit.
-w
Print out results in HTML tables. Default table is two columns wide, with a white background.
-x <table>-attributes
String to use as attributes for <table>. Attributes are inserted <table here >.
-X proxy[:port]
Use a proxy server for the requests.
-y <tr>-attributes
String to use as attributes for <tr>.
-z <td>-attributes
String to use as attributes for <td>.
-Z ciphersuite
Specify SSL/TLS cipher suite (See openssl ciphers)
top
Output *-*-*-*-*-*-*-*-*
The following list describes the values returned by ab:
Server Software
The value, if any, returned in the server HTTP header of the first successful response. This includes all characters in the header from beginning to the point a character with decimal value of 32 (most notably: a space or CR/LF) is detected.
Server Hostname
The DNS or IP address given on the command line
Server Port
The port to which ab is connecting. If no port is given on the command line, this will default to 80 for http and 443 for https.
SSL/TLS Protocol
The protocol parameters negotiated between the client and server. This will only be printed if SSL is used.
Document Path
The request URI parsed from the command line string.
Document Length
This is the size in bytes of the first successfully returned document. If the document length changes during testing, the response is considered an error.
Concurrency Level
The number of concurrent clients used during the test
Time taken for tests
This is the time taken from the moment the first socket connection is created to the moment the last response is received
Complete requests
The number of successful responses received
Failed requests
The number of requests that were considered a failure. If the number is greater than zero, another line will be printed showing the number of requests that failed due to connecting, reading, incorrect content length, or exceptions.
Write errors
The number of errors that failed during write (broken pipe).
Non-2xx responses
The number of responses that were not in the 200 series of response codes. If all responses were 200, this field is not printed.
Keep-Alive requests
The number of connections that resulted in Keep-Alive requests
Total body sent
If configured to send data as part of the test, this is the total number of bytes sent during the tests. This field is omitted if the test did not include a body to send.
Total transferred
The total number of bytes received from the server. This number is essentially the number of bytes sent over the wire.
HTML transferred
The total number of document bytes received from the server. This number excludes bytes received in HTTP headers
Requests per second
This is the number of requests per second. This value is the result of dividing the number of requests by the total time taken
Time per request
The average time spent per request. The first value is calculated with the formula concurrency * timetaken * 1000 / done while the second value is calculated with the formula timetaken * 1000 / done
Transfer rate
The rate of transfer as calculated by the formula totalread / 1024 / timetaken
Bugs *-*-*-*-*-*-*-*
There are various statically declared buffers of fixed length. Combined with the lazy parsing of the command line arguments, the response headers from the server and other external inputs, this might bite you.
It does not implement HTTP/1.x fully; only accepts some 'expected' forms of responses. The rather heavy use of strstr(3) shows up top in profile, which might indicate a performance problem; i.e., you would measure the ab performance rather than the
server's.
Available Languages: en | fr | ko | tr
*************************************************