Splitting a large text file on every blank line

I had a file of about a thousand lines containing the full description of multiple products (audio plugins from Plugin Alliance in my case). The file starts like this:

249
19.99
Mixland
Vac Attack★★★★★
A warm harmonically-rich optical limiter for compression with tube saturation that’s great on vocals, drums, basses, and your stereo bus.
Hardware EmulationsHidden GemsPA MembersSale

89.99
29.99
Woodlands Studio
VOXILLION★★★★★
A stunning and sophisticated, and complete vocal chain in one streamlined workflow. Featuring a high-end blend of a tube-driven preamp, two types of compressors, Nasal Dynamic EQs, Harmonics and more
Hidden GemsLimited Time OnlyPA_EXTSale

279
39.99
ADPTR AUDIO
Metric AB★★★★★
The mastering engineer’s best friend: Compare your mix to your favorite reference tracks. See,hear and learn even more with new expanded features.
Hidden GemsMasteringSale

and ends like this:

FreeDownload
PA FREE
bx_shredspread★★★★★
Intelligent M/S width for doubled riff guitars. Auto-avoid common phase problems, and sound extra-wide and tight!
FREEGuitar & BassHidden GemsM/S InsideMade by BX

FreeDownload
PA FREE
bx_tuner★★★★☆
Accurate tuning for guitar & bass with useful features like volume dimming. Tune up right before you hit the record button.
FREEGuitar & BassMade by BXSale

FreeDownload
PA FREE
bx_yellowdrive★★★★★
Warm to crunch to shred with this classic “Yellow” pedal in plugin form.
Creative FXFREEGuitar & BassHardware EmulationsMade by BXSale

What I wanted to do was to split the long file of a thousand lines into smaller files, each containing the lines corresponding to one plugin only.

Fortunately, the plugins were separated by an empty line. After some searching, I stumbled upon a Stackoverflow post of someone having the same issue and I settled on this solution enhanced by this comment:

gawk -v RS= '{ print > ("plugin-" NR ".txt")}' plugins.txt

As explained in the solution, “setting RS to null tells (g)awk to use one or more blank lines as the record separator. Then one can simply use NR to set the name of the file corresponding to each new record”. As explained in the comment, this will fail with the basic version of awk as it cannot handle too many open files at the same time (only 252 files were created with awk). Switching to gawk works great and now I have 277 files which I can further process.

A local mirror for openSUSE users in Mauritius 🥳

When I attended the openSUSE Asia Summit in 2019, I my friends in Indonesia about their experience in setting up the mirror for Indonesian users.

Earlier this year, when Luboš Kocman visited Mauritius, we spoke about it again.

Then, a few weeks ago, I heard from cloud.mu, who were willing to sponsor a server for mirror purposes. That was just perfect timing. I had started discussions with an ISP but then cloud.mu was not just willing to provide the server & bandwidth resources but their speed to deploy and assist was even more commendable.

Once the server was ready, the next step was to contact openSUSE admins to update the DNS records for opensuse.mu. I sent my request to the openSUSE Board for the purchase the domain a long time ago. Until now I used to run a small blog for openSUSE tips & tutorials on opensuse.mu. The domain is owned by SUSE and mananged by the openSUSE admins, i.e the Heroes team.

After a few trials to sync from rsync.opensuse.org and other mirrors closer to Mauritius, I contacted the Heroes to get access to stage.opensuse.org,  the restricted rsync server of openSUSE. After that, it was a matter of a few days to sync all that content.

Finally, the openSUSE mirror for Mauritius was ready.

Compared to other regions, where there are several mirrors in the same country, the whole African continent had only two openSUSE mirrors until now. One managed by TENET (Tertiary Education and Research Network) in South Africa and the other one by Liquid Telecom in Kenya. Mauritius joins that list as the third mirror in the African region, thanks to cloud.mu.

How to switch to the openSUSE Mauritius mirror?

Switching to the Mauritian mirror is easy. First, remove the current repos that you have by either running zypper lr to identify them and zypper rr repo-name to remove the repos, or go to /etc/zypp/repos.d and remove the .repo files of the openSUSE repositories. If you have repos for other applications, e.g Google Chrome, VS Code etc, leave them.

Then, if you're using Leap, you can the Leap 15.3 OSS, Non-OSS and Update repositories.

sudo zypper ar https://mirror.opensuse.mu/distribution/leap/15.3/repo/oss openSUSE-Leap-OSS

sudo zypper ar https://mirror.opensuse.mu/distribution/leap/15.3/repo/non-oss openSUSE-Leap-Non-OSS

sudo zypper ar https://mirror.opensuse.mu/update/leap/15.3/oss openSUSE-Leap-Update-OSS

