Tag Archives: linux

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.

Insert unicode characters in KDE using Ctrl + Shift + U

Insert unicode characters in KDE using Ctrl + Shift + U

Linux users familiar with the GNOME desktop must know this shortcut to insert special characters using code points from the Unicode Standard chart of diacritical marks, i.e as most commonly called, accents.

Insert unicode characters in KDE using Ctrl + Shift + U
Special characters are very handy when typing in French

I have seen a lot of posts where users are asking how to get a similar shortcut in KDE or other desktop environments.

The unicode shortcut, Ctrl + Shift + U, to insert special characters isn't a built-in feature in GNOME. It is a feature available from IBus, an input framework for Linux. Installing it along KDE or any other desktop environment will provide the feature. Use your distro's package manager to search for ibus and install the appropriate packages.

Disable “single-click” to open folder in KDE Dolphin

Disable "single-click" to open folder in KDE Dolphin

I expected disabling the single-click option in order to open files/folders in Dolphin to be straightforward and under Configure Dolphin, but alas that was not the case. It was not after several Google search that I got a hint that this is a system feature in KDE Plasma and not something specific to Dolphin.

How do we change it?

Type General Behaviour in Krunner and the option should be under Click behaviour.

Disable "single-click" to open folder in KDE Dolphin

I prefer to double-click in order to open files/folders.

I thought of putting this here in case someone else is looking for this. 😉

Convert multiple lines into one tab-separated line using paste

I generally have a lot of text files with such content:

1
Play track
Turn Around
Unlove this track
Panic Attack
Avinash Meetoo
110 scrobbles
2
Play track
Playing the Angel
Unlove this track
Precious
Depeche Mode
101
3
Play track
The Singles 86>98
Unlove this track
Personal Jesus
Depeche Mode
98

These are the three tracks I have listened to most since I started using Last.fm way back in 2005.

What I want to achieve is to easily convert these 21 lines (3 x 7) into 3 tab-separated lines which can then be easily imported into, say, Libreoffice Calc:

1<TAB>Play track<TAB>Turn Around<TAB>Unlove this track<TAB>Panic Attack<TAB>Avinash Meetoo<TAB>110 scrobbles
2<TAB>Play track<TAB>Playing the Angel<TAB>Unlove this track<TAB>Precious<TAB>Depeche Mode<TAB>101
3<TAB>Play track<TAB>The Singles 86>98<TAB>Unlove this track<TAB>Personal Jesus<TAB>Depeche Mode<TAB>98

For many years, each time I had to do that, I wrote a small Awk script. But, today, thanks to RudiC on the Unix Stack Exchange, I have the perfect recipe using paste:

paste -s -d "\t\t\t\t\t\t\n" file-containing-all-the-lines.txt

Naturally, you can adjust the number of “\t” if you have fewer or more fields.

Enjoy :-)

openSUSE distributions dedicated page

openSUSE distributions dedicated page

Previously, it would take someone new to the project quite some time to learn about the distributions and understand their differences. Not every new openSUSE user would know that it's ideal to use openSUSE MicroOS for single-purpose server hosting and Kubic for container orchestration with Kubernetes.

Thanks to a revamp of the openSUSE Project website, now the distributions get a dedicated page at get.opensuse.org.

A little work is still needed on the documentation part for each specific distribution. If you would like to help with that, you are most welcome. Join the openSUSE Documentation mailing list and coordinate with what's already being done to improve doc.opensuse.org or head to GitHub to have a look at the current opened issues. You will also find instructions on how to start contributing to the openSUSE Documentation.

For now, each distribution's individual page on get.opensuse.org points to the same official documentation guide which is Leap-centric. The documentation does not cover specific instructions for MicroOS, Kubic or even Tumbleweed.

How to host a free 1 year server running UBUNTU in AWS?

How to host a free 1 year server running UBUNTU in AWS?

In this tutorial we are going to get you started with Amazon Elastic Compute Cloud (Amazon EC2). You'll learn how to launch, connect to, and use an Ubuntu instance.

