Skip to main content

a silhouette of a person's head and shoulders, used as a default avatar

Entrevista en exclusiva al organizador del evento 24h24L sobre #Linux y #softwarelibre

En diciembre de 2020 se celebrará un evento online en español centrado en GNU/Linux y el software libre visto desde muchos ángulos. El 24h24L

Una de las cosas buenas del software libre, es que el código permite replicar el proyecto, expandirlo, mejorarlo, añadir y quitar en función de nuestras necesidades/gustos y compartirlo con más usuarios.

Y en similitud con esa cualidad exclusiva del software libre, tenemos que ideas y proyectos relacionados con este movimiento del software libre, se replican, se crean y ayudan a la difusión de esta pasión que muchas personas compartimos en todo el mundo.

Si hace un tiempo, Juan Febles nos sorprendió creando, produciendo el primer Maratón Linuxero, eso no ha hecho más que plantar una semilla en la cabeza de otras personas que movidos por ese “se puede hacer” deciden ponerse manos a la obra e ingeniarse su propio evento relacionado con GNU/Linux y el software libre.

Eso es lo que me viene a la cabeza cuando me entero del evento 24h24L. Un evento en línea de 24 horas de duración en formato podcast y realizado en español, para toda la comunidad hispana de GNU/Linux.

24h24L, serán 24 horas de podcast divididos en diversas temáticas con moderadores y participantes que tratarán ese tiempo de diversos temas. La idea y la organización surge de José Jimenez aka Rooteando, que ha decidido hacer realidad su proyecto y organizar este evento y aunar nombres importantes dentro del mundillo para esta primera cita del evento.

El proyecto me gustó desde su inicio y ahora que todo se va fraguando y concretando, todavía tiene un aspecto mucho más interesante. Así que he decidido hacer una entrevista en exclusiva a José Jimenez para que nos responda de primera mano y desde el epicentro del evento sobre algunas cuestiones de 24h24L.

Vhck: Antes de nada te queremos conocer algo más. ¿Hace cuanto que usas GNU/Linux? ¿Qué distribución utilizas? ¿Tu trabajo está relacionado con GNU/Linux? ¿Qué es para ti el software libre?

Empece a utilizar GNU/Linux por el 1996-1997 porque quería replicar el entorno que se utilizaba en las salas de ordenadores de la facultad de informática , que era Solaris, y poder realizar las prácticas en el mismo entorno que tenia en la facultad. Que yo recuerde la primera distribución que utilice fue una Slackware 3.4.

Soy un usuario “monodistribución” llevo muchos años utilizando Fedora, empece a utilizarla cuando se llamaba Red Hat y la primera versión que utilice creo que fue la 5.0 . Estoy muy acostumbrado a ella y no tengo queja, he probado muy pocas distribuciones y salvo una época que tuve Debian en un ordenador que usaba de servidor, en todos mis equipos siempre han tenido RedHat/Fedora

Mi trabajo no tiene relación directa con GNU/Linux, soy formador , salvo en un par de cursos que intente dar un poco de GNU/Linux, con resultados dispares, la temática de los cursos que imparto no tiene relación con este sistema operativo.

Vhck: Pero vayamos al meollo del proyecto 24h24L ¿Cómo surgió el proyecto 24h24L? A mí me recuerda en algún modo al Maratón Linux ¿Toma algo de eso, o no tiene nada que ver?

Lo primero que suelo definir en mis proyecto es el objetivo y si lo tengo claro, sigo adelante. En este caso, el objetivo era ayudar a la gente que esta empezando o que quiere empezar en GNU/Linux con información y experiencias de usuarios que ya utilizan habitualmente este sistema operativo.

Después pensé como debía hacerlo, y elegí un formato de podcast, creo que es lo mas cómodo para contar una experiencia o dar información. Para que todo estuviera mas organizado, pensé una serie de categorías que representan diversos ámbitos donde esta presente GNU/Linux y en cada una de ellas incluir audios de temáticas relacionadas con la categoría.

Por último, tuve que buscar gente que me ayudara con la organización y participantes para los audios, por suerte convencí a varios podcaster del mundo de Linux y otros personas que contacté por Telegram .

Del Maratón Linuxero, Juan Febles participa en la organización y en los audios, copié el formato de 24 horas, para que fuera un evento algo diferente. Para hacer el evento menos complejo, a diferencia del Maratón, no será en directo, será en diferido, con una emisión de audios ya grabados.

Vhck: Explícanos el detalle de en qué consistirá el 24h24L y cómo está dividido, qué fases o temas tratará, etc…

Los audios del evento están organizados en varios categorías: Redes, Empresas, GNU/Linux, Programación, Multimedia y Hardware. En principio, cada categoría tenía 4 audios, pero tuve problema con la temática del algún audio y hay una categoría con 3 audios(Redes) y otra con 5 audios (Empresas), pero el resultado siguen siendo 24 audios.

Ahora mismo, el evento se encuentra en la fase de “grabación”, donde los moderadores, las personas encargadas de la grabación, se ponen en contacto con los participantes de los audios para acordar una fecha de grabación . Una vez grabado, enviaran los audios a la organización donde el grupo de audio/vídeo los prepara para la emisión.

Vhck: ¡24h son muchas! ¿Te has quedado sin ideas para llenar ese tiempo o ha habido temas que se han quedado fuera?

En principio no he tenido problemas para las categorías y temáticas de los audios, GNU/Linux está presente en muchos ámbitos. A la hora de escoger una categoría de otra , era simplemente que había conseguido 4 temáticas para audios

Conforme iba organizando el evento , conseguía participantes y moderadores, algunos temas se han cambiado por otros, en función de si se conseguía participantes, Pero en general, no han sido muchos cambios

Vhck: ¿Cuanta gente hay detrás del 24h24l para producirlo y llevarlo a buen fin?

Como he dicho antes, hay varios grupos de trabajo, en total habrá una 20 personas en la organización, incluyendo a los moderadores.

Respecto a los participantes , la intención era que cada audio tuviera un mínimo de dos participantes , menos en un par de audios, se ha conseguido, también hay algún participante que esta en mas de un audio, incluso hay gente de la organización que participa en audios. En total ,creo que hay entre 30 a 35 personas participando en los audios.

Vhck: El proyecto en su web ya tiene publicado el programa de charlas. ¿Cómo ha sido el proceso de gestación y qué te ha llevado a elegir una temática u otra, unos ponentes u otros?

Simplemente si conseguía participantes para la charlas o no, esa era el principal requisito . Por suerte, la gran mayoría de charlas he conseguido participantes.

Respecto a los participantes , hay dos tipos; los moderadores y los participantes. El primero quería que fueran personas con experiencia en podcast , por el formato de las charlas, el segundo buscaba un perfil de usuario habitual de Linux y con experiencia en la temática de la charla.

Primero empece a proponérselo a gente conocida por Telegram, el medio principal de comunicación y donde he conseguido a toda la gente para el evento. Después empece a poner mensaje en diversos grupo y canales de Telegram , que permitió que se unieran al evento a personas que no conocía y ha funcionado muy bien.

Vhck: Danos un resumen/adelanto de lo que podremos encontrar. ¿Nos tienes guardada alguna sorpresa que no has desvelado?

Sorpresa poca, no nos guardamos nada, habrá sorteos, los oyentes podrán enviar preguntas y mas cosas que iremos anunciando. Simplemente queremos que cualquier oyente sepa lo que espera al escuchar el evento, por ese motivo todas las ideas que tenemos , la publicamos por las diferentes redes del evento.

Vhck: ¿Cuando podremos disfrutar de esta emisión? Y si no podemos escucharlo ese día o completo ¿Se podrá disfrutar de las charlas en otro momento?

La fecha de emisión será el próximo 12 de diciembre a las 16:00 (hora peninsular española) y finaliza el 13 de diceimbre a las 17:00, será en un reproductor instalado en la web 24h24l.org. Al día siguiente de la emisión, distribuiremos un feed con todos los audios por las principales plataformas de podcasting.