sudo zypper ar https://mirror.opensuse.mu/update/leap/15.3/non-oss openSUSE-Leap-Update-Non-OSS

If you're using Tumbleweed, then add the following repositories.

sudo zypper ar https://mirror.opensuse.mu/tumbleweed/repo/oss openSUSE-Tumbleweed-OSS

sudo zypper ar https://mirror.opensuse.mu/tumbleweed/repo/non-oss openSUSE-Tumbleweed-Non-OSS

sudo zypper ar https://mirror.opensuse.mu/update/tumbleweed openSUSE-Tumbleweed-Update-OSS

The mirror contains files for the x86_64 architecture only. If there is a need for other architectures, I'll do the necessary. Ping me on social media or send a mail to [email protected].

openSUSE Leap 15.4 Beta testing

I tested the Leap 15.4 Beta GNOME Desktop today on a Lenovo ThinkPad X250. The installation went through without any hiccup and I documented every step of the installation in a Twitter thread.

Lenovo ThinkPad X250 and a bootable USB drive w/ openSUSE Leap 15.4 Beta
Lenovo ThinkPad X250 and a bootable USB drive w/ openSUSE Leap 15.4 Beta

One thing that I noticed was new in the installer is the icon to change the color theme during installation. This was not present when I tested the Leap 15.4 Alpha distribution.

On the top-right corner of the installer there is a moon icon which can be clicked to select a different theme for the installer. Five themes are available which contain three dark and two light variants.

The default theme is set to the installation.qss style sheet.

The cyan-black , highcontrast and white-black are dark themes while installation and style are light themes.

highcontrast.qss
highcontrast.qss
white-black.qss
white-black.qss

I took the above screenshots using the Leap 15.4 Beta image on VirtualBox to get clear images. In the Twitter thread I took pictures of the installation process and the theme selection on a laptop.

In either installation I did not encounter any bug while setting up GNOME Desktop with defaults.

Linux User Group of Mauritius meets Luboš Kocman

We had a meetup in the conference room of Flying Dodo, Bagatelle, on Saturday 22 Junuary 2022. Luboš Kocman, the Release Manager for openSUSE, who came to Mauritius on vacation was kind enough to spare a few hours and meet us.

Nirvan Pagooah, the Secretary of the Linux User Group of Mauritius, made the announcement of the meetup on the LUGM discussion list. Due to sanitary restrictions imposed by the government we could not make the meetup public. We had to keep it a private event with a limited number of attendees.

Grateful to everyone who made it despite the short notice

Luboš told us about some new things that will be coming to Leap in the future. He explained his role as a Release Manager for openSUSE and how the community as a whole is regarded as a SUSE partner. He explained the relationship between SUSE and the openSUSE community. He also talked about SUSE Liberty Linux, a new offering by SUSE which offers support for mixed Linux environment, like RHEL, CentOS and SLES.

Luboš showed us code.opensuse.org/leap/features/issues where community members can request the features they want most in openSUSE Leap. Hence, contributing to making openSUSE distributions better.

I asked whether the feature requests for Leap won't make it such that Leap and Tumbleweed will have different features. Luboš opened opensource.suse.com/legal/policy and explained that the contributions land in Factory first. He talked about the binary compatibility between Leap & SLES and users can test on Leap then migrate to SLES at total ease.

We talked about contributing to open source. Luboš mentioned non-code contributions and how easy it is to contribute to openSUSE. Ajay Ramjatan, one of the founders and the current President of LUGM, mentioned that years ago this is what he's been telling Linux & FOSS enthusiasts, that contributions can be in any form, like designs, translations, etc.

On that note Avinash Meetoo added that the Mauritian Creole (kreol morisien) can be an interesting FOSS project if we would consider adding Kreol support to openSUSE. He mentioned that there are people who are well versed on the topic but might not be techie, that is where we can work together and make this happen.

Renghen Pajanilingum shot a few tech questions, from containers to programming languages & having to compile software using different versions of packages. I know Renghen does not like to spend time fixing the distro problems because he'd rather spend that on actual work. However, he is one of the several Linux people that I have tried to lure to the green side. 😁 Not there yet but I am hopeful that we'll paint his laptop green one day.

I cannot end this blog without thanking Joffrey Michaïe for sponsoring a round of beer (and other drinks) for everyone.

At around 5 p.m the meetup ended.

Some of us stayed at Flying Dodo for more beer and to have dinner. Finally, we went to Mugg & Bean for a coffee and continued chatting about work, life and the balance. At 8:30 p.m, the hotel's taxi came for Luboš.

Hoping to be able to meet and greet geekos again.

Linux Mint partners with Mozilla and makes some changes to the Firefox package it ships with its distribution

