Tuesday, May 10, 2022

Remove snap packages including Firefox on Ubuntu 22.04, install gnome-software, add Flatpak repo and install Firefox Flatpak version.

Ubuntu 22.04 comes with Ubuntu-Software which is snap store and Firefox comes as a snap package. If you don't like this set up you can remove all installed snap packages including Firefox and install gnome-software with flatpak plugin, add flatpak repo and install Firefox Flatpak version.

$ sudo snap remove --purge firefox
$ sudo snap remove --purge snap-store
$ sudo snap remove --purge gnome-3-38-2004
$ sudo snap remove --purge gtk-common-themes
$ sudo snap remove --purge snapd-desktop-integration
$ sudo snap remove --purge bare
$ sudo snap remove --purge core20
$ sudo snap remove --purge snapd
$ sudo gedit /etc/apt/preferences.d/nosnap.pref
Paste the following:

    # To prevent repository packages from triggering the installation of snap,
    # this file forbids snapd from being installed by APT.

    Package: snapd
    Pin: release a=*
    Pin-Priority: -10

Save and refresh package cache

$ sudo apt update

$ sudo apt install gnome-software
$ sudo apt remove --purge gnome-software-plugin-snap
$ sudo apt install gnome-software-plugin-flatpak
$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Restart

Open gnome-software and install Firefox

Monday, May 09, 2022

Remove Firefox snap package on Ubuntu 22.04 and install non snap Firefox also remove snap completely.

 On Ubuntu 22.04 Firefox is a snap package which is slow to open. Here is how to install Firefox and remove the snap package.

Download Firefox from Mozilla.

$ cd Downloads

$ tar xjf firefox-100.0.tar.bz2

$ sudo mkdir /opt

$ sudo mv firefox /opt/firefox100

$ sudo mv /usr/bin/firefox /usr/bin/firefox-snap

$ sudo ln -s /opt/firefox100/firefox /usr/bin/firefox

Now the Launcher on the Desktop will open the Firefox in /opt and not the snap package. Notice the difference in time of opening.

Firefox snap package is still present and we have renamed it as firefox-snap which can be run by typing

$ firefox-snap

You can remove firefox snap package

$ sudo snap remove --purge firefox

But this will remove the Firefox Launcher from the Desktop. To create a new Launcher

Open the File Manager and go to /usr/share/applications

Right Click on firefox.desktop and select Copy

Right Click on Desktop and click paste.

Right click on the Launcher click on Properties/Permissions

Put check mark on Allow executing file as a program.

Again right click on the Launcher and select Allow Launching.

If you want to remove snap completely remove the other installed snap packages one by one

$ sudo snap remove --purge snap-store
$ sudo snap remove --purge gnome-3-38-2004

$ sudo snap remove --purge gtk-common-themes
$ sudo snap remove --purge snapd-desktop-integration
$ sudo snap remove --purge bare

$ sudo snap remove --purge core20

Now only snapd remains to confirm

$ snap list

Finally remove snapd

$ sudo snap remove --purge snapd

To prevent installation of snapd and other snap packages

create a config file

$ sudo gedit /etc/apt/preferences.d/nosnap.pref

Paste the following:

# To prevent repository packages from triggering the installation of snap,
# this file forbids snapd from being installed by APT.

Package: snapd
Pin: release a=*
Pin-Priority: -10

Save and refresh package cache

$ sudo apt update

 


 

Wednesday, April 27, 2022

Photo Slideshow on Screensaver on Ubuntu.

 My friend asked me whether he could run Slideshow of Photos on Screensaver. First I thought about Shotwell Photo Manager App. It has Desktop Slideshow option but it did not work on Lock screen.

Then I searched for good old xscreensaver utility and installed it as follows:

$ sudo apt install xscreensaver xscreensaver-gl-extra xscreensaver-data-extra

$ sudo apt remove gnome-screensaver

I added xscreensaver to Startup Applications

Then I opened Screensaver Preferences and selected GLSlideshow in Display Mode

 
 then selected Pictures Folder in Image Manipulation/Choose Random image

 and it works on reboot.

Tuesday, April 19, 2022

Ubuntu 22.04 Jammy Jellyfish Live persistent on usb.

 In the previous post I could run Ubuntu 22.04 Jammy Jellyfish booting iso from grub. Then I made persistent Live usb of Jammy Jellyfish using mkusb. I could boot and run Firefox on first boot. But on reboot Firefox refused to run due to following error:

$ firefox
snap-confine has elevated permissions and it is not confined but should be. Refusing to continue to avoid permission escalation attacks.

This was a show stopper for persistent Live system of Ubuntu 22.04.

On further research I discovered that AppArmor was failing on Live system preventing firefox but how it was running on first boot is still a mystery to me.

Anyway on googling about AppArmor failure on Live System I discovered this page which provides a workaround.

The workaround is as follows:

In Live Persistent mode:
$ sudo mkdir /lib/systemd/system/apparmor.service.d

to create a directory apparmor.service.d in /lib/systemd/system/

sudo gedit /lib/systemd/system/apparmor.service.d/30_live_mode.conf

to create config file in the new directory

Paste
[Unit]
ConditionPathExists=

Save and reboot.

AND Firefox works!

Show must go on for persistent Live system of Ubuntu 22.04.

 Update on 22nd April 2022

This workaround was incorporated in mkusb version 12.7.4 on 21st April 2022 just in time before release of Ubuntu 22.04 Jammy Jellyfish.

Sunday, April 17, 2022

Running Ubuntu 22.04 Jammy Jellyfish booting from ISO.

 I downloaded Ubuntu 22.04 daily live iso a week ago and tried it by inserting following menu entry in /etc/grub.d/40_custom

menuentry "Jammy Jellyfish Desktop iso" {
set isofile="/home/user/jammy-desktop-amd64.iso"
loopback loop (hd0,X)$isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject
initrd (loop)/casper/initrd
}
I could not boot and was getting the error:
Unable to find a medium containing a live file system.

I posted on ubuntuforums and was informed that it was a bug.

The bug has been fixed and the updated iso now boots and I am posting this on Jammy Jellyfish.



Air India direct flight to San Fransisco has flown through China today.

 My sister in law left for San Fransisco by AI 173 flight which flows over North Pole. I tracked that flight on flightstats.com till it land...