Vhck: El 24h24l tiene formato de podcast ¿Qué ofrece este medio que tan de moda se ha puesto?

El podcast tiene una gran ventaja que es la facilidad para poder escucharlo donde y cuando quieras , y podemos reproducir en multitud de dispositivos como móvil, tablet, ordenador…

Pero debe tener un contenido acorde al formato , por eso se ha pensado que las charlas sean para dar información y experiencia de usuario, que es ideal para este formato.

Vhck: Hasta el día de emisión ¿Cómo podremos estar informados de lo que vaya sucediendo en 24h24l para estar al tanto del proyecto?

El evento tiene un conjunto de fuentes información , principalmente la web 24h24l.org y una cuenta de Twitter @24h24l1, pero también tenemos otras cuentas en redes sociales libre como Mastodon @24h24l y una canal de Telegram @evento24h24l. Esperamos en breve, abrir nuestro canal de Youtube 24H24L donde podremos audios que estamos haciendo sobre los participantes en el evento y publicaremos los audios del evento al día siguiente de la emisión.

Vhck: ¿Tiene voluntad de ser algo periódico o es un proyecto puntual?

La idea es que se convierta en un evento anual, pero depende de la acogida del día de emisión y escuchas del podcast, si es un éxito, se podría intentar una segunda edición. Aunque ahora mejor centrarse en el evento actual y que salga adelante.

Tengo que reconocer que tengo alguna ideas que me gustaría poner en práctica en futuras versiones, pero eso el tiempo lo dirá.

Vhck: Antes de embarcarte en este proyecto tu ya tenías tus pinitos en esto del podcast y del software libre. Háblanos un poco sobre esos proyectos paralelos.

Tengo varios podcast y canales de Telegram de diferentes temáticas, los relacionados con GNU/Linux, son un podcast llamado Tomando un Café y un canal de Telegram llamado Un Día Una Aplicación.

En el podcast hablo sobre aplicaciones de Linux y tengo reflexiones/opiniones sobre diversos aspecto de Linux. Respecto al canal de Telegram, originalmente , publicaba todos los días una aplicación de Linux, con una pequeña reseña de información; descripción, licencia y enlaces a su web y/o repositorio, pero por motivos de tiempo ahora solo publico tres aplicaciones a la semana (lunes, liércoles y viernes)

Vhck: Muy interesante la propuesta y estaremos muy atentos a las novedades. Y el día de la emisión a lo que en 24h24l ocurra. La última palabra es tuya para decir lo que quieras.

Muchas gracias Victor por ofrecerme esta entrevista para explicar el proyecto y promocionarlo. Me gustaría recordar, que si queréis hacer una pregunta a los entrevistados ,en la web podéis ver los temas de los audios y participantes, solo teneis que enviar un correo a 24h24l@mailo.com <mailto:24h24l@mailo.com>, en el asunto poner “Pregunta del oyente” y en el mensaje poner nombre, audio que quieres preguntar y la pregunta.

Muchas gracias a José Jimenez por la tarea de compilar este proyecto para nosotros y poder disfrutar de nuestra pasión que es GNU/Linux y el software libre.

a silhouette of a person's head and shoulders, used as a default avatar

Wunderground PWS Widget, Plasmoides de KDE (155)

El mundo del internet de las cosas debe estar íntimamente unido al Software Libre si queremos preservar nuestra intimidad y privacidad. Os presento Wunderground PWS Widget, el plasmoide 155 de la serie, que nos da información meteorológica de forma diferente al que estamos acostumbrados.

Wunderground PWS Widget, Plasmoides de KDE (155)

Por norma general, cuando utilizamos un servicio de meteorología los datos que nos proporciona provienen de una Estación Meteorológica cercana o del Aeropuerto más próximo, con lo cual su precisión puede no ser muy buena.

Ahora bien, esto me lleva a hacerme unas preguntas que afortunadamente tiene respuesta positiva.

¿Se puede mejorar? Si.

¿Cómo? Obteniendo datos más cercanos a tu localización y haciendo predicciones basado en esos datos.

¿Y se puede hacer eso? Sí, con la colaboración de los usuarios y los servicios de Weather Underground.

¿Y lo puedo tener como plasmoide en mi escritorio Plasma? Por supuesto. Con el plasmoide 155 que presento en el blog llamado Wunderground PWS Widget, de ODD-K.

Y es que la idea es muy sencilla. En la actualidad hacerse una estación meteorológica casera es posible con una Raspberry Pi (o se puede adquirir una con un módico precio que puede rondar desde los 200€ hasta los 1000€, según que prestaciones queramos).

Una vez la tengamos montada simplemente debemos registrarnos en Weather Underground y ellos mismos se encargarán de realizar ponerlos en sus programas de simulación y obtener así la predicción adecuada.

Posteriormente, podemos consultar en su página web o utilizar Wunderground PWS Widget en nuestro escritorio Plasma.

Wunderground PWS Widget, Plasmoides de KDE (155)

Hay que destacar que este plasmoide precisa de mucho amor ya que: no muestra la predicción; las unidades estań en el sistema inglés (grados farenheit en vez de celsius, por ejemplo); no muestra iconos, etc.

Así que estemos atentos a su evolución ya que nos encontramos ante una gran iniciativa que demostrará el poder del saber colectivo.

Wunderground PWS Widget, Plasmoides de KDE (155)

Y como siempre digo, si os gusta el plasmoide podéis “pagarlo” de muchas formas en la nueva página de KDE Store, que estoy seguro que el desarrollador lo agradecerá: puntúale positivamente, hazle un comentario en la página o realiza una donación. Ayudar al desarrollo del Software Libre también se hace simplemente dando las gracias, ayuda mucho más de lo que os podéis imaginar, recordad la campaña I love Free Software Day 2017 de la Free Software Foundation donde se nos recordaba esta forma tan sencilla de colaborar con el gran proyecto del Software Libre y que en el blog dedicamos un artículo.

Más información: KDE Store

¿Qué son los plasmoides?

Para los no iniciados en el blog, quizás la palabra plasmoide le suene un poco rara pero no es mas que el nombre que reciben los widgets para el escritorio Plasma de KDE.

En otras palabras, los plasmoides no son más que pequeñas aplicaciones que puestas sobre el escritorio o sobre una de las barras de tareas del mismo aumentan las funcionalidades del mismo o simplemente lo decoran.

a silhouette of a person's head and shoulders, used as a default avatar

Bee Cells, un tema de iconos hexagonal para Plasma

Sigo con los temas de iconos en el blog, y es que debo reconocer que me fascina la variedad que tenemos a nuestra disposición, tanto de forma , estilo o colores. Hoy tengo el gusto de presentaros un tema de iconos llamdo Bee Cells que, como su propio nombre indica, simula las celdas hexagonales de las abejas.

Bee Cells, un tema de iconos hexagonal para Plasma

Para el escritorio Plasma de la Comunidad KDE hay cientos de temas de todo tipo disponibles para los usuarios: iconos, cursores, emoticones, etc, Y como me gusta cambiar de vez en cuando, en el blog le he dedicado muchos artículos a cada uno de los packs.

No obstante, como suelo decir, cambiar el tema de iconos de un escritorio es una de las formas de adaptación más personal que puedes realizar sobre tu PC, ya que modifica totalmente el aspecto del mismo a la hora de interaccionar con tus aplicaciones, documentos y servicios.

Hoy os presento Bee Cells, un bonito tema de iconos que nos viene de la mano ZMA, un clásico de las sección, que nos ofrece un conjunto de iconos para carpetas, aplicaciones y otros símbolos del sistema con forma hexagonal, plano y colorido.

Bee Cells, un tema de iconos hexagonal para Plasma

Por cierto, si tenéis interés por otros temas de ZMA mirad algunos de los que han aparecido en el blog: Yellow StickersUniform, Not superflat stickers, Gears y White chips.