First and foremost you will need to create an account: https://aws.amazon.com/resources/create-account/

Once you have created your account, we will need to find a region of lowest latency for us and the easiest way is to go to this website that runs the AWS latency test. https://ping.psa.fun/ . For Mauritius, it is the af-south-1 region (Cape Town, Africa) which has the lowest latency.

Launching your instance:

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
  2. On the top right corner, choose your preferred region
  3. From the console dashboard, choose Launch Instance.
  4. The Choose an Amazon Machine Image (AMI) page displays a list of basic configurations, called Amazon Machine Images (AMIs), that serve as templates for your instance. Select an Ubuntu Server 20.04 (Free tier eligible).
  5. On the Choose an Instance Type page, you can select the hardware configuration of your instance. Select the t3.micro instance type, which is eligible for the free tier.  For more information, see AWS Free Tier.
  6. Choose Review and Launch to let the wizard complete the other configuration settings for you.
  7. On the Review Instance Launch page, under Security Groups, you'll see that the wizard created and selected a security group for you. You can use this security group, or alternatively you can select the security group that you created when getting set up using the following steps:
  8. Choose Edit security groups.
  9. On the Configure Security Group page, ensure that Select an existing security group is selected.
  10. Select your security group from the list of existing security groups, and then choose Review and Launch.
  11. On the Review Instance Launch page, choose Launch.
  12. When prompted for a key pair, select Choose an existing key pair, then select the key pair that you created when getting set up.
    Warning
    Don't select Proceed without a key pair. If you launch your instance without a key pair, then you can't connect to it.
    When you are ready, select the acknowledgement check box, and then choose Launch Instances.
  13. A confirmation page lets you know that your instance is launching. Choose View Instances to close the confirmation page and return to the console.
  14. On the Instances screen, you can view the status of the launch. It takes a short time for an instance to launch. When you launch an instance, its initial state is pending. After the instance starts, its state changes to running and it receives a public DNS name. (If the Public DNS (IPv4) column is hidden, choose Show/Hide Columns (the gear-shaped icon) in the top right corner of the page and then select Public DNS (IPv4).)It can take a few minutes for the instance to be ready so that you can connect to it. Check that your instance has passed its status checks; you can view this information in the Status Checks column.

Connecting to your newly created Ubuntu Instance

Open an SSH client.

  1. Locate your private key file. The key used to launch this instance is nu-server.pem
  2. Run this command, if necessary, to ensure your key is not publicly viewable.
    chmod 400 *.pem
  3. Connect to your instance using its Public DNS as provided in your dashboard

Example:

ssh -i "server.pem" [email protected]


Grab a cool wallpaper for your Linux desktop

Grab a cool wallpaper for your Linux desktop

I tweeted about a blog post which I published on opensuse.mu, explaining how I configured the GNOME desktop theme Yaru (by the Ubuntu community) on my openSUSE Tumbleweed machine. The tweet got a lot of reaction, not just for the blog post or cool Yaru theme but also for the nice wallpaper showing penguins using a computer.

I got a question whether the wallpaper was freely available. The answer is yes. The wallpaper was released, among many others, by Digital Ocean in 2016.

You can head to imgur.com now and grab a cool wallpaper for your Linux desktop.

RHEL no-cost* vs openSUSE Leap

RHEL no-cost* vs openSUSE Leap

Ever since Red Hat announced that they are changing the development model of CentOS and making it an upstream project rather than downstream, it left many CentOS users frowning. No matter what argument brought forward, CentOS users, especially running production machines, relied on the stability of an enterprise-grade Linux distribution. Compiled from RHEL sources, CentOS offered such stability that it powered many web servers and enjoyed a massive 20% share of the top 500 supercomputers of the world.

RHEL no-cost* vs openSUSE Leap
Source: TOP500.org Statistics November 2020

Some time back, Red Hat made another annoucement, about new Red Hat Enterprise Linux programs. Under the new program RHEL can be used in production for up to 16 systems (which Red Hat considers a small workload) at zero license costs. Also, Red Hat is making it easier for a customer's development team to join the program and reap the benefits.

