Featured

Ubuntu 22.04.1 LTS

In the end of the year 2022 I decided that I would like to upgrade Ubuntu OS on my laptop. The previous version on it was Ubuntu 20.04. The current version is Ubuntu 22.04.1 LTS. During the prerequisite checks done, I got the warning message that there is not enough free space on the root filesystem. I have an older laptop with 20 GB of SSD, which I use for root filesystem to get good experience of OS performance. The message was, that there is only 900 MB left on the filesystem and for successful upgrade I have to have at least 3 GB of free space on the root filesystem.

I performed all traditional checks to see where the space on the file system is not optimally used and found nothing. I started to think that new version of OS is simply larger than the previous one and it will require more space for the root file system, which will not longer fit on my laptop’s SSD..

Luckily later I found out that some software on Ubuntu OS uses technology called snaps to be installed and managed. It appeared that this technology leaves older versions behind which should be cleaned out manually. Bellow you can find commands with which you can remove older revisions of software products and libraries. I managed to gain that way the free space necessary for the upgrade of Ubuntu OS.

#

Current version of Ubuntu

#

cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION=“Ubuntu 22.04.1 LTS”

#

Commands return an error if there are dependencies

#

sudo snap list –all
sudo snap remove –purge 2632
sudo snap remove –revision=2632 core18
sudo snap remove –revision=1738 core20
sudo snap remove –revision=599 snap-store
sudo snap remove –revision=211 opera
sudo snap remove –revision=2154 firefox
sudo snap remove –purge gnome-3-28-1804
sudo snap remove –purge core18

#

Software using snap technology

#

sudo snap list –all
Name Version Rev Tracking Publisher Notes
bare 1.0 5 latest/stable canonical✓ base
chromium-ffmpeg 0.1 30 latest/stable canonical✓ –
core 16-2.57.6 14399 latest/stable canonical✓ core
core18 20221212 2667 latest/stable canonical✓ base
core20 20221212 1778 latest/stable canonical✓ base
firefox 108.0.1-1 2211 latest/stable mozilla✓ –
gnome-3-38-2004 0+git.6f39565 119 latest/stable canonical✓ –
gtk-common-themes 0.1-81-g442e511 1535 latest/stable canonical✓ –
opera 94.0.4606.38 213 latest/stable opera-software✓ –
snap-store 41.3-66-gfe1e325 638 latest/stable/… canonical✓ –
snapd 2.57.6 17883 latest/stable canonical✓ snapd
teams-for-linux 1.0.45 269 latest/stable ismaelmartinez –

Life hack – REDMI MIUI 12.5.2 Android 10 internal memory extension

Today I decided to write about one “life hack” that helped me to save some money and prolonged the life of my REDMI phone which runs with MIUI 12.5.2 and Android 10. According to my mind it is very good budget phone which I bought couple of years ago and I am happy with the choice I made.

The issue was a limited amount of internal memory and amount of applications I have installed on the phone. During the time amount of applications I am using has increased and regular updates of applications started to fail due to the lack of disk space (internal memory). The workaround was to clear the application data and cleanup the system.

Such applications as Twitter or Facebook can have several hundreds of MB of cashed data which you can cleanup. This workaround works for some time until one has patients to perform it..

My phone had additional SD card with 64 GB of memory. I started to think why I am not able to install applications on that. During my research it appeared that there exist applications on Google Play which allow to migrate applications installed on your phone to your SD card.

I tried to install those application, but it appeared that they need your Android device to be rooted. Rooting of Android device means to disable a layer of system protection and work with the highest privileges. There exist applications allowing to root the Android device, but this was not the right path to follow in my case. My Android device was so up to date that one of the most popular rooting applications was not able to root it. So i decided to continue my research.

After further reading it appeared that since Android 10, many companies making Android phones started to disable the feature which is called “adoptable storage”. This feature was disabled on my phone as well. Luckily there is a way to enable it, because it allows to format your SD card as phone’s internal storage which was working on many phones before Android 10 by default. In that case phone’s internal storage is logically increased by amount of space on your SD card which you allocate for that purpose.

This is what I found on the internet for “MIUI” versions older than mine, but I can confirm it works on mine as well without any issues for two weeks already.

All the next steps you should continue only if you accept that there could be a risk to loose the data and it is recommended to create a valid backup of your phone first.

Necessary equipment:

  • Computer (I used one with Windows 10);
  • Phone running Android 6 (or above);
  • Fast microSD card (at least UHS class 1 recommended);
  • Backup – your SD card will be formatted;
  • Enable developer options on your phone (in settings -> about phone -> tap “MIUI Version” 7 times);
  • Enable „Stay awake“;
  • Enable „USB debugging“;
  • Disable „MIUI optimization“;

I followed suggestions I found on the internet and the process was very similar to it in my case too. I used mixed mode 50, which divided my SD card one half for internal storage and another for external.