Y como siempre digo, si os gusta el pack de iconos podéis “pagarlo” de muchas formas en la nueva página de KDE Store, que estoy seguro que el desarrollador lo agradecerá: puntúale positivamente, hazle un comentario en la página o realiza una donación. Ayudar al desarrollo del Software Libre también se hace simplemente dando las gracias, ayuda mucho más de lo que os podéis imaginar, recordad la campaña I love Free Software Day 2017 de la Free Software Foundation donde se nos recordaba esta forma tan sencilla de colaborar con el gran proyecto del Software Libre y que en el blog dedicamos un artículo.

Más información: KDE Store

a silhouette of a person's head and shoulders, used as a default avatar

Cómo intercambiar el funcionamiento de dos teclas especiales del teclado en #Linux

Ya sea porque tienes una tecla de tu teclado que no funciona o porque quieres cambiar el comportamiento de dos teclas. Veamos cómo “remapear” dos teclas especiales en GNU/Linux

Mi portátil ya tiene unos 7 años, y recientemente le he ampliado la memoria de 4Gb a 8Gb (cosa que tendría que haber hecho hace tiempo) pero ya sufre de ciertos achaques (como el dueño).

Le tuve que reparar el cargador, porque falseaba el cable, la batería ya dura bastante poco, tiene rota una bisagra, y ahora de manera esporádica fallan ciertas teclas.

Lo he limpiado y no están sucias, por lo que supongo que será cosa eléctrica, pero no me decido a abrirlo para ver si lo puedo solucionar. Mientras tanto voy tirando con un teclado externo por USB o un teclado virtual en la pantalla.

Me fallan las teclas Esc, 1, Tab, a. Teclas que utilizo bastante a diferencia del Shift izquierdo, o la tecla de Bloqueo de Mayúsculas (que sinceramente no creo haberla utilizado nunca).

Así que pensé que podía “remapear” la tecla Esc por la tecla Bloqueo de Mayúsculas y la tecla Tab por el Shift Izquierdo. Veamos cómo poder intercambiar el funcionamiento de esas teclas especiales en GNU/Linux.

Para hacer esto, deberemos editar un archivo del sistema, por lo que cuidado al hacerlo y antes de nada, vamos a crear una copia del archivo para poder restaurarla si fuera necesario. Ejecutamos:

sudo cp /usr/share/X11/xkb/symbols/pc /usr/share/X11/xkb/symbols/pc.bk

Hecho esto editamos con Vim (o tu editor preferido) dicho archivo:

sudo vim /usr/share/X11/xkb/symbols/pc

La parte inicial de mi archivo es la siguiente (el archivo es más largo, pero pego aquí esta parte, que es en la que he realizado las modificaciones):

