Flatpak on openSUSE

I did a presentation during the virtual Hacktoberfest Mauritius on Friday night, 23 October 2020. I had the freedom to choose a topic. So, I decided to talk about setting up Flatpak on openSUSE.
What is Flatpak?
Flatpak is a system for building, distributing, and running sandboxed desktop applications. It was developed in 2015 by Alex Larsson and is currently maintained by an independent community of developers. It is written in C and its source code is available on GitHub.
Installation process is straightforward using zypper.
zypper in flatpakThe flatpak utility can then be used at the command line to add a repository. In our case, we are going to add the flathub repository.
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepoWe specify the option remote-add to indicate that we wish to add a repository, --if-not-exists to execute the command only if the repo does not exist on the system already, then followed by a name for the repo. We named the repo flathub but we could have called it something else as well, e.g myfavoriterepo. Lastly, we specify the url of the repository.
Next, we check whether the repo has been added.
ish@coffee-bar:~> flatpak remotes
Name Options
flathub systemWe can now start searching and installing apps from the flathub repo.
ish@coffee-bar:~> flatpak search postman
Name Description Application ID Version Branch Remotes
Postman Postman is a complete API development environment. com.getpostman.Postman 7.31.0 stable flathubWe install the application by specifying the Application ID.
flatpak install com.getpostman.PostmanThe necessary icons and application shorcuts will be created as the installation completes. Therefore, launching the application from the desktop will follow the usual steps.
However, if you wish to run the application from the command line, e.g Postman, you cannot do so by simply typing postman at the terminal prompt. It should be run as follows:
flatpak run com.getpostman.PostmanSandbox
With Flatpak, each application is built and run in an isolated environment. By default, the application can only 'see' itself and its runtime. Access to user files, network, graphics sockets, subsystems on the bus and devices have to be explicitly granted.
Under the hood
Flatpak uses a number of pre-existing technologies. It generally isn’t necessary to be familiar with these in order to use Flatpak, although in some cases it might be useful. They include:
- The bubblewrap utility from Project Atomic, which lets unprivileged users set up and run containers, using kernel features such as:
- Cgroups
- Namespaces
- Bind mounts
- Seccomp rules - systemd to set up cgroups for sandboxes
- The OSTree system for versioning and distributing filesystem trees
Hacktoberfest Mauritius 2020

Saamiyah pinged me a few days ago about the Hacktoberfest event that she was organising and asked whether I would be free to present a topic. Sure, why not?
As many tech meetups at the moment, the Hacktoberfest event also was virtual. It was hosted on the Jitsi instance of the Mauritius Software Craftsmanship Community. The event was scheduled to start at 19h30 on Friday, i.e last evening. I was late to join but "luckily" so was everybody.
Local hacktoberfest is live 😊 #mauritius pic.twitter.com/qFoNmFDn78
— Saamiyah 🇲🇺 (@smearthelove) October 23, 2020
As the event started, we had some small-talk before the presentations really kick-off. We talked about flexi-time, work-from-(home|anywhere), and how they compare to being full-time in office.
Saamiyah did the first presentation in which she talked about the concept of Hacktoberfest, a month where open source software is celebrated. Sandeep spoke about local open source projects on GitHub.
I spoke about Flatpak and how to set it up on openSUSE. I concluded my presentation with an observation on the rise of Flatpak fuelled by the idea of having immutable & maintenance-free systems such as Fedora Silverblue and openSUSE MicroOS Desktop.