Yesterday, in a post, the Linux Mint project leader, Clément Lefebvre (Clem), announced a partnership with Mozilla. In a small set of FAQs, Clem tried to address most of the immediately raising questions. He even answered questions in the comments section to make things as clear as possible.

However, I saw two articles that I would say have misleading titles. One of from betanews.com and the other published by omgubuntu.co.uk. I'm not judging the article authors but I believe the titles should have portrayed the actual Linux Mint announcement.

betanews.com screenshot taken on 12 Jan 2022
betanews.com screenshot taken on 12 Jan 2022
OMG! Ubuntu! post on Facebook
OMG! Ubuntu! post on Facebook

OMG! Ubuntu! says big changes coming to Firefox on Linux Mint, while the actual changes mean:

  • The default start page no longer points to https://www.linuxmint.com/start/
  • The default search engines no longer include Linux Mint search partners (Yahoo, DuckDuckGo…) but Mozilla search partners (Google, Amazon, Bing, DuckDuckGo, Ebay…)
  • The default configuration switches from Mint defaults to Mozilla defaults.
  • Firefox no longer includes code changes or patches from Linux Mint, Debian or Ubuntu.

The above list of changes are the exact ones posted by Clément Lefebvre and let's be honest these do not look like big changes. Anyone not liking the Firefox defaults can still change them to what they prefer and those who had made changes to the Firefox config previously, their preferences will be preserved and not overwritten.

Firefox 96.0 released

Yesterday, Firefox 96.0 was released and in an article, Phoronix talks about the browser's performance. In the same article, the author, Michael Larabel mentioned the Linux Mint/Mozilla partnership announcement without any ambiguity. I quote:

[...] Linux Mint announced on Monday they signed a partnership with Mozilla. Financial details were not disclosed but Linux Mint's Firefox build will be changing its default start page, the default search engines will change to Mozilla search partners, and other modifications for Mozilla.

openSUSE Board Election 2021 happening right now

The election was announced on the project mailing list on the 1st of November 2021. The current Election Committee is composed of Ariez Vachha, Mohammad Edwin Zakaria and myself.

This election is required to fill two seats on the openSUSE Board, as the term for Simon Lees and Vinzenz Vietzke are coming to an end.

To learn more about openSUSE membership, check out this wiki.

Election poster by Kukuh Syafaat / openSUSE Indonesia

As the initial nominations/applications phase ended, we had only two members who expressed to run for this election. They are:

• Attila Pinter
• Maurizio Galli

Since, we had only two candidates for two available seats, we extended the nominations/applications phase for another two weeks, giving other members the chance to toss the names of people who'd they wish to nominate. However, even after the two weeks, we were still left with only two candidates and therefore, as per the election rule about insufficient nominations, we started the election and each candidate is required to obtain 50% of votes to be considered a winner.

The ballots were opened on the 13th of December and openSUSE members received their voting URL/credentials by email. They can vote until the 30th of December at 23h59 UTC. Ballots will close on 31st December at midnight and a few hours later the result will be announced.

Getting unknown terminal type warnings when using SSH?

I regularly SSH to my computers and servers and, on some of them, I was getting the following warning message:

'ansi+tabs': unknown terminal type.

This was just a warning and everything worked perfectly. But, still, having a warning message was not very, ahem, professional…

I have just found the cure: you need to have additional terminal definitions installed on the remote computer. On Red Hat / CentOS / Fedora, do:

dnf install ncurses-term

and on Debian, CentOS and derivatives:

apt-get install ncurses-term

and everything will be fine.

ubuCon Asia 2021

ubuCon Asia 2021

ubuCon Asia is a community event organised by the Ubuntu LoCo teams of the Asian region. It is a virtual conference that started today, 25 September 2021 and will last till tomorrow.

Attendees need to register on eventyay.com and get a conference ticket for free before they can access the meeting rooms. There are two meeting rooms with presentations happening simultaneously like the usual conferences.

I attended this morning's keynote which was delivered by Ken VanDine, Engineering Manager at Canonical. Ken gave a brief about what's happening with the Ubuntu community. He highlighted the features of the upcoming release of Ubuntu 21.10 Impish Indri scheduled for 14 October, less than a month away.

ubuCon Asia 2021
Ken VanDine delivering the ubuCon Asia 2021 Keynote

He mentioned that in the recent Beta release of Impish Indri users will notice that the Firefox browser is a snap package rather than the usual deb packaged. He explained the choice as being a collaboration between Mozilla and Canonical developers.

He talked about Ubuntu's choice of Flutter to develop native apps. The current Ubuntu installer is a Flutter application. He showed a demo of how to install the Flutter SDK and Visual Studio Code on Ubuntu using the Software Center. He then installed the Flutter extension and brought up a quick demo app on Flutter.