default partial alphanumeric_keys modifier_keys
xkb_symbols "pc105" {

key <ESC> { [ Escape ] };

// The extra key on many European keyboards:
key <LSGT> { [ less, greater, bar, brokenbar ] };

// The following keys are common to all layouts.
key <BKSL> { [ backslash, bar ] };
key <SPCE> { [ space ] };

include "srvr_ctrl(fkey2vt)"
include "pc(editing)"
include "keypad(x11)"

key <BKSP> { [ BackSpace, BackSpace ] };

key <TAB> { [ Tab, ISO_Left_Tab ] };
key <RTRN> { [ Return ] };

key <CAPS> { [ Caps_Lock ] };
key <NMLK> { [ Num_Lock ] };

key <LFSH> { [ Shift_L ] };
key <LCTL> { [ Control_L ] };
key <LWIN> { [ Super_L ] };

key <RTSH> { [ Shift_R ] };
key <RCTL> { [ Control_R ] };
key <RWIN> { [ Super_R ] };
key <MENU> { [ Menu ] };

Voy a intercambiar las teclas de Escape por la de Bloqueo Mayúsculas (Caps_Lock) y la Tabulador por la tecla Shift izquierda.

Por lo que después de la modificación mi archivo queda de la siguiente manera. Resalto en rojo el texto cambiado:

default partial alphanumeric_keys modifier_keys
xkb_symbols "pc105" {

key <ESC> { [ Caps_Lock ] };

// The extra key on many European keyboards:
key <LSGT> { [ less, greater, bar, brokenbar ] };

// The following keys are common to all layouts.
key <BKSL> { [ backslash, bar ] };
key <SPCE> { [ space ] };

include "srvr_ctrl(fkey2vt)"
include "pc(editing)"
include "keypad(x11)"

key <BKSP> { [ BackSpace, BackSpace ] };

key <TAB> { [ Shift_L ] };
key <RTRN> { [ Return ] };

key <CAPS> { [ Escape ] };
key <NMLK> { [ Num_Lock ] };

key <LFSH> { [ Tab, ISO_Left_Tab ] };
key <LCTL> { [ Control_L ] };
key <LWIN> { [ Super_L ] };

key <RTSH> { [ Shift_R ] };
key <RCTL> { [ Control_R ] };
key <RWIN> { [ Super_R ] };
key <MENU> { [ Menu ] };

Guardamos el texto y salimos del editor. Ahora deberemos reiniciar nuestro equipo (no sé si sirve solo con cerrar la sesión).

Al volver a nuestra sesión, podremos comprobar cómo se ha efectuado el cambio de estas dos teclas.

Si algo no ha salido bien, podremos volver atrás, restaurando la copia .bk del archivo original que hemos creado al inicio.

Espero que os haya servido de utilidad. También de esta manera en Vim tendremos la tecla Esc, para cambiar de modos del editor, más cerca de la “zona caliente” de nuestro teclado y no deberemos desplazarnos hasta la esquina superior izquierda para presionarla.

¿Utilizas algún truco similar a la hora de “mapear” tu teclado? Compártelo en los comentarios…

Enlaces de interés

a silhouette of a person's head and shoulders, used as a default avatar

Workrave applet- Plasmoides de KDE (154)

Os presento Workrave applet, el plasmoide 154 de la serie, que nos ayuda a controlar el tiempo de trabajo y descanso al utilizar nuestro ordenador. Se trata de un widget que podríamos categorizar dentro de la sección de productividad.

Workrave applet- Plasmoides de KDE (154)

Uno de los problemas que tienen las personas que trabajan muchas horas delante de un ordenador es que se suele perder la noción del tiempo y se pierde productividad.

Es por ello que existen técnicas para realizar pequeños descansos para ser más eficiente, las cuales pueden ser implementadas en el sistema de forma automática.

Esa es la idea de Workrave, un programa gratuito que ayuda a la recuperación y prevención de las lesiones por esfuerzo repetitivo (RSI).

Esta aplicación supervisa el uso del teclado y el ratón y, con esta información, avisa con frecuencia para que tome microinterrupciones, descansos y restringe el uso diario de la computadora.

Y para una mejor integración con el escritorio Plasma existe Workrave applet, el plasmoide que se integra con el entorno de trabajo y te permite configurar todos sus parámetros.

Workrave applet- Plasmoides de KDE (154)

Se trata de un trabajo de wojnilowicz y necesita tener instalado, como no podía ser de otra forma, la aplicación workrave (que para KDE Neon se puede realizar directamente desde Discover)

Workrave applet- Plasmoides de KDE (154)

Y como siempre digo, si os gusta el plasmoide podéis “pagarlo” de muchas formas en la nueva página de KDE Store, que estoy seguro que el desarrollador lo agradecerá: puntúale positivamente, hazle un comentario en la página o realiza una donación. Ayudar al desarrollo del Software Libre también se hace simplemente dando las gracias, ayuda mucho más de lo que os podéis imaginar, recordad la campaña I love Free Software Day 2017 de la Free Software Foundation donde se nos recordaba esta forma tan sencilla de colaborar con el gran proyecto del Software Libre y que en el blog dedicamos un artículo.

Más información: KDE Store

¿Qué son los plasmoides?

Para los no iniciados en el blog, quizás la palabra plasmoide le suene un poco rara pero no es mas que el nombre que reciben los widgets para el escritorio Plasma de KDE.

En otras palabras, los plasmoides no son más que pequeñas aplicaciones que puestas sobre el escritorio o sobre una de las barras de tareas del mismo aumentan las funcionalidades del mismo o simplemente lo decoran.

a silhouette of a person's head and shoulders, used as a default avatar

A little rant about talent

It’s become less common to hear people referred to as “resources” in recent times. There’s more trendy “official vocab guidelines”, but what’s really changed? There’s still phrases in common use that sound good but betray the same mindset.

I often hear people striving to hire and retain the best talent as if that is a strategy for success, or as if talent is a limited resource we must fight over. 

Another common one is to describe employees as your “greatest asset”.

I’d like to believe both phrases come from the good intentions of valuing people. Valuing individuals as per the agile manifesto. I think these phrases betray a lack of consideration of the “…and  interactions”

The implication is organisations are in a battle to win and then protect as big a chunk as they can of a finite resource called “talent”. It’s positioned as a zero-sum game. There’s an implication that the impact of an organisation is a pure function of the “talent” it has accumulated. 

People are not Talent. An organisation can amplify or stifle the brilliance of people. It can grow skills or curtail talent.

Talent is not skill. Talent gets you so far but skills can be grown. Does the team take the output that the people in it have the skill to produce? Or does the team provide an environment in which everyone can increase their skills and get more done than they could alone? 

We might hire the people with the most pre-existing talent, and achieve nothing if we stifle them with a bureaucracy that prevents them from getting anything done. Organizational scar tissue that gets in the way; policies that demotivate.  

Even without the weight of bureaucracy many teams are really just collections of individuals with a common manager. The outcomes of such groups are limited by the talent and preexisting skill of the people in them. 

Contrast this with a team into which you can hire brilliant people who’ve yet to have the opportunity of being part of a team that grows them into highly skilled individuals. A team that gives everyone space to learn, provides challenges to stretch everyone, provides an environment where it’s safe to fail. Teams that have practices and habits that enable them to achieve great things despite the fallibility and limitations of the talent of each of the people in the team. 

“when you are a Bear of Very Little Brain, and you Think of Things, you find sometimes that a Thing which seemed very Thingish inside you is quite different when it gets out into the open and has other people looking at it.”—AA Milne 

While I’m a bear of very little brain, I’ve had the opportunity to be part of great teams that have taught me habits that help me achieve more than I can alone.

Habits like giving and receiving feedback. Like working together to balance each others weaknesses and learn from each other faster. Like making predictions and observing the results. Like investing in keeping things simple so they can fit into my brain. Like working in small steps. Like scheduled reflection points to consider how to improve how we’re working. Like occasionally throwing away the rules and seeing what happens.

Habits like thinking less and sensing more. 

The post A little rant about talent appeared first on Benji's Blog.

a silhouette of a person's head and shoulders, used as a default avatar

Fun with Java Records

A while back I promised to follow up from this tweet to elaborate on the fun I was having with Java’s new Records (currently preview) feature.

Records, like lambdas and default methods on interfaces are tremendously useful language features because they enable many different patterns and uses beyond the obvious.

Java 8 brought lambdas, with lots of compelling uses for streams. What I found exciting at the time was that for the first time lots of things that we’d previously have to have waited for as new language features could become library features. While waiting for lambdas we had a Java 7 release with try-with-resources. If we’d had lambdas we could have implemented something similar in a library without needing a language change.

There’s often lots one can do with a bit of creativity. Even if Brian Goetz does sometimes spoil one’s fun ¬_¬

https://twitter.com/nipafx/status/1028979167591890944

Records are another such exciting addition to Java. They provide a missing feature that’s hard to correct for in libraries due to sensible limitations on other features (e.g. default methods on interfaces not being able to override equals/hashcode)

Here’s a few things that records help us do that would otherwise wait indefinitely to appear in the core language.


Implicitly Implement (Forwarding) Interfaces

Java 8 gave us default methods on interfaces. These allowed us to mix together behaviour defined in multiple interfaces. One use of this is to avoid having to re-implement all of a large interface if you just want to add a new method to an existing type. For example, adding a .map(f) method to List. I called this the Forwarding Interface pattern.

Using forwarding interface still left us with a fair amount of boilerplate, just to delegate to a concrete implementation. Here’s a MappableList definition using a ForwardingList.

class MappableList implements List, ForwardingList, Mappable {
   private List impl;

   public MappableList(List impl) {
       this.impl = impl;
   }

   @Override
   public List impl() {
       return impl;
   }
}

The map(f) implementation is defined in Mappable<T> and the List<T> implementation is defined in ForwardingList<T>. All the body of MappableList<T> is boilerplate to delegate to a given List<T> implementation.

We can improve on this a bit using anonymous types thanks to Jdk 10’s var. We don’t have to define MappableList<T> at all. We can define it inline with intersection casts and structural equivalence with a lambda that returns the delegate type.

var y = (IsA> & Mappable & FlatMappable & Joinable)
    () -> List.of("Anonymous", "Types");

Full implementation

This is probably a bit obscure for most people. Intersection casts aren’t commonly used. You’d also have to define your desired “mix” of behaviours at each usage site.

Records give us a better option. The implementation of a record definition can implicitly implement the boilerplate in the above MappableList definition

public record EnhancedList(List inner) implements
       ForwardingList,
       Mappable,
       Filterable>,
       Groupable {}

interface ForwardingList extends List, Forwarding> {
   List inner();
   //…
}

Here we have defined a record with a single field named “inner“. This automatically defines a getter called inner() which implicitly implements the inner() method on ForwardingList. None of the boilerplate on the above MappableList is needed. Here’s the full code. Here’s an example using it to map over a list.

Decomposing Records

Let’s define a Colour record

public record Colour(int red, int green, int blue) {}

This is nice and concise. However, what if we want to get the constituent parts back out again.

Colour colour = new Colour(1,2,3);
var r = colour.red();
var g = colour.green();
var b = colour.blue();
assertEquals(1, r.intValue());
assertEquals(2, g.intValue());
assertEquals(3, b.intValue());

Can we do better? How close can we get to object destructuring?

How about this.

Colour colour = new Colour(1,2,3);

colour.decompose((r,g,b) -> {
   assertEquals(1, r.intValue());
   assertEquals(2, g.intValue());
   assertEquals(3, b.intValue());
});

How can we implement this in a way that requires minimal boilerplate? Default methods on interfaces come to the rescue again. What if we could get any of this additional sugary goodness on any record, simply by implementing an interface.

public record Colour(int red, int green, int blue) 
   implements TriTuple {}

Here we’re making our Colour record implement an interface so it can inherit behaviour from that interface.

Let’s make it work…

We’re passing the decompose method a lambda function that accepts three values. We want the implementation to invoke the lambda and pass our constituent values in the record (red, green, blue) as arguments when invoked.

Firstly let’s declare a default method in our TriTuple interface that accepts a lambda with the right signature.

interface TriTuple,T,U,V>
    default void decompose(TriConsumer withComponents) {
   	//
    }
}

Next we need a way of extracting the component parts of the record. Fortunately Java allows for this. There’s a new method Class::getRecordComponents that gives us an array of the constituent parts.

This lets us extract each of the three parts of the record and pass to the lambda.

var components = this.getClass().getRecordComponents();
return withComponents.apply(
    (T) components[0].getAccessor().invoke(this),
    (U) components[1].getAccessor().invoke(this),
    (V) components[2].getAccessor().invoke(this)
);

There’s some tidying we can do, but the above works. A very similar implementation would allow us to return a result built with the component parts of the record as well.

Colour colour = new Colour(1,2,3);
var sum = colour.decomposeTo((r,g,b) -> r+g+b);
assertEquals(6, sum.intValue());

Structural Conversion

Sometimes the types get in the way of people doing what they want to do with the data. However wrong it may be ¬_¬

Let’s see if we can allow people to convert between Colours and Towns

public record Person(String name, int age, double height) 
    implements TriTuple {}
public record Town(int population, int altitude, int established)
    implements TriTuple { }


Colour colour = new Colour(1, 2, 3);
Town town = colour.to(Town::new);
assertEquals(1, town.population());
assertEquals(2, town.altitude());
assertEquals(3, town.established());

How to implement the “to(..)” method? We’ve already done it! It’s accepting a method reference to Town’s constructor. This is the same signature and implementation of our decomposeTo method above. So we can just alias it.

default > R to(TriFunction ctor) {
   return decomposeTo(ctor);
}

Replace Property

We’ve now got a nice TriTuple utility interface allowing us to extend the capabilities that tri-records have.

Another nice feature would be to create a new record with just one property changed. Imagine we’re mixing paint and we want a variant on an existing shade. We could just add more of one colour, not start from scratch.

Colour colour = new Colour(1,2,3);
Colour changed = colour.with(Colour::red, 5);
assertEquals(new Colour(5,2,3), changed);

We’re passing the .with(..) method a method reference to the property we want to change, as well as the new value. How can we implement .with(..) ? How can it know that the passed method reference refers to the first component value?

We can in fact match by name.

The RecordComponent type from the standard library that we used above can give us the name of each component of the record.

We can get the name of the passed method reference by using a functional interface that extends from Serializable. This lets us access the name of the method the lambda is invoking. In this case giving us back the name “red”

default  TRecord with(MethodAwareFunction prop, R newValue) { 
    //
}

MethodAwareFunction extends another utility interface MethodFinder which provides us access to the Method invoked and from there, the name.

The last challenge is reflectively accessing the constructor of the type we’re trying to create. Fortunately we’re passing the type information to our utility interface at declaration time

public record Colour(int red, int green, int blue)
    implements TriTuple {}

We want the Colour constructor. We can get it from Colour.class. We can get this by reflectively accessing the first type parameter of the TriTuple interface. Using Class::getGenericInterfaces() then ParameterizedType::getActualTypeArguments() and taking the first to get a Class<Colour>

Here’s a full implementation.

Automatic Builders

We can extend the above to have some similarities with the builder pattern, without having to create a builder manually each time.

We’ve already got our .with(namedProperty, value) method to build a record step by step. All we need is a way of creating a record with default values that we can replace with our desired values one at a time.

Person sam = builder(Person::new)
   .with(Person::name, "Sam")
   .with(Person::age, 34)
   .with(Person::height, 83.2);

assertEquals(new Person("Sam", 34, 83.2), sam);

static > TBuild builder(Class cls) {
    //
}

This static builder method invokes the passed constructor reference passing it appropriate default values. We’ll use the same SerializedLambda technique from above to access the appropriate argument types.

static > TBuild builder(MethodAwareTriFunction ctor) {
   var reflectedConstructor = ctor.getContainingClass().getConstructors()[0];
   var defaultConstructorValues = Stream.of(reflectedConstructor.getParameterTypes())
           .map(defaultValues::get)
           .collect(toList());
   return ctor.apply(
       (T)defaultConstructorValues.get(0),
       (U)defaultConstructorValues.get(1),
       (V)defaultConstructorValues.get(2)
   );
}

Once we’ve invoked the constructor with default values we can re-use the .with(prop,value) method we created above to build a record up one value at a time.

Example Usage

public record Colour(int red, int green, int blue) 
    implements TriTuple {}

public record Person(String name, int age, double height) 
    implements TriTuple {}

public record Town(int population, int altitude, int established) 
    implements TriTuple {}

public record EnhancedList(List inner) implements
    ForwardingList,
    Mappable {}

@Test
public void map() {
    var mappable = new EnhancedList<>(List.of("one", "two"));

    assertEquals(
        List.of("oneone", "twotwo"),
        mappable.map(s -> s + s)
    );
}

@Test
public void decomposable_record() {
   Colour colour = new Colour(1,2,3);

   colour.decompose((r,g,b) -> {
       assertEquals(1, r.intValue());
       assertEquals(2, g.intValue());
       assertEquals(3, b.intValue());
   });

   var sum = colour.decomposeTo((r,g,b) -> r+g+b);
   assertEquals(6, sum.intValue());
}

@Test
public void structural_convert() {
   Colour colour = new Colour(1, 2, 3);
   Town town = colour.to(Town::new);
   assertEquals(1, town.population());
   assertEquals(2, town.altitude());
   assertEquals(3, town.established());
}

@Test
public void replace_property() {
   Colour colour = new Colour(1,2,3);
   Colour changed = colour.with(Colour::red, 5);
   assertEquals(new Colour(5,2,3), changed);

   Person p1 = new Person("Leslie", 12, 48.3);
   Person p2 = p1.with(Person::name, "Beverly");
   assertEquals(new Person("Beverly", 12, 48.3), p2);
}

@Test
public void auto_builders() {
   Person sam = builder(Person::new)
           .with(Person::name, "Sam")
           .with(Person::age, 34)
           .with(Person::height, 83.2);

   assertEquals(new Person("Sam", 34, 83.2), sam);
}

Code is all in this test and this other test. Supporting records with arities other than 3 is left as an exercise to the reader ¬_¬

The post Fun with Java Records appeared first on Benji's Blog.

a silhouette of a person's head and shoulders, used as a default avatar

Nuevo fondo de pantalla para Plasma 5.20

Los fondos de pantalla son la carta de presentación de cualquier escritorio, siendo foco de odios y amores, y Plasma no es una excepción, aunque hay que reconocer que mucho usuarios sea lo primero que cambian cuando se instalan su sistema operativo o cambian de móvil. No obstante, me complace presentar el nuevo fondo de pantalla para Plasma 5.20. Además, y siguiendo con la tradición que inicié hace unos cuantos lanzamientos, he preparado un histórico de los otros wallpapers que ha disfrutado Plasma 5. Espero que os guste tanto como a mi me ha gustado ampliar esta entrada.

Nuevo fondo de pantalla para Plasma 5.20

En esta ocasión no ha habido concurso pero si tenemos una excelente creación de Lucas Andrade que sigue con figuras geométricas y con colores vivos y luminosos. Por cierto, me he enterado siguiendo el gran blog de Nate Graham.

Nuevo fondo de pantalla para Plasma 5.20

Los fondos de pantalla de Plasma 5

Es el momento de echar un vistazo al pasado y realizar una compilación de los fondos de pantalla que el equipo de diseño de la Comunidad KDE (KVDG) nos ha ido ofreciendo en los lanzamientos mayores del escritorio Plasma.

Veamos las grandes creaciones para Plasma en versión reducida, aunque pinchando en ellos podrás obtener una versión de mayor tamaño, y al final del artículo tendrás el enlace a la carpeta virtual donde están todos en varios tamaños.

Plasma 5.0

Fue Nuno Pinheiro, el veterano diseñador de la Comunidad KDE y responsable del aspecto visual de KDE 4, el encargado de iniciar la serie con un fondo de pantalla elegante en tonos pastel. Fue una excelente tarjeta de presentación durante el primer año de existencia del entorno de trabajo más moderno y avanzado del mercado, asentando la idea visual inicial de colores y triángulos como base de los diseños, aunque fue una idea que ha ido evolucionando a lo largo de tiempo.

Plasma 5.0 de Nuno Pinheiro_600

Plasma 5.2

Para la primera revisión anual de Plasma nos obsequiaron con «Vibrant», un  fondo de pantalla que seguía la estética triangular iniciada por Nuno pero añadía colores más vivos. Empieza la era de Ken Vermette, el diseñador que ha tomado las riendas de los fondos de pantalla oficiales de Plasma 5 y nos está proporcionado grandes lienzos.

Plasma 5.3

El orden empezó a perderse con la nueva versión del fondo de pantalla para Plasma 5.3 llamado «Deep» . De nuevo formas triangulares y colores todavía más vivos en un precioso diseño de Ken Vermette. Se intuye la evolución hacia un diseño ligeramente 3D ya que los triángulos empiezan a superponerse y a crearse sombras.

Plasma 5.3 Deep de Ken Vermette_600

Plasma 5.4

«Horizon»  fue el nombre elegido para el siguiente fondo de pantalla, que continúa con los triángulos de colores vivos pero en los que se muestra las primeras deformaciones. Si se observa bien, el título viene definido por la línea del horizonte que separa las dos superficies. Sigue subiendo la variedad de colores.

Plasma 5.4 Horizon Ken Vermette_600

Plasma 5.5

Para el lanzamiento de la quinta versión de Plasma se siguió evolucionando y se dio otra vuelta de tuerca más a la idea inicial. Seguimos con una base de triángulos pero ahora con una deformación que le da un aspecto 3D, con la aparición de una textura que cogerá protagonismo en las próximas versiones. Así se consigue un tema precioso y colorido que Ken tituló como «Event Night” y que fue lanzado con otros dos: «Event day” y “Pastel Hills”.

Plasma 5.5 Event de Ken Vermette_600

Más información: Ken Vermette – Spooky Scary Post-Halloween Monster Post

Plasma 5.6

«Graphite», el sexto fondo de la serie,  es un tema que «aparta» los triángulos a un segundo plano, quedando en un primer las grandes superficies de colores fuertes pero sobrios. Otro excelente fondo que simboliza la transición entre los dos estilos que conviven en esta serie de fondos de pantalla.

Plasma 5.6 Graphite de Ken Vermette_600

Plasma 5.7

Cambio de tercio. Los triángulos dejaron de ser protagonistas aunque siguen apareciendo en el diseño de este fondo de pantalla llamado “Skylight”. Ahora los colores vivos pero sobrios son los  predominantes en el penúltimo fondo de pantalla oficial de Ken para Plasma 5.

Plasma 5.7 Skylight de Ken Vermette_600

Más información: Ken Vermette – That Time of the Cycle

Plasma 5.8

Ken Vermette nos presentó el noveno fondo de pantalla oficial para el escritorio Plasma 5.8. Un fondo llamado «Bizmuth» que sigue con las formas abstractas geométricas, con centenares de triángulos y colores vivos pero que incorpora curvas. Un soplo de aire precioso para la primera versión de largo soporte de Plasma que además venía con la novedad de ser el primer fondo de pantalla con resolución 4K UHD.

Nuevo fondo de pantalla para Plasma 5.8

Más información: Ken Vermette – Queueing up for Plasma 5.8

Plasma 5.9

Para la siguiente versión siguió Ken Vermette presentándonos unos espectaculares fondos de pantalla para Plasma 5. En esta ocasión lo llamo «Canopee» y sigue con formas abstractas geométricas, con centenares de triángulos y paralelepípedos, donde dominan los colores azul y verde, con una cinta marrón y toques amarillos.

Un fondo de pantalla menos vistoso pero un poco más sobrio que el anterior. Espero que os guste tanto como a mi. Lo cierto es que me estoy aficionando a este tipo de fondos. Podéis pinchar en la imagen inferior para descargaros el nuevo fondo de pantalla para Plasma 5.9.

Nuevo fondo de pantalla para Plasma 5.9

Por si tenéis curiosidad en el proceso de creación de Canopee os recomiendo que os leáis la entrada que ha escrito el mismo Ken Vermette – Plasma 5.9 Wallpaper “Canopee” donde relata con pelo y señales el nacimiento del mismo.

Plasma 5.10

Y siguió el gran Ken Vermette presentándonos unos espectaculares fondos de pantalla para Plasma 5. En esta ocasión lo llamó «Cascade», y continua con las forma de «Canopee» en su parte derecha pero que presenta una más que interesante ola casi plana azulada en su parte izquierda. Personalmente me recuerda a la transición entre corteza continental a oceánica, con su plataforma continental y su talud.

Nuevo fondo de pantalla para Plasma 5.10

Más información y descarga: Store.kde

Plasma 5.11

«Opal» fue el nombre con el que Ken Vermette bautizó el  fondo de pantalla para Plasma 5.11. Un fondo que seguía con formas geométricas y colores apastelados pero que se desmarca de los anteriores por la elección de un tono mucho más oscuro en la composición. Podéis leer parte de las impresiones de Ken en la entrada de su blog donde presenta el fondo.

Nuevo fondo de pantalla para Plasma 5.11

Puedes descargar el fondo de pantalla «Opal» para casi cualquier resolución que desees desde este enlace.

Plasma 5.13

En esta ocasión Kens lo bautizó con el nombre de «Kokkini» y viene a querer representar una playa roja que hay en Grecia, pero pasada por el filtro habitual de la gama de wallpapers de la serie Plasma 5:

Nuevo fondo de pantalla para Plasma 5.13

Más información y descarga: Opendesktop

Plasma 5.14

Siguió Ken Vermette con los fondos de pantalla, aunque en esta ocasión la versión presentada sufrió una modificación debido a la reacción de la Comunidad. Ya en una primera impresión «Cluster» parecía un fondo muy soso, ya que simbolizaba un cielo encapotado a base de capas de nubes hexagonales de colores rosaceos muy pastelosos, así que en su segunda versión se cambió esa característica y nos dejó un fondo de pantalla mucho más vivo.

Plasma 5.16

Llegamos a un punto y aparte ya que la selección del mismo se realizó mediante concurso público donde participaron un numeroso grupo de artistas y en el que los miembros de KVDG tuvieron la complicada tarea de elegir al ganador.

El ganado fue «Ice Cold» de Santiago Cézar que se llevó el honor de representar a la Comunidad KDE con un fondo de pantalla con motivos geométricos y de un azul gélido, y además, un portátil Slimbook.

Plasma 5.18

Siguiendo la senda del anterior, el fondo de pantalla de Plasma 5.18 fue el resultado de un concurso público, y el ganador fue Volna, de Nikita Babin un fondo que seguia con los motivos geométricos pero que en esta ocasión representando un paisaje de playa y mar poco profundo.

En definitiva, espero que os haya gustado este recorrido por los wallpapers de Plasma tanto como a mi. Por cierto, si queréis descargarlos para casi cualquier resolución os dejo el siguiente enlace que me ha proporcionado el mismo Ken Vermetten.

a silhouette of a person's head and shoulders, used as a default avatar

Battery Charge Thresholds dan Power Management di openSUSE dengan TLP

Baterai termasuk elemen penting dalam keberlangsungan pekerja remot. Dan sudah selayaknya mendapat perlakuan khusus untuk memperpanjang usia pakai. Salah satunya dengan mengatur Battery Charge Thesholds.

Battery Charge Thesholds adalah mekanisme pemutusan pengecasan sebelum benar-benar penuh dan menyambung kembali ketika sudah mulai kosong. Dengan tidak pernah mengisi daya baterai hingga 100% kan membuat usia pakai baterai lebih lama. Secara teorinya alurnya seperti ini. Putuskan pengisian daya, jika kapasitas baterai sudah 85% dan kembali isi jika baterai sudah 75%. Nilai persen ini bisa kita atur sesuai keinginan.

START_CHARGE_THRESH_BAT0="75"
STOP_CHARGE_THRESH_BAT0="85"

START_CHARGE_THRESH_BAT1="75"
STOP_CHARGE_THRESH_BAT1="85"

Fitur Power Management ini cukup lengkap ketika menggunakan ThinkVantage di Sistem Operasi Windows. Jelas, ThinkVantage merupakah fitur khas di jajaran laptop kelas atas Thinkpad. Termasuk Thinkpad X230 yang saya miliki. Tapi perangkat lunak dari ThinkVantage tidak tersedia di sistem operasi GNU/Linux. Jadi ya kudu pake cara lain.

Salah satu aplikasi yang bisa melakukan tugas pengaturan Battery Charge Thresholds adalah TLP. Perangkat lunak ini sudah tersedia di beberapa lumbung distribusi GNU/Linux. Dulu saya menggunakan ini sejak di Slackware, BlankOn, hingga kini openSUSE.

Instalasi TPL

Merujuk pada situs resmi TLP pada tautan https://linrunner.de/tlp/, langkah instalasinya dan menjalankannya cukup mudah. Berikut stepnya:

sudo zypper in tlp-rdw
sudo systemctl enable tlp

Konfigurasi TPL

Konfigurasi TLP dilakukna dengan mengubah-suai berkas TLP pada alamat: /etc/tlp.conf. Silahkan gunakan editor teks favorit anda. Berikut konfigurasi yang saya lakukan:

--- TLP 1.3.1 --------------------------------------------
+++ Configured Settings:
/etc/tlp.conf L0026: TLP_ENABLE="1"
/etc/tlp.conf L0038: TLP_PERSISTENT_DEFAULT="0"
/etc/tlp.conf L0050: DISK_IDLE_SECS_ON_AC="0"
/etc/tlp.conf L0051: DISK_IDLE_SECS_ON_BAT="2"
/etc/tlp.conf L0056: MAX_LOST_WORK_SECS_ON_AC="15"
/etc/tlp.conf L0057: MAX_LOST_WORK_SECS_ON_BAT="60"
/etc/tlp.conf L0100: CPU_ENERGY_PERF_POLICY_ON_AC="balance_performance"
/etc/tlp.conf L0101: CPU_ENERGY_PERF_POLICY_ON_BAT="balance_power"
/etc/tlp.conf L0128: SCHED_POWERSAVE_ON_AC="0"
/etc/tlp.conf L0129: SCHED_POWERSAVE_ON_BAT="1"
/etc/tlp.conf L0135: NMI_WATCHDOG="0"
/etc/tlp.conf L0150: DISK_DEVICES="sda"
/etc/tlp.conf L0158: DISK_APM_LEVEL_ON_AC="254 254"
/etc/tlp.conf L0159: DISK_APM_LEVEL_ON_BAT="128 128"
/etc/tlp.conf L0198: SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance"
/etc/tlp.conf L0199: SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
/etc/tlp.conf L0219: AHCI_RUNTIME_PM_TIMEOUT="15"
/etc/tlp.conf L0264: WIFI_PWR_ON_AC="off"
/etc/tlp.conf L0265: WIFI_PWR_ON_BAT="on"
/etc/tlp.conf L0270: WOL_DISABLE="Y"
/etc/tlp.conf L0276: SOUND_POWER_SAVE_ON_AC="0"
/etc/tlp.conf L0277: SOUND_POWER_SAVE_ON_BAT="1"
/etc/tlp.conf L0283: SOUND_POWER_SAVE_CONTROLLER="Y"
/etc/tlp.conf L0291: BAY_POWEROFF_ON_AC="0"
/etc/tlp.conf L0292: BAY_POWEROFF_ON_BAT="0"
/etc/tlp.conf L0302: RUNTIME_PM_ON_AC="on"
/etc/tlp.conf L0303: RUNTIME_PM_ON_BAT="auto"
/etc/tlp.conf L0323: USB_AUTOSUSPEND="1"
/etc/tlp.conf L0342: USB_BLACKLIST_PHONE="0"
/etc/tlp.conf L0354: USB_BLACKLIST_WWAN="0"
/etc/tlp.conf L0374: RESTORE_DEVICE_STATE_ON_STARTUP="0"
/etc/tlp.conf L0442: NATACPI_ENABLE="1"
/etc/tlp.conf L0443: TPACPI_ENABLE="1"
/etc/tlp.conf L0444: TPSMAPI_ENABLE="1"
/etc/tlp.conf L0032: TLP_DEFAULT_MODE="AC"
/etc/tlp.conf L0076: CPU_SCALING_GOVERNOR_ON_AC="powersave"
/etc/tlp.conf L0077: CPU_SCALING_GOVERNOR_ON_BAT="powersave"
/etc/tlp.conf L0425: START_CHARGE_THRESH_BAT0="80"
/etc/tlp.conf L0426: STOP_CHARGE_THRESH_BAT0="90"
/etc/tlp.conf L0431: START_CHARGE_THRESH_BAT1="80"
/etc/tlp.conf L0432: STOP_CHARGE_THRESH_BAT1="90"

Menjalankan TLP

Setelah melakukan konfigurasi secukupnya, TLP siap dijalankan

sudo systemctl restart tlp
sudo tlp start #untuk memulai tlp
sudo tlp-stat -s #untuk menampilkan status tlp
sudo tlp-stat -c #untuk melihat konfigurasi apa yang berjalan

TLP UI

Update: Ternyata ada yang nulis antarmuka TLP dengan GTK (GNOME). Cara pasang bisa merujuk ke https://github.com/d4nj1/TLPUI. Saya tidak memasang TLP UI karena lagi pakai KDE.

Bahan Bacaan:

  1. https://www.tecmint.com/tlp-increase-and-optimize-linux-battery-life/

Cukup. Semoga bermanfaat.
Estu~

the avatar of Martin de Boer

Rethinking Security on Linux: evaluating Antivirus & Password Manager solutions

Hacked!

Recently I had an experience that let me re-evaluate my approach to Security on Linux. I had updated my Desktop computer to the latest openSUSE Leap (15.2) version. I also installed the proprietary Nvidia drivers. At random points during the day I experienced a freeze of my KDE desktop. I cannot move my mouse or type on my keyboard. It probably involves Firefox, because I always have Firefox open during these moments. So for a couple of days, I try to see in my logs what is going on. In /var/log/messages (there is a very nice YaST module for that) you can see the latest messages.

Suddenly I see messages that I cannot explain. Below, I have copied some sample log lines that give you an impression of what was happening. I have excluded the lines with personal information. But to give you an impression: I could read line for line the names, surnames, addresses and e-mail addresses of all my family members in the /var/log/messsages file. I thought I was being hacked!

2020-09-04T11:01:48.001457+02:00 linux-910h kdeinit5[8884]: calligra.lib.store: Opening for reading "Thumbnails/thumbnail.png"
2020-09-04T11:01:48.002502+02:00 linux-910h kdeinit5[8884]: calligra.lib.store: Closing
....
2020-09-04T11:01:50.884670+02:00 linux-910h kdeinit5[8884]: calligra.lib.main: virtual bool KoDocument::openUrl(const QUrl&) url= "file:///home/username/Documents/Address list of my family.xls"
....
2020-09-04T11:01:52.571006+02:00 linux-910h kdeinit5[8884]: calligra.filter.msooxml: File "/xl/workbook.xml" loaded and parsed.
2020-09-04T11:01:52.571056+02:00 linux-910h kdeinit5[8884]: calligra.lib.store: opening for writing "content.xml"
2020-09-04T11:01:52.571080+02:00 linux-910h kdeinit5[8884]: calligra.lib.store: Closing
2020-09-04T11:01:52.571105+02:00 linux-910h kdeinit5[8884]: calligra.lib.store: Wrote file "content.xml" into ZIP archive. size 72466

I took immediate action, to prevent my PC from sharing more information over the internet:

  1. I unplugged the internet.
  2. I changed my root password and my user password.
  3. I blocked all external access via YaST Firewall
  4. I de-installed the Calligra suite.
  5. I informed my family (via my laptop) that I might have been hacked.
  6. I informed my work (via my laptop) that I might have been hacked.

I needed to find out what was happening. I needed to know if a trojan / mallware was trying to steal my personal information. So I tried searching for the ZIP archive which was referenced. This might still be stored somewhere on my PC. I used KFind to lookup all files which were created in the last 8 hours. And then I found a lot of thumbnail files which were created by… Gwenview. Stored in a temp folder.

I started to realize that it might not be a hack, but something that was rendering previews, just like in Gwenview. I checked Dolphin and detected that I had the preview function enabled. I checked the log files again. Indeed, whenever I had opened a folder with Dolphin, all Word and Excel files in that folder were ‘processed’. I browsed several folders after deleting Calligra and there were no more log lines added. I re-installed the Calligra suite and noticed the calligra-extras-dolphin package. I browsed the same folders and indeed, the log lines started appearing all over again. I had found the culprit. It wasn’t a hack.

The Dolphin plugin ‘calligra-extras-dolphin’ generates previews for Microsoft Office files. And only for Microsoft Office files. I wasn’t aware that this was happening. In Dolphin I had the preview function enabled. However, I didn’t see the previews in Dolphin, because I used the ‘Details view mode’. So while I browsed my Downloads and Documents folders, this plugin started rendering previews for my Word and Excel files. The only Word and Excel files that I have on my PC are send by my family and my friends, because I save everything in ODF. Two of these files contained the addresses of my family members. Possibly these operations also happen for all ODF preview files. But they are not logged in /var/log/messages. The Calligra plugin does log everything in there.

Rethinking Security on Linux

This incident forced me to rethink my security. I didn’t have a virus scanner installed. I knew that not many viruses were aimed at Linux. And the ones that are aimed at Linux systems mostly target WordPress (or other popular server software). I don’t download files from unknown sources.

This was true for my personal use. But because of Covid-19, I am forced to work from home. And as an IT architect, I evaluate a lot of software. To learn more about commercial software offerings, I request a lot of whitepapers. So in the last 6 months I actually did download a lot of PDF files from unknown sources. Also on my Linux system.

I was already on the verge of using a password manager. However, the thought of needing to change over 100 passwords, caused me to wait for ‘the right time’. And waited I did, because I was contemplating the use of a password manager for over 2 years. Now was the time to change. I decided to look for solutions that were native to Linux.

Searching for a Linux antivirus solution

I have used ClamAV in the past. I remembered that I didn’t like the user interface. However that was years ago. Maybe now it looks better. I opened YaST and installed ClamAV and the ClamTK GUI. I opened the application and… this still wasn’t for me. The software might be amazing, don’t get me wrong. But I didn’t like the look and feel.

Which led me to look for commercial alternatives. When searching on Google, it seams that there are quite a few virus scanners that work natively on Linux.

When you start to look into it in more detail, most of that information is very dated. Comodo is still selling Linux Antivirus, but hasn’t updated their solution in years. They only support older distributions and it doesn’t look that they will support newer Linux distributions in the future. F-Prot has stopped selling Antivirus for Linux and will end their support in 2021. AVG has stopped their Linux support already.

Sophos, Bitdefender, F-Secure and Kaspersky are still offering solutions for Linux, but not aimed at home users. They are targeted at businesses, running Linux on the server.

So the only option for home users is ESET NOD32 Antivirus 4 Linux. This is serving both as an antivirus and as an antimallware software. It has good documentation. The GUI is very user friendly. I like that there are various predefined scans that you can execute directly. I purchased a license for my Desktop and Laptop for 3 years for 60 euros. Which I feel is a very reasonable price.

Choosing a password manager

I already used Mozilla Firefox to save/prefill my passwords. I have secured my browser with a Master password. This solution changed into Mozilla Lockwise, which also added the Android app. Because I also use Firefox on my Android phone, the Mozilla Lockwise solution was sufficient to sync all my passwords across my devices. However, it falls short compared with the features of a true password manager. I first needed to know what I would be looking for. My personal criteria:

  • Cloud hosted (centralized storage of passwords)
  • Offers a Web interface
  • Offers a Linux client
  • Offers a Firefox plugin
  • Offers an Android app
  • User friendly interface
  • Secure / trusted by the community
  • Has Multi Factor Authentication
  • Is preferably open source
  • Easy to import Firefox/Chrome saved passwords

I have looked at the following alternatives:

  1. LastPass
  2. 1Password
  3. Dashlane
  4. Passbolt
  5. KeePassXC
  6. Bitwarden

LastPass is a very good password manager that has been around for a while. It has a command-line client for Linux, which is very cool. Of course they offer a web interface. Furthermore they offer GUI clients for Windows, MacOS, Android and iOS. Unfortunately there is no GUI for Linux. They offer plugins for Firefox, Chrome, Opera, Safari and Edge. They have a free tier that is good for personal use across your devices. And if you go premium, you pay $2,90 / month. The only negative that I can think of is that it is not open source software.

1Password is the biggest competitor to LastPass. They also have a command-line client for Linux, which is a big plus. They also offer a web interface. They have GUI clients for Windows, MacOS, Android and iOS. And (like LastPass) unfortunately no Linux GUI client. They have plugins for Firefox, Chrome, Brave, Safari and Edge. And they are (also) not open source. The pricing is less appealing than LastPass, since there is no free tier. You start paying $3 / month after 30 days of free trial. Therefore I would choose LastPass over 1Password.

Dashlane is a competitor to LastPass and 1Password. They don’t have a Linux client. Of course they offer a web interface. And they have clients for Windows, MacOS, Android and iOS. They offer plugins for Firefox, Chrome, Edge and Safari. They are not open source. And I don’t like their pricing structure. The free tier is limited to 1 device, which is a big NO for me. You can only save 50 free passwords. That means that if you go with Dashlane, you might avoid storing certain passwords in your password manager in order not to pay for their premium service. Which is exactly the opposite of what a password manager is trying to accomplish. I would avoid this one.

Passbolt is interesting. Its an open source password manager that offers a self-hosted option. Which is very cool, making it centrally / cloud hosted. However, they do not offer local clients at all. Everything is browser based. They do have Firefox and Chrome plugins. This password manager is very interesting for development teams or webmaster teams. You can put all your passwords in a central place in a trusted application. You can host it yourself on AWS or Azure or on a VPS provider of choice. They are located in Luxembourg, which is good because its in the EU. Passbolt is very much aimed at businesses. I don’t think it is great as a personal password manager.

KeePassXC is a local password manager. The application is available on Linux, Windows and MacOS. Or you can use the Android Client Keepass2Android. There are plugins for Firefox and Chrome. You need to do some work if you want to use your passwords across multiple devices. You can save you database to Google Drive or Dropbox. Or you can use an application like Syncthing to sync your database. The architecture of this password manager is decentral by default. If you want maximum privacy, go for this option. This one is not for me. I like to have a centrally managed cloud solution.

If someone would combine the strenghts of Passbolt and KeepassXC, I feel this combination would gain a lot of traction in the Linux and Open Source world. But that is a pipe dream for now. The solution that I have chosen, might be just as appealing to the open source community.

Bitwarden is the password manager that I have decided to use. It meets all my criteria. It provides me with the ease of use of a centrally managed solution. But its still an open source solution. Best of all, they offer a Linux GUI client. Furthermore they have GUI clients for Windows, MacOS, Android and iOS. They offer plenty of browser plugins: for Firefox, Chrome, Opera, Vivaldi, Brave, Tor Browser, Edge and Safari. They have command line applications for Linux, Windows, MacOS and even offer an NPM package. I love their pricing structure. Their free tier is probably all that you need. You can sync across all your devices and there is no limit on the number of passwords that you can store. However, they also offer a premium tier for just $10 / year. I decided to go for the payed option, to keep them in business.

Conclusion

Linux is a very secure operating system. But security is always a moving target. You can make your Linux system more secure by limiting user permissions, by configuring the firewall, by configuring AppArmor, by sandboxing applications and by making lower level changes (YaST Security Center).

The solutions mentioned in this article do something different, they improve your online security. By preventing viruses and mallware from running on your system. And by making sure that your passwords are always random, strong and unique for each site. The mentioned solutions are simple ways for everyone to up their security game. I hope my evaluation of these solutions helps other Linux users to become safer online.

Published on: 18 september 2020