UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. mango
    3. Best
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 25
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Ubuntu touch as PC?

      Out of curiosity, I tried to get Thunderbird to behave properly on a Fairphone 4. Maybe it would be an idea to make a one-click-install that does all this for a newbie. openSUSE software catalogue has a one-click yaml installer script which sets everything up. Just an idea to make it user friendlier to get common software working out of the box so to say for a newbie to make it easier to adopt Ubuntu Touch.

      Step 1: Installing Thunderbird inside a Libertine container

      For those of you newbies wondering how to get Thunderbird Mail client working in desktop mode on Ubuntu Touch, this is one way that seems to work well. Thunderbird has so far not crashed a single time. However the Ubuntu Terminal app and nano crashed several times during this test. This markup was written in nano and copied to this forum spot to test the interoperability between different windows in desktop mode. Copy-paste functionality between windows seems to be a bit glitchy at the time of writing.

      I messed around with settings until I got something that would work in desktop mode for Fairphone 4 running channel 24.04/daily.

      Installing Thunderbird as DEB

      Install Libertine Tweak Tool from Openstore.

      Activate lirsh command with Libertine Tweak Tool.

      Open a terminal window and type:

      lirsh                                                                                  
      fakeroot                                                                               
      

      We need command add-apt-repository command from package software-properties-common.

      apt-get update                                                                         
      apt-get upgrade                                                                        
      apt-get install software-properties-common                                             
      

      On my Fairphone 4 I was also obliged to install package apt-utils that for some reason did not install correctly by itself.

      apt-get install apt-utils
      

      At this point it was possible to issue terminal command:

      add-apt-repository ppa:mozillateam/ppa
      
      cat <<EOF | tee /etc/apt/preferences.d/thunderbird-ppa
      Package: thunderbird
      Pin: release o=LP-PPA-mozillateam
      Pin-Priority: 1001
      Package: thunderbird
      Pin: release o=Ubuntu
      Pin-Priority: -1
      EOF
      
      apt-get update
      
      apt-cache policy thunderbird
      
      # apt install thunderbird
      DEBIAN_FRONTEND="noninteractive" apt install thunderbird
      
      exit # jump out of fakeroot
      
      thunderbird --version
      

      Now you can test if terminal command thunderbird launches something.

      On my Fairphone 4, I saw a shaddow window but nothing more. I remembered reading that you have to force Xwayland in some way.

      # lirsh
      GDK_BACKEND=x11 thunderbird
      

      On my Fairphone 4, the zoom factor is quite big. Let's try to lower the zoom.

      One way to lower the zoom is to edit Libertine container noble file ~/.Xdefaults and adjust Xft.dpi: 120 from default value Xft.dpi: 197.

      Exiting lirsh and re-entering lirsh should activate the new DPI setting.

      Then re-launch thunderbird from command line and see if the zoom factor is better.

      # lirsh
      GDK_BACKEND=x11 thunderbird
      

      Now the window looks a bit better with not such a large zoom factor in desktop mode.

      The other way is to use a scaling factor directly before launching thunderbird.

      Try this and see if the zoom factor is lower with standard setting Xft.dpi: 197.

      # lirsh
      GDK_DPI_SCALE=0.6 GDK_BACKEND=x11 thunderbird
      

      Once the scaling is okay for your eyes you can create a thunderbird-launcher.

      # lirsh
      mkdir -p ~/.local/bin
      echo "GDK_DPI_SCALE=0.6 GDK_BACKEND=x11 thunderbird" > ~/.local/bin/thunderbird-launcher
      chmod +x ~/.local/bin/thunderbird-launcher
      

      On my Fairphone 4, Libertine container noble folder ~/.local/bin
      was not in my Libertine container variable $PATH:

      # lirsh
      echo $PATH
      

      Editing Libertine container noble file .bashrc should do the trick.

      Added the following lines at the end of .bashrc:

      if [ -d ~/.local/bin ]; then
        export PATH="$HOME/.local/bin:$PATH"
      fi
      
      if [ -d ~/bin ]; then
        export PATH="$HOME/bin:$PATH"
      fi
      

      Exiting lirsh and re-entering lirsh should activate the new setting.

      exit # jump out of lirsh
      lirsh
      echo $PATH
      
      thunderbird-launcher
      

      This command should open thunderbird inside lirsh with desired zoom.

      Step 2: Making a Thunderbird Mail main menu item shortcut

      Poking around with the settings, you may discover that there are actually two ways to launch Thunderbird Mail once it is installed.

      • Launching Thunderbird Mail from outside the Libertine container. This would require a separate launcher put in ~/.local/share/applications/thunderbird.desktop. User settings will be stored outside the Libertine container.
      • Launching from inside the Libertine container. This would require to edit the Libertine container's thunderbird.desktop file, which will sooner or later appear in Ubuntu Touch main menu. User settings will be stored inside the Libertine container.

      For the purpose of illustration, I will do both approaches.

      2a: Making a thunderbird.desktop outside Libertine container

      It is not entierly clear to me what you have to do in order to trigger a main menu update after you have installed something in a Libertine container. Debian has a command update-menus which Ubuntu Touch does not have. Ususally, a reboot is the easiest way to update Ubuntu Touch main menu items. However, there should in theory be another way to refresh the main menu that is at this time unknown to me.

      Now that this is working, let's try to create an Ubuntu Touch shortcut in the main menu. This can be done manually of course. In this example, I will piggy-back on what is already available.

      Open another terminal tab (without lirsh environment).

      mkdir -p ~/.local/share/applications
      
      mkdir -p ~/.local/share/icons/hicolor/scalable/apps
      
      wget -O ~/.local/share/icons/hicolor/scalable/apps/thunderbird.svg https://upload.wikimedia.org/wikipedia/commons/2/2f/Thunderbird_2023_icon.svg                                                                  
      
      wget -O ~/.local/share/icons/hicolor/index.theme https://raw.githubusercontent.com/spk121/hicolor-icon-theme/refs/heads/master/index.theme 
      
      sed -i "s|^Comment=.*$|Comment=Ubuntu Touch Icon Theme|g" ~/.local/share/icons/hicolor/index.theme
      
      echo "Update icon caches (maybe obsolete)"
      
      touch ~/.local/share/icons/hicolor
      
      update-icon-caches ~/.local/share/icons/hicolor
      
      # or
      
      touch ~/.local/share/icons/hicolor
      
      gtk-update-icon-cache ~/.local/share/icons/hicolor
      
      echo
      echo "We can re-use the thunderbird.desktop file that is in the Libertine container"
      
      cp -v /userdata/user-data/phablet/.cache/libertine-container/noble/rootfs/usr/share/applications/thunderbird.desktop ~/.local/share/applications/thunderbird.desktop
      
      echo
      echo "Using scaling factor GDK_DPI_SCALE=1.2"
      echo "to achieve similar scaling as with"
      echo "Libertine container 'noble' GDK_DPI_SCALE=0.6"
      
      sed -i "s|^Exec=.*$|Exec=bash -c \'GDK_DPI_SCALE=1.2 GDK_BACKEND=x11 /userdata/user-data/phablet/.cache/libertine-container/noble/rootfs/usr/bin/thunderbird\' %u|g" ~/.local/share/applications/thunderbird.desktop
      
      echo
      echo "Ubuntu Touch does not seem to find the thunderbird icon"
      echo "by itself."
      echo "    Icon=thunderbird"
      echo "Icon has to be specified exactly with path to show in main menu."
      echo "    Icon=/path/to/scalable/svg"
      
      sed -i "s|^Icon=.*$|Icon=/home/phablet/.local/share/icons/hicolor/scalable/apps/thunderbird.svg|g" ~/.local/share/applications/thunderbird.desktop
      
      echo
      echo "Trigger main menu update"
      
      mv ~/.local/share/applications/thunderbird.desktop ~/.local/share/applications/tmp.desktop
      
      mv ~/.local/share/applications/tmp.desktop ~/.local/share/applications/thunderbird.desktop
      
      echo
      echo "You should now see Thunderbird Mail"
      echo "in Ubuntu Touch main menu."
      echo
      echo "Done."
      

      Now there should be a visible "Thunderbird Mail" launcher in Ubuntu Touch main menu.

      Try hitting the "Super-key" (sometimes this key has four windows left of the space bar, sometimes it can have an apple design or command key) on your external wired PS-2 keyboard (or wireless keyboard)
      and type thund which should be enough to make Thunderbird Mail laucher visible.

      2b: Adjusting thunderbird.desktop inside Libertine container

      Adjusting Libertine container thunderbird.desktop located at
      ~/.cache/libertine-container/noble/rootfs/usr/share/applications/thunderbird.desktop
      could be done manually with terminal command:
      nano ~/.cache/libertine-container/noble/rootfs/usr/share/applications/thunderbird.desktop

      You may also install mousepad in the Libertine container to get a graphical editor. However, copy-paste does not seem to work between windows.

      There are three lines starting with Exec= which needs to be adjusted to something like:

      # Exec=thunderbird %u (original)
      Exec=bash -c "GDK_DPI_SCALE=0.6 GDK_BACKEND=x11 thunderbird %u"
      
      # Exec=thunderbird -compose (original)
      Exec=bash -c 'GDK_DPI_SCALE=0.6 GDK_BACKEND=x11 thunderbird -compose'
      
      # Exec=thunderbird -addressbook (original)
      Exec=bash -c 'GDK_DPI_SCALE=0.6 GDK_BACKEND=x11 thunderbird -addressbook'
      

      This could be accomplished with using terminal command sed:

      sed -i "s|^Exec=thunderbird %u$|Exec=bash -c \"GDK_DPI_SCALE=0.6 GDK_BACKEND=x11 thunderbird %u\"|g" /home/phablet/.cache/libertine-container/noble/rootfs/usr/share/applications/thunderbird.desktop
      
      sed -i "s|^Exec=thunderbird -compose$|Exec=bash -c 'GDK_DPI_SCALE=0.6 GDK_BACKEND=x11 thunderbird -compose'|g" /home/phablet/.cache/libertine-container/noble/rootfs/usr/share/applications/thunderbird.desktop
      
      sed -i "s|^Exec=thunderbird -addressbook$|Exec=bash -c 'GDK_DPI_SCALE=0.6 GDK_BACKEND=x11 thunderbird -addressbook'|g" /home/phablet/.cache/libertine-container/noble/rootfs/usr/share/applications/thunderbird.desktop
      

      Change the scaling factor GDK_DPI_SCALE to suit your eyes. Note that on my Fairphone 4 on channel 24.04/daily it seems to require a scaling factor less than 1.0 inside the Libertine container to scale things down. From outside the container, a scaling factor
      larger than 1.0 had to be used to scale things up.

      I am not sure about how to write the first launcher which has %u at the end. The %u in a .desktop file is a placeholder that allows the launcher to accept a single URL as an argument. A mailto link example is: <a href="mailto:someone@example.com">Send Email</a>. Ideally, such a link should be able to configure to open in Thunderbird Mail. Unfortunately I have not been able to discover how to configure it in Ubuntu Touch. There should be a mailto child in:

      gsettings list-children org.gnome.desktop.default-applications

      but it does not exist. If it would exist, maybe a command like:

      gsettings set org.gnome.desktop.default-applications.mailto exec 'GDK_DPI_SCALE=0.6 GDK_BACKEND=x11 thunderbird -compose'

      would make it possible to open e-mail links in Thunderbird Mail.

      Concluding thoughts

      If all went well, you should now be able to set up any mail account and optionally create an OpenPGP encryption key to be used when sending encrypted email to somebody else whatever email provider they use, given that the recipient has a mail reader that can use your public OpenPGP key to decrypt the email message you sent them. If they also use Thunderbird Mail client, OpenPGP encryption will work in the same way on their system. Several other mail clients, such as Evolution Mail client support OpenPGP encryption in a similar way but it might require more to configure it than in Thunderbird, which is more user friendly in this particular aspect. Of course, the email meta data will most probably not be encrypted. If you wish to avoid email metadata you might want to use tuta-mail or proton-mail or any other mail that never leaves the email provider. If somebody knows how to get a mail reader for tuta-mail or proton-mail to Ubuntu Touch, I am sure some users would appreciate that.

      Having Morph browser open with several tabs and Thunderbird Mail open at the same time uses 3.1-5.9Gi RAM memory, reports terminal command free -h.

      posted in General
      M
      mango
    • RE: Most wanted features for Morph?

      I would apreciate something to get rid of the cookie questions. Something like addon "I still don't care about cookies". Maybe someone knows how to achieve it.

      posted in OS
      M
      mango
    • LaTEX texstudio pdflatex xelatex lualatex in Libertine

      TEXStudio is working in Libertine! The generation of sample documents went well. Tested on channel 24.04/daily on Fairphone 4. RAM usage topped at 2.7GB (free -h).

      Other working things that are often used together with TEXStudio in the same libertine container:

      • inkscape (vector graphics)
      • atril (pdf viewer)
      • thunar (file manager)

      Other;

      • mousepad (text editor)
      • parole (music)

      Not working as well out of the box:

      • emacs
      • gedit
      • leafpad (usable, complaining about wayland)

      Observations

      • xfce software tends to work with libertine.
      • Some windows get a window title bar that I didn't figure out how to get rid of.
      • Some apps in libertine are in bright mode. Maybe there is a way to add dark mode theme to a libertine container.
      • A libertine container can say you need to run dpkg --configure -a as root to fix an installation gone wrong. How to become root in a libertine container is not straight forward. su - not working. su phablet not working. libertine-container-manager exec -i noble -c "/bin/bash" and then fakeroot seems to work.
      posted in Libertine latex pdflatex xelatex lualatex texstudio
      M
      mango