The presentation slides are available at speakerdeck.com.
The next speaker, Alan, spoke about Docker Swarm, followed by Pritvi who talked about software licenses. It was 22h00 by that time and I could not stay longer. I bid goodnight on the chat room and wished everyone to continue having fun!
AWS 流程日誌發佈至CloudWatch with AWS CLI 小記
AWS 流程日誌發佈至CloudWatch with AWS CLI 小記
OS: container with openSUSE Leap 15.2
上次流程日誌啟用是使用 Console 的方式
今天要來寫 透過 AWS CLI 啟用流程日誌
建立方式使用 AWS CLI 方式
發佈至 CloudWatch
==== 建立IAM Role ====
參考官方文件
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/create-role.html
建立檔案 Trust-Policy-VPC-flow-logs.json
內容如下
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"Service": "vpc-flow-logs.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
使用 AWS CLI 建立 IAM Role
# aws iam create-role --role-name VPC-Flow-Log --assume-role-policy-document file://Trust-Policy-VPC-flow-logs.json
file:// 後面要注意是否有對應到 Trust-Policy-VPC-flow-logs.json 所在路徑
==== 建立IAM Policy =====
參考官方文件
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/create-policy.html
建立檔案 VPC-Flow-Log-Policy.json
內容如下
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents",
"logs:DescribeLogGroups",
"logs:DescribeLogStreams"
],
"Effect": "Allow",
"Resource": "*"
}
]
}
使用 AWS CLI 建立 IAM Policy
# aws iam create-policy --policy-name VPC-Flow-Log-Policy --policy-document file://VPC-Flow-Log-Policy.json
==== 關聯 Policy 到 Role上 ====
參考官方文件 https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/attach-role-policy.html
# aws iam attach-role-policy --policy-arn arn:aws:iam::111111111111:policy/VPC-Flow-Log-Policy --role-name VPC-Flow-Log
policy arn 部分請換成自己的 ID
Role-name 對應剛剛建立的 Role
==== 切換到VPC所在的region ====
參考官方文件
可以用指令先觀察目前所設定的 Region
# aws configure list
或是
# aws configure get region
設定 Region
# aws configure set region us-east-2
也可以去觀察 ~/.aws/config
==== 建立 Log Group ====
建立 Log Group
參考官方文件 https://awscli.amazonaws.com/v2/documentation/api/latest/reference/logs/create-log-group.html
# aws logs create-log-group --log-group-name flow-log-groups
==== 建立 VPC Flow log ====
建立VPC Flow log
# aws ec2 create-flow-logs --resource-type VPC --resource-ids vpc-c11111ac --traffic-type ALL --log-destination-type cloud-watch-logs --log-group-name flow-log-groups --deliver-logs-permission-arn arn:aws:iam::111111111111:role/VPC-Flow-Log
resource-ids 請換成自己的ID
deliver-logs-permission-arn 請換成自己的 ARN
這樣就建立完成
驗證的方式可以參考上一篇的 blog
這樣算是又向 AWS 前進一步
~ enjoy it
Reference:
http://sakananote2.blogspot.com/2020/10/aws-cloudwatch-with-console.html
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/create-role.html
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/create-policy.html
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/attach-role-policy.html
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/configure/set.html
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/logs/create-log-group.html
NMenu, una lanzador de aplicaciones simple Plasma – Plasmoides de KDE (161)
Y no paran de aparecer lanzadores de aplicaciones en Plasma. Como he dicho en varias entradas, buscar y ejecutar los programas en el entorno de trabajo Plasma de la Comunidad KDE es altamente personalizable. Hoy os presento NMenu, una lanzador de aplicaciones simple Plasma con el que llegamos a 161 los plasmoides presentados en el blog
NMenu, una lanzador de aplicaciones simple Plasma – Plasmoides de KDE (161)
Seguimos con las posibilidades de personalización de Plasma 5 en cuanto a lanzadores de aplicaciones. Al lanzador tradicional, a su versión reducida, al lanzador de aplicaciones a pantalla completa y a Tiled Menu, el clon del menú de Windows, se les han unido poco a poco otros lanzadores como UMenu, Minimal Menu, Simple Menu, Launchpad Plasma, Ditto Menu, Kpple o los Menu X y Menu Z.
A todos los anteriores se les une Nmenu, un lanzador de aplicaciones extremadamente simple que nos sirve para seguir personalizando nuestro entorno de trabajo.

Es una creación de Nestero, el cual está abierto a escuchar vuestras sugerencias para mejorarlo, como ha hecho en el primer comentario que se le ha hecho en la Store.
Y como siempre digo, si os gusta el plasmoide podéis “pagarlo” de muchas formas en la fluida 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 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.
Όρια φόρτισης μπαταρίας και διαχείριση ισχύος στο openSUSE με TLP
Τα όρια φόρτισης μπαταρίας είναι ένας μηχανισμός διακοπής φόρτησης, προτού να φορτιστεί πλήρως η μπαταρία και συνέχιση φόρτησης όταν αρχίσει να αδειάζει. Χωρίς ποτέ φόρτιση της μπαταρίας να πάει στο 100%, η διάρκεια ζωής της μπαταρίας μεγαλώνει. Ρυθμίστε για διακοπή της φόρτισης, εάν η χωρητικότητα της μπαταρίας είναι 85% και επανέναρξη όταν η μπαταρία είναι 75%. Μπορείτε να προσαρμόσετε αυτήν την ποσοστιαία τιμή όπως θέλετε.
STOP_CHARGE_THRESH_BAT0="85"
START_CHARGE_THRESH_BAT1="75"
STOP_CHARGE_THRESH_BAT1="85"
Αυτή η δυνατότητα διαχείρισης ενέργειας είναι αρκετά ολοκληρωμένη όταν χρησιμοποιείτε το ThinkVantage σε λειτουργικό σύστημα Windows. Προφανώς, το ThinkVantage είναι ένα ξεχωριστό χαρακτηριστικό της σειράς φορητών υπολογιστών Thinkpad. Το λογισμικό ThinkVantage δεν είναι διαθέσιμο στο λειτουργικό σύστημα GNU / Linux.
Μία εφαρμογή που μπορεί να εκτελέσει το καθήκον του καθορισμού ορίων φόρτισης μπαταρίας είναι το TLP. Αυτό το λογισμικό είναι άμεσα διαθέσιμο σε πολλά αποθετήρια διανομών GNU / Linux.
Εγκατάσταση TPL
Βλέποντας στον επίσημο ιστότοπο TLP στον σύνδεσμο https://linrunner.de/tlp/ , τα βήματα εγκατάστασης και η εκτέλεση του είναι αρκετά εύκολα.sudo systemctl enable tlp
Διαμόρφωση TLP
Η διαμόρφωση του TLP γίνεται αλλάζοντας τις ρυθμίσεις στο αρχείο του TLP στη διεύθυνση: /etc/tlp.conf. Χρησιμοποιήστε το αγαπημένο σας πρόγραμμα επεξεργασίας κειμένου. Εδώ είναι η διαμόρφωση η δικιά μου:+++ 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"
Εκτέλεση TLP
Αφού πραγματοποιήσετε τη ρύθμιση που θέλετε, το TLP είναι έτοιμο για εκτέλεσηsudo tlp start #εκκίνηση tlp
sudo tlp-stat -s #προβολή κατάστασης tlp
sudo tlp-stat -c #για να δείτε ποια ρύθμιση εκτελείται
Υλικό ανάγνωσης:
https://www.tecmint.com/tlp-increase-and-optimize-linux-battery-life/
#openSUSE Tumbleweed revisión de la semana 43 de 2020
Tumbleweed es una distribución “Rolling Release” de actualización contínua. Aquí puedes estar al tanto de las últimas novedades.