It is good to note that there is a yaru-flutter package that provides the look & feel of the Ubuntu system theme to Flutter apps.

ubuCon Asia 2021

Canonical has been pushing Flutter as the choice of native app development on Ubuntu since quite some time now and with the demo by Ken VanDine it becomes apparent how effortless Flutter development is on the Ubuntu desktop.

Some nice sessions are planned today and tomorrow, giving Linux users tips and tricks that they can use daily. Many of the sessions are done in native languages like Bahasa Indonesia or Japanese with English transliteration.

Tomorrow at 08h45 MUT, Kukuh Syafaat, a friend from the openSUSE Indonesia community will present Snap in MicroOS.

Snap is a package manager for containerised software packages. It is used mainly by Ubuntu derivatives. Kukuh Syafaat will explain how to use Snap in openSUSE MicroOS, a Linux distribution designed mainly for container hosting. However, there has been efforts into having a MicroOS Desktop with an immutable OS concept. MicroOS Desktop comes with Flatpak pre-installed. It'll be nice to see support for Snap as well.

Trying GNOME 41

Trying GNOME 41

GNOME 41 was released on 22 September 2021, i.e yesterday. A few major tech blogs spoke about it, some of them lengthily, testing and describing the new features.

I know for sure that GNOME 41 will be available to openSUSE Tumbleweed users in the next few days. However, I wanted to give it a spin ahead of its availability in the Tumbleweed repos. GNOME provides an ISO that bundles its latest version. It's called GNOME OS and it is available at os.gnome.org. The site provides a disclaimer that this is a pre-release software intended for testing and development. It should not be used for production.

Bear in mind that GNOME OS is not a live distribution but an installer. Therefore, if you're just trying out things then you should install it in a virtual machine.

GNOME 41 proposes a quick tour upon the first log in. It's just a couple of image slides that mention some of the new features. One of the hot takes in this version is the three-finger gestures for swiping workspaces.

Trying GNOME 41
GNOME 41 tour on GNOME OS

The GNOME Control Centre, commonly known as simply Settings in most Linux distributions, received updates too. It has a new panel called Multitasking which allows the user to configure the behaviour of the screen corner & edges, e.g disabling the Hot Corner.

Trying GNOME 41
Multitasking panel in the GNOME Control Centre

The Multitasking panel also allows the user to set the workspace as dynamic or set it to a fixed number.

I like these new features and I am certainly eager to see GNOME 41 land in Tumbleweed. 😊

Set up the latest version of Mozilla Firefox on your Linux distribution

Set up the latest version of Mozilla Firefox on your Linux distribution

Firefox 90.0 was released on 13th July 2021. It was instantly, at least on the same day, available on flathub.org. Therefore, Linux users running flatpak could enjoy the latest release at once.

However, Firefox 90.0 won't be available on regular Linux distribution software repositories at that speed. Even with Linux distros known to be bleeding-edge it usually takes a few days if not weeks before the latest Firefox is tested, packaged and made available in official repos.

Mozilla provides a compressed tarball of the Firefox binaries and libs. These should be sufficient to run Firefox smoothly on almost any Linux distribution. Certainly, it a little of tinkering will be required if you would like to have it running on your system like as if it was installed via the software manager, creating the application shortcuts etc.

How do we do that?

First of all, let's grab the latest Firefox tarball from Mozilla's website. That being done, we decompress and extract the tarball.

tar xjvf firefox-90.0.tar.bz2

The firefox folder is extracted. Now, move the folder to the /opt directory. Keeping it in /opt allows to have a clean setup of third-party software in one location.

Next, we create the application shortcut file named firefox.desktop in the /usr/share/applications directory with the below content.

[Desktop Entry]
Version=1.0
Name=Mozilla Firefox
Exec=/opt/firefox/firefox %U
StartupNotify=true
Terminal=false
Icon=firefox
Type=Application
Categories=Network;WebBrowser;
MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/ftp;x-scheme-handler/http;x-scheme-handler/https;
Actions=new-window;new-private-window;

Notice that the "icon" name is "firefox" and we have not provided a location for where this icon may be. The system will look for icons in its system folders with the name provided in the .desktop file. The locations that are searched are:

  • A 32x32 px XPM file in /usr/share/pixmaps
  • Different sizes of PNG files in /usr/share/icons/hicolor/48x48/apps
  • An SVG file in /usr/share/icons/hicolor/scalable/apps

The icons in different PNG sizes are packaged in the Firefox tarball and they are available in the /opt/firefox/browser/chrome/icons/default directory. Each icon can be renamed to firefox.png and copied to its appropriate « size » folder in /usr/share/icons/hicolor/<size>/apps.

That's it, you now have the latest version of Firefox on your Linux distribution with the required shortcuts.