What risks lie ahead for an enterprise if Red Hat changes or cancels the program in the future? 🤔

On the other hand, since 2018, SUSE has worked closely with the openSUSE community to bring the Leap distribution closer to SUSE Enterprise Linux (SLE), such that now Leap and SLE are binary compatible.

openSUSE currently offers two distinct distributions, Leap & Tumbleweed.

Tumbleweed is a rolling distribution constantly getting updated software whereas Leap has planned releases that sync with SUSE Linux Enterprise and its Service Packs.

RHEL no-cost* vs openSUSE Leap
Source: suse.com

The above image depicts how openSUSE & SUSE Linux Enterprise are developed together. Factory is the rolling development codebase for both openSUSE & SLE. In the pipeline we can see that Leap & SLE are synced and both receive software packages from the same source; that is why they are both binary compatible.

In a series of blog posts explaining how SUSE builds its Enterprise Linux distribution, author Vincent Moutoussamy details the relationship between openSUSE & SLE.

Conclusion

Red Hat allows its clients to use RHEL for free on up to 16 machines. On the other hand, openSUSE Leap boasts binary compatibility with SUSE Linux Enterprise and comes without any restriction on usage.

Cover image source:
Photo by Gratisography from Pexels

SOGo calendar synchronization breaks due to emoji in the event title

SOGo calendar synchronization breaks due to emoji in the event title

An emoji can break a calendar. 😳

I am using the SOGo Groupware. I noticed that certain emojis in the event title would prevent calendar apps from synchronizing using the CalDAV protocol. I checked the logs but could not find much. I had my doubts about what could be causing it. Then, this bug report confirmed that I should investigate on the UTF-8 encoding support.

I checked the database character set.

MariaDB [sogo]> select @@character_set_database;
+--------------------------+
| @@character_set_database |
+--------------------------+
| utf8                     |
+--------------------------+
1 row in set (0.001 sec)

The database name is sogo and we are using MariaDB.

I found the character set to be utf8, to my surprise. I had to dig a little further to understand what was wrong with it.

It turned out that the MariaDB utf8 character set supports a maximum of three bytes per character. Therefore, emojis being four bytes long weren't being inserted into the database. Consequently, that breaks the calendar synchronization. The solution was to use the utf8mb4 character set which supports four bytes per multi-byte character.

I altered the database character set and collation.

MariaDB [sogo]> ALTER DATABASE sogo CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;

I also applied it to every table in the database, e.g:

MariaDB [sogo]> ALTER TABLE sogo_store CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

Afterwards, I could create events using an emoji in the title. The event would synchronize across my calendar apps but the emoji would not show. It would appear as four questions marks (????) instead.

SOGo calendar synchronization breaks due to emoji in the event title
SOGo calendar emoji issue

A little bit of further digging and I found that SOGo needs to be made aware of the full unicode support. It should be specified in the /etc/sogo/sogo.conf configuration file.

MySQL4Encoding = "utf8mb4";

Restart the SOGo service. Emojis should be then accepted in the event titles.

SOGo calendar synchronization breaks due to emoji in the event title

I can now put my recurrent coffee breaks in the calendar. ☕


Credits:
Web vector created by stories - www.freepik.com

openSUSE community elects Axel, Gertjan and Neal to serve on the Board

openSUSE community elects Axel, Gertjan and Neal to serve on the Board

The election lasted for two weeks and it ended last night at 23h59 UTC. The results were published today at mid-day (for me).

The complete election results are:

  • Axel Braun — 142 votes
  • Gertjan Lettink — 134 votes
  • Neal Gompa — 131 votes
  • Maurizio Galli — 103 votes
  • Nathan Wolf — 59 votes

Five votes were recorded for the "none of the above" option. Out of 518 eligible voters, 229 voters have cast their vote in this election, which represents a turnout of 44%. It's a low turnout compared to last year's board election which was 56%.

Axel, Gertjan and Neal are elected to serve for two years on the openSUSE Board.