Download and install „ADB and fastboot“ on your computer. Connect your phone via USB. This is not the rooting of your phone, but connecting to it through official interface and adjusting non-default system settings. After system settings are adjusted you can format your SD card as internal storage.


Run a command window (as administrator) and use the following commands:


adb shell
sm set-force-adoptable true
sm list-disks

You are going to see a result like disk:179,64.

sm partition disk:xxx,xx private/mixed xx

This is formating your SD card, change xxx,xx according to prior result e.g. 179,64. Use private if you want to use the whole SD card as adoptable storage. Use mixed xx if you still want a specific percentage of the SD card formatted as “portable” storage e.g. mixed 60 (-> 40 percent adoptable storage). Check success on your phone (setting -> storage).


sm list-volumes

You are going to see a result like private:179,67 mounted fb705131-c6a0-4e3a-959b-605a65334c8c

pm move-primary-storage xxxxxxxxxx-xxxx-xxxxx-xxxxx-xxxxxxxxxx
migrate data to adoptable storage, change xxxxxxxxxx-xxxx-xxxxx-xxxxx-xxxxxxxxxx

According to prior result e.g. fb705131-c6a0-4e3a-959b-605a65334c8c
check process on your phone („Moving data“ in the status bar).

Process worked for me as described. In my case I tried it as otherwise I would have to buy new phone to be able to continue to use applications I use. Data migration in this case means that applications that support “adoptable storage” feature are migrated to SD card and cache the data there too. System stays to run on device’s original internal storage. So you manage to move some part of your data to SD card which depends on what type of applications you use. In my case I can continue to use the phone.

Sometimes I notice that very good quality videos are glitching due to the fact that SD card is slower than internal memory, but those cases are rare enough to not pay attention to it.

From security perspective Android 10 saves all the data on internal storage as encrypted which means that data on SD card could be used only on this phone.

In case you are okay with all the risks and brave enough to try it out, just go ahead!!

Statistics – “What is a p-value?”

Dtsch Arztebl Int 2009; 106(19): 335–9
DOI: 10.3238/arztebl.2009.0335

Excerpt:

In confirmatory (evidential) studies, null hypotheses are formulated, which are then rejected or retained with the help of statistical tests. The p-value is a probability, which is the result of such a statistical test. This probability reflects the measure of evidence against the null hypothesis. Small p-values correspond to strong evidence. If the p-value is below a predefined limit, the results are designated as “statistically significant” (1). The phrase “statistically striking results” is also used in exploratory studies.

UFW UncomplicatedFirewall on Ubuntu 20

I have not been writing anything new for my blog for a while. Today I decided to write something as I noticed misconfiguration on my Linux Ubuntu UFW firewall. When I was fixing this issue, then I discovered a way to write firewall rules for UFW which should better suit my requirements. First of all, I will describe my configuration:

  • I have a laptop with Linux Ubuntu 20 installed on it for day today usage;
  • I have two connection methods to the Internet (network card: en0 built-in network card to connect to the network with a cable, network card: usb0 which appears when I am connecting to the Internet by sharing the Internet through my phone using a USB cable, this method of connection is providing DNS service on additional IP which is created by the connection method);
  • I have a home router which is providing the Internet and DNS service IPs. The laptop is connecting to the home router via network cable;
  • I believe both connection methods could work in parallel as network cards are in separate networks, but I do not use those in parallel as there is no need to, so I cannot say that for sure;
  • I will slightly change IPs due to security reasons;
  • The laptop has no services on it that one needs to access from outside.

Here are basic commands to manage the UFW firewall:

a. start/stop firewall enable/disable autostart after OS reboot

sudo ufw enable

sudo ufw disable

b. get status information from firewall

sudo ufw status

sudo ufw status numbered # This option lists numbered fw rules

c. if we would like to delete fw rule “4”

sudo ufw delete 4

d. we need to set up a default fw policy

sudo ufw default deny incoming # do not allow any incoming traffic

sudo ufw default deny outgoing # do not allow any outgoing traffic

Connecting to the Internet via Phone usb0 192.168.nn.0/24:

sudo ufw allow out on usb0 log proto tcp from 192.168.nn.0/24 to any port 443 # https

sudo ufw allow out on usb0 log proto tcp from 192.168.nn.0/24 to any port 80 # http

sudo ufw allow out on usb0 log proto udp from 192.168.nn.0/24 to 192.168.nn.0/24 port 53 # DNS service mobile

sudo ufw allow out on usb0 log proto udp from 192.168.nn.0/24 to 192.168.nn.0/24 port 67 # DHCP service mobile

Connecting to the internet via Ethernet and router en0:

sudo ufw allow out on en0 log proto tcp from 192.168.mm.0/24 to any port 443 # https

sudo ufw allow out on en0 log proto tcp from 192.168.mm.0/24 to any port 80 # http

sudo ufw allow out on en0 log proto udp from 192.168.mm.0/24 to ii1.ii2.ii3.0/24 port 53 # dns1