openSUSE Tumbleweed es la versión “rolling release” o de actualización continua de la distribución de GNU/Linux openSUSE.
Hagamos un repaso a las novedades que han llegado hasta los repositorios estas semanas.
El anuncio original lo puedes leer en el blog de Dominique Leuenberger, publicado bajo licencia CC-by-sa, en este enlace:
Durante esta semana solo se han publicado 3 snapshots (1019, 1021 y 1022). muchos otros snapshots se han probado y han sido descartados debido a algunos errores detectados durante el proceso de test. Pero como es usual, menos snapshots no significa que haya menos cambios
Estos tres snapshots han traido entre otros cambios tan importantes como:
- Mesa 20.2.1
- openSSL 1.1.1h
- Mozilla Thunderbird 78.3.3
- Linux kernel 5.8.15, que incluye una solución para la vulnerabilidad “bleeding tooth”
- Ruby 2.7.2
- KDE Plasma 5.20.1
Y cambios que llegarán en próximas snapshots:
- jsoncpp 1.9.4
- nasm 2.15.5
- Mozilla Firefox 82.0
- Cups 2.3.3
- GStreamer 1.18.0
- Ruby 2.6 será eliminado de Tumbleweed
- PostgreSQL 13
- Linux kernel 5.9.1
- GNOME 3.38.1: mozjs78 ya está disponible en Tumbleweed
- openssl 3.0
- RPM 4.16
Si quieres estar a la última con software actualizado y probado utiliza openSUSE Tumbleweed la opción rolling release de la distribución de GNU/Linux openSUSE.
Mantente actualizado y ya sabes: Have a lot of fun!!
Enlaces de interés
-
-
- ¿Por qué deberías utilizar openSUSE Tumbleweed?
- zypper dup en Tumbleweed hace todo el trabajo al actualizar
- ¿Cual es el mejor comando para actualizar Tumbleweed?
- Comprueba la valoración de las “snapshots” de Tumbleweed
- ¿Qué es el test openQA?
- http://download.opensuse.org/tumbleweed/iso/
- https://es.opensuse.org/Portal:Tumbleweed
-

——————————–
Noodlings 21 | Inspiration Is Around You
Trucos KDE (VII): guardando notas en el escritorio
Seguimos con otro capítulo de la sección que presenté hace un tiempo y que está teniendo un ritmo de publicación adecuado por parte de la cuenta de Youtube de KDE Commnity. Bienvenidos a Trucos KDE (VII), una entrada donde solo repasaremos, como en la anterior entrada, solo uno de los trucos que está publicando el grupo de promoción de la Comunidad KDE con el objetivo de mostrar al mundo algunas de las cosas sencillas que ofrecen. Es esta nueva edición veremos el truco con el que podemos pegar cualquier texto de una aplicación como una nota en el escritorio.
Trucos KDE (VII): guardando notas en el escritorio
Que se defina un escritorio como un entorno de trabajo no es por casualidad. En muchas ocasiones lo utilizamos como el espacio físico cuyo nombre representa y éste, en ocasiones, se llena de papelitos con notas.
Pues eso se puede hacer también con el escritorio Plasma de la Comunidad KDE con el siguiente truco: arrastra el texto de las aplicaciones a un espacio vacío en el escritorio de Plasma para tomar notas de todas las cosas importantes.
Lamentablemente los resultados pueden no ser lo que quieres con aplicaciones no KDE como LibreOffice o Telegram. No obstante en Firefox funciona bien. Seguro que en un futuro se soluciona este problema.

Además, este truco tiene otro truco añadido ya que si seleccionas un texto y hacer clic con el botón central en un área vacía de tu escritorio de Plasma tendrás el mismo efecto… ¡este truco funciona con Telegram!
Y como es habitual, a continuación tenéis el vídeo demostrativo el que, como siempre, es más fácil verlo en acción que realizar una descripción:
Si os ha gustado el truco no olvidéis compartirlo y darle un me gusta, estas cosas siempre ayuda en el desarrollo del Software Libre.
¿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.
openSUSE Tumbleweed – Review of the week 2020/43
Dear Tumbleweed users and hackers,
During this week, we have only released 3 snapshots (1019, 1021, and 1022). a bunch of snapshots has been tested and discarded due to some bugs we, and surely either you, did not want to see on your machines. But as usual; lesser snapshots do not mean less change, as things just cumulate until we feel confident to send a snapshot out again.
The three snapshot contained, amidst others, these changes:
- Mesa 20.2.1
- openSSL 1.1.1h
- Mozilla Thunderbird 78.3.3
- Linux kernel 5.8.15, incl. backported fix for bleeding tooth
- Ruby 2.7.2
- KDE Plasma 5.20.1
This leaves the staging projects left with these planned changes:
- jsoncpp 1.9.4: libyui fixes are ready
- nasm 2.15.5: Addresses the breakage seen last week with nasm 2.15.4
- Mozilla Firefox 82.0
- Cups 2.3.3
- GStreamer 1.18.0
- Ruby 2.6 will be removed from Tumbleweed (ruby2.6-rubygem-* is already gone, now the interpreter will disappear too)
- PostgreSQL 13
- Linux kernel 5.9.1
- GNOME 3.38.1: mozjs78 is now available in Tumbleweed
- openssl 3.0 (long-term; no progress in the last few weeks)
- RPM 4.16: steady progress made with package fixes.
Node.js, OpenSSL, Mesa Update in Tumbleweed
The past week has delivered two openSUSE Tumbleweed snapshot.
Some of the package updates in the snapshots include newer versions of Node.js, OpenSSL, Mesa, Apparmor, ImageMagick and AutoYaST.
The latest snapshot, 20201021, is trending stable at a 98 rating on the Tumbleweed snapshot reviewer. This snapshot updated Mozilla Thunderbird to version 78.3.3 and improved support for encrypting with subkeys with OpenPGP. The new email client version also added support for wayland mode/autodetection in a startup wrapper. The security kernel module Apparmor added missing permissions to several profiles and abstractions. The 5.9 version of ethtool arrived in the snapshot and improved compatibility between system call ioctl and netlink output. The Linux Kernel updated to 5.8.15 and fixed a close proximity Common Vulnerabilities and Exposure, CVE-2020-12352, that could allow a remote attacker in adjacent range to use the flaw to leak small portions of stack memory by sending specially crafted Bluetooth AMP Packets. Node.js 14.14.0 had some bug fixes and a few changes like the behaviour of a new fs.rm method that follows the UNIX rm command. The update of the ruby2.7 package to 2.7.2 turned off deprecation warnings by default.
The 20201019 updated several RubyGems; also known as Rails version 6.0.3.4, the gems’ update addressed CVE-2020-8264, which was a XSS vulnerability while the application server was in development mode. ImageMagick had a small update in the 7.0.10.34 version to check for linux-compatible sendfiles. Mesa and Mesa-drivers were updated to version 20.2.1; the graphics library includes Intel Rocket Lake Platform Support. NetworkManager 1.26.4 added support for the DHCPv4 vendor class identifier options and fixed peer group tracking of Wi-Fi P2P connections. GNU’s bison parser updated to version 3.7.3; the bison executable is no longer linked uselessly against libreadline. AutoYaST has a few changes from its previous version in the rolling release and the minor release fixed the progress bar length during autoinstallation initialization. OpenSSL’s 1.1.1h version enabled ‘MinProtocol’ and ‘MaxProtocol’ to configure both TLS and DTLS contexts. YaST had several package updates including an update to yast2-firewall 4.3.6, which warns users when the SSH port is closed or when the service is disabled and the configured authentication is only based on the SSH key. Other notable packages to update in the snapshot were libstorage-ng translations, pipewire 0.3.13, qrencode 4.1.1 and vim 8.2.1840, which included several fixes and a few that addressed crashes of the text editor. The snapshot is trending stable at a 97 rating.