sudo ufw allow out on en0 log proto udp from 192.168.mm.0/24 to ii1.ii2.ii4.0/24 port 53 # dns2

sudo ufw allow out on en0 log proto udp from 192.168.mm.0/24 to 192.168.mm.1 port 67 # DHCP

You can read more about Private network address ranges here:

https://en.wikipedia.org/wiki/Private_network
Private Networks

In conclusion I have default fw policy plus 9 rules described above and I can change my connection methods if I need to.

If you would like that described above configuration works as expected, then you have to disable ipv6. I managed to do that only adjusting grub configuration:

cat /etc/default/grub | grep GRUB_CMDLINE_LINUX

GRUB_CMDLINE_LINUX_DEFAULT=”ipv6.disable=1 quiet splash”
GRUB_CMDLINE_LINUX=”ipv6.disable=1″

After adjusting parameters:
run ‘update-grub’

reboot

Snapseed

I wanted to modify one picture which I found on the web. Just to add text. Looking through apps available for the Android I discovered Snapseed. Very useful app. Look what type of modifications could be done:

Snapseed

SEO Check

I have discovered a very handy Android application which helps people doing Web development and marketing via a natural search on the Internet. Application is called SEO Check. It allows people to review the results of their work using a mobile phone (not mandatory sitting behind the computer screen) and plan for improvements.

You can get suggestions on six major SEO related topics:

  • meta-information;
  • page quality;
  • page structure;
  • links;
  • server;
  • external.

Meta information provides suggestions for your page title, meta description, page crawlability, canonical URL, language configuration, alternate links, meta tags, character set encoding.

Page quality provides check results for different aspects of quality of your page word count, paragraphs, keywords. You can see how well your page is optimized for mobile devices and how well it is advertised on social networks.

Please, check out the Android app – very useful.

White Skype

Today I had a very important conversation planned over Skype. I decided to wake up earlier than usual and installed the latest Skype version (8.62.0.83) on top of my latest Ubuntu version (Ubuntu 20.04 LTS).

I decided to test a call and called one of my friends who at the moment is a bit further located from my location than all of the other persons in my Skype contact list and it worked very well from sound and video perspective.

Then I noticed that I have a very old profile picture and decided that I need to change it. As Linux Desktop Skype does not support taking pictures directly I used utility on Ubuntu called Cheese and took a picture of myself.

When changing the profile picture inside Skype it just hanged and showed white window without any error message or further instructions.

If someone knows how to fix it, please, let me know. I did not find the solution here:

https://support.skype.com/en/faq/FA34796/how-do-i-change-my-profile-picture-in-skype
White Skype

WhatsApp router configuration

I received a WhatsApp call from my nephew. He lives more than 1400 miles far away from me. We discussed how to configure two routers: one for the first floor of the house and another one for the second as WiFi signal got week after floor renewal.
It appeared that solution for this is a bit more complicated as we initially thought and it is possible to configure routers in different topologies with the different result and it might even happen that two routers do not support each other for these type of configurations.


You can find more about that in the following wikihow:

https://www.wikihow.com/Connect-Two-Routers
How to Connect Two Routers

Kastanis247 Facebook page was blocked

Today it was a very sad day for me. I spent my two previous weeks creating and improving my web page on Facebook “Kastanis247”. I was adding to it just arithmetic and logic-based information and some law-related information.
I invited a couple of people to see it using messenger – a couple of politicians, lawyers, economists. No-one told to me anything bad about the information on the page.
But somehow after a couple of days, online the page was blocked.

Mathematics and logic are too dangerous in combination with laws and regulations …

Hello world for “Joomla cloud”

I had to create an Internet site and decided to try “Joomla Cloud” for site creation. “Joomla cloud” for free Joomla version is hosted by “Cloudaccess.net”. The platform had its sign up possibilities with other cloud accounts such as Google and it was possible to create your dedicated account for the platform using your email as the username.
During sign up procedure, you do get a separate account for managing your site with “SuperUser” rights.
On the Internet, you can find instructions that you can use your “SuperUser” account for both site management and connecting to site backed with FTP. I needed to connect with FTP as initially, I planned to create a sitemap XML file manually and upload it to the site. Unfortunately, I was not able to establish an FTP connection as it was arguing about the incorrectness of my credentials.
So I had to use OSMap it is an extension for Joomla for sitemap creation and maintenance. The sitemap for my site started to work and I was happy.

The difference between WordPress.com and Joomla.com free sites from sitemap perspective is that WordPress free sites in default templates include sitemap support: you can access sitemap by the link:


https://yoursite.wordpress.com/sitemap.xml

Joomla free sites do not have sitemap support by default, but it is very easy to install OSMap extension. After that, you can find your sitemap by the following link:


https://yoursite.joomla.com/index.php/component/osmap/?view=xml&id=1&format=xml