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

    mango

    @mango

    3
    Reputation
    13
    Profile views
    36
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    mango Unfollow Follow

    Best posts made by mango

    • 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 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
    • 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
    • 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
    • RE: How to Change Text Size On Your Device

      Not sure if the article is still valid for 24.04 noble. Tried it, didn't notice any difference. Then I discovered app UT Tweak Tool which seems more handy than typing config files.

      In 24.04 noble, is there any way, even programmatically, to increase or decrease the different text sizes individually, as well as increase and decrease the icon sizes separately from scaling the text(s)? The scaling in app UT Tweak Tool scales everything, causing some text in some apps not being visible if the scaling is big. The default text size is quite small. In desktop mode, it seems that the scaling is different, but if adjusted it adjusts the scaling even in non-desktop-mode. Somehow, it would be desirable to have two different text(s) and icon scalings, one for the device itself standalone, and one scaling when connected in desktop mode.

      Usually, there is one text size for WindowTitles, one for Documents, one for Interface, one for Monospace and then there is usually a TextScaling factor that adjusts all text sizes (fonts) without having to tinker with each one individually. Hinting and AntiAliasing is usually also part of what you can adjust.

      posted in News
      M
      mango

    Latest posts made by mango

    • RE: Hardware recommendation for Noble

      I use a Fairphone 4 on channel 24.04/daily.

      When I did my research and asked the same questions you have, I came to the conclusion that USB3.0 display port with a wired connection to HDMI monitor was superior to any other USB2.0 device which has to use some kind of other technology to connect to another screen, but can connect a USB keyboard and a mouse.

      From my USBC3.0 display out decision I figured out that Fairphone 4 or 5 would be suitable although very expensive.

      The next question was if 6GB RAM would be enough (yes it is enough), or if I need 8GB RAM.

      I have started with the banking app world with Waydroid. It looks promising as it seems that banking apps have changed their restrictions and are ok with running on waydroid. 4.9 GiB RAM is being used while having waydroid and all other kinds of apps open, but swapping of 900 MiB has started to appear. sysctl vm.swappiness equals 100 (=max) so I lowered it to 1 to see what happens. So far no crashes. It still appears to be enough with 6GB RAM to run waydroid and apps.

      Waydroid in desktop mode on a 24 inch monitor 1920x1080 needs completely different settings than in native portrait mode 6.5 inches and I haven't figured out how to make waydroid look good in both modes. I chose landscape mode and seem to be stuck in those settings even after disconnecting the HDMI monitor, so obviously I made the wrong decision adapting waydroid to landscape desktop mode 1920x1080. For banking you would obviously want to use LibreOffice Calc next to waydroid side by side and copy-paste between waydroid and LibreOffice. Waydroid seems to require full screen landscape in desktop mode with huge text, although it would probably be ok with portrait mode waydroid on half of the monitor screen. Waydroid may need some fine tuning on Fairphone 4. It looks promising. I think it is more practical to use a Linux Desktop for banking stuff at the moment if you need to use spreadsheets at the same time.

      Fairphone 5 is the only one still being sold. Fairphone 4 is much harder to find. Usually there are sales on Fairphone 5 during times like Black Friday, but there are no units in stock to be sold over the counter, only online sales.

      There is a lot of writing about shifting customer support, lack of spare parts like extra batteries, extra USBC-ports and price point, which made me hesitate a lot.

      It didn't get better to see 12GB RAM Pixel 9/10 sell-outs for as little as 270 €, but of course: There is no port!

      I landed in that it is probably wiser to wait until a cheap 12-16GB RAM device with USB3 display out is ported.

      Fairphone 5 was the only option available at the time so it was either to accept it and be ok with the price point or wait until something like Redmi 18C with USB3 arrives and sells out for 100 €.

      The frustration is on my part that you have to anticipate which device will most probably be ported in the future and buy it when it sells out, maybe years before it gets ported. You can't easily get such a device later. On top you have this whole locked bootloader unlocking process and downgrading android if you are lucky to own a device which gets ported in the future.

      In that sense, it was Fairphone or nothing for me. Learning about repair disasters from this forum, I would think twice to go for Fairphone with what I know today.

      If you have 700 € and consider it worth taking a short term risk, go for a new Fairphone, it is definitely good enough for now. If no 700 € exist , I would personally with the knowledge I now have wait until another cheap 12-16 GB RAM device with USB3 that you can still buy appears in the Ubuntu Touch device list. Android 16 is supposed to offer desktop mode, which might push developers of devices to put in USB3. It is also common with 6000mAh batteries now and tablets most often have even more battery power. I am aware of that it might take time until more devices are ported.

      I have been looking around for posts how users with USB2 devices solve the display out need without affecting internet connection, WiFi speeds and so on.

      WiFi-7 is another thing that starts popping up and that I personally think is going to become my requirement for future devices.

      32 GB RAM seems to become the new norm on desktops, given that many wish to run local ai models which apparently need 20GB RAM to run 14B models on the graphic card.

      My Fairphone 4 is good for all I am testing out, which is generally making it into a PC using wifi. I don't use mobile data that much at the moment. My focus is to make the device useful for everything you need in daily life, on any kind of internet connection. Calls can be made via Signal, Linphone, matrix.org, so I don't really need anything more than some sort of internet. Zoom app is another thing to be aware about that does not work on Linux ARM, but probably does work in Waydroid.

      Raspberry Pi 5 with 16GB would probably be another cheap PC that fits inside your pocket, although it's wifi is reported to drop speed drastically once you move away a couple of meters from the WiFi-5 access point. It does lack a good form factor with the extra board needed for SSD hard drive to get better speed, so it is not really an option to carry around. It's ai capabilities are not super either.

      Which is why I went for a Fairphone and am trying to get all what I need to work properly on it. I think it is the only option right now, which unfortunately makes me who want USB3 become more dependent on one supplier who can do what they want. I don't like that, but it is what it is right now.

      Overall I am more than ok with my Fairphone 4. It is not bad at all, but it is an expensive toy. Maybe I was lucky to get a good unit too. It has not broken yet. You still need to be tech savvy to get everything to work the way you wish in Fairphone 4. Not much comes ready out of the box on Fairphone 4 compared to a ten year old computer with latest Linux Desktop. I would not give Ubuntu Touch to others today to use even though they already adopted Linux desktops over Windows and Apples. It is in my opinion still too complex for a newbie regular user who prefers Android and such that has been around longer. I fear I would become a constant PC support for others if I promoted Ubuntu Touch to them today. 2-3 years from now I think Ubuntu Touch will be much better for the large crowds who are not tech enthusiasts. For me personally Ubuntu Touch is good enough already today for most things I need, including python3 scripting, API calls, JSON-data and LibreOffice. Copy-paste issues in Libertine, scrolling with mouse and screenshots of individual windows and regions like you do on a Linux Desktop is my biggest concern right now. Protonvpn I wish to get working and there seems to be a way with using wireguard (search the forum to find the post). I noticed that the old PS2 mouses work better than new gaming mouses in desktop mode. Connecting other things to Fairphone 4 is for me more important than I thought previously. A couple of days ago I was able to mount a USB pendrive, today I didn't succeed to mount an external USB storage.

      posted in Devices
      M
      mango
    • RE: Merezhyvo browser

      On my Fairphone 4 channel 24.04/daily I noticed that playback of a longer video in this browser does not block screen saver. The video and sound keeps playing on a black screen and it is necessary to manually wake the screen with a push on the power button.

      I really miss the "raise-to-wake-screen" or "shake-to-wake-screen" on my Fairphone 4 in these kind of situations where the screen needs to be easily woken up.

      On Android, even the cheapest Motorola with IPS screen seems to support this "raise-or-shake-to-wake-up-screen" functionality. I think it uses the accelerometer sensor to notice the raising or shaking and does the same as if power button was pushed.

      I like that the text size on largest setting makes the text bigger. However, the text size in search bar on top, or in settings remains to be tiny. On my Fairphone 4, the largest text size looks as normal text size. The text could be enlarged two steps more in my opinion. It could have to do with high DPI on the screen itself (I think it has 400).

      posted in App Development
      M
      mango
    • RE: Ubuntu touch as PC?

      protonvpn in Libertine

      Out of curiosity I tried to install protonvpn in Libertine container in the same way one would install it on Ubuntu Desktop. Protonvpn didn't work at all, showing loads of dbus related errors. Libertine runs in chroot according to python3 error messages, which apparently complicates a lot of systemd related things. Maybe it is not impossible to fix, but I kindly request more skilled developers to look at the errors protonvpn is throwing to figure out what to do about it.

      Hopefully the protonvpn team realizes that they need to help out and make their software run also on Ubuntu Touch, not only regular Ubuntu, Debian, Fedora, openSUSE and Archlinux.

      Secure FTPS server

      I have seen discussions that there is a need for a solution where Ubuntu Touch offers some kind of server connectivity, like secure ftp with wifi hotspot so that another device can connect directly to Ubuntu Touch and share files. The Ubuntu Touch wifi hotspot serves as an access point for another device to obtain an ip address so that a connection to the server can be made with a ftps-client.

      Here is a simple working python3 ftps-server example that can be installed in a Libertine container. It has been tested with Android app CX File Explorer which has an inbuilt ftps client located in the section on the right side NETWORK/New Location/REMOTE/FTP -> choose FTPS passive explicit mode:

      FTPS server which works with Ubuntu Touch internal wifi hotspot

      #!/usr/bin/env python3                                                                 
      """                                                                                    
      FTPS server with a simple switch to enable or disable pyftpdlib debug logging.         
                                                                                             
      File name: start-ftps-server.py                                                        
                                                                                             
      Save this file in Libertine container folder:                                          
        mkdir $HOME/ftps_server                                                              
                                                                                             
      Make executable:                                                                       
        chmod +x start-ftps-server.py                                                        
                                                                                             
      Run ftps server:                                                                       
        ./start-ftps-server.py [--debug]                                                     
      or                                                                                     
        python3 start-ftps-server.py [--debug]                                               
                                                                                             
      Stop ftps server with Ctrl + C
      
      Default ftps username: user
      Default ftps password: 12345
      Default port: 2222
                                                                                             
      Install dependencies:                                                                  
        apt-get install python3-pyftpdlib python3-netifaces python3-openssl                  
                                                                                             
      Create ftp directory:                                                                  
        mkdir $HOME/Downloads/ftp                                                            
                                                                                             
      Create self-signed certificates in the same directory as the ftps server:              
        cd $HOME/ftps_server                                                                 
        openssl req -x509 -newkey rsa:4096 -keyout keyfile.pem -out certfile.pem -days 365 -nodes                                                                                   
      """
      
      import argparse
      import logging
      import netifaces
      
      from pyftpdlib.authorizers import DummyAuthorizer
      from pyftpdlib.handlers import TLS_FTPHandler
      from pyftpdlib.servers import FTPServer
      
      from OpenSSL import SSL
      
      
      def parse_args():
         parser = argparse.ArgumentParser(
             description="Start a minimal FTPS server (pyftpdlib)."
         )
         parser.add_argument(
             "--debug",
             action="store_true",
             help="Enable detailed pyftpdlib debug logging.",
         )
         return parser.parse_args()
      
      
      def configure_logging(debug: bool):
         level = logging.DEBUG if debug else logging.INFO
         logging.basicConfig(
             level=level,
             format="%(asctime)s %(levelname)s %(message)s",
         )
         logging.getLogger("pyftpdlib").setLevel(level)
      
      
      def get_current_ip() -> str | None:
         for iface in netifaces.interfaces():
             addrs = netifaces.ifaddresses(iface)
             if netifaces.AF_INET not in addrs:
                 continue
             for link in addrs[netifaces.AF_INET]:
                 ip = link.get("addr")
                 if ip and ip != "127.0.0.1":
                     return ip
         return None
      
      
      def create_ftps_server() -> FTPServer:
         authorizer = DummyAuthorizer()
         authorizer.add_user(
             username="user",
             password="12345",
             homedir="/home/phablet/Downloads/ftp",
             perm="elradfmwMT",
         )
      
         ctx = SSL.Context(SSL.TLS_METHOD)
         ctx.use_certificate_file("/home/phablet/ftps_server/certfile.pem")
         ctx.use_privatekey_file("/home/phablet/ftps_server/keyfile.pem")
      
         handler = TLS_FTPHandler
         handler.authorizer = authorizer
         handler.allow_passive_mode = True
         handler.passive_ports = range(60000, 65500)
      
         handler.ssl_context = ctx
         handler.tls_control_required = True
         handler.tls_data_required = True
      
         ip = get_current_ip()
         if ip is None:
             raise RuntimeError("No non‑loopback IPv4 address found.")
         server = FTPServer((ip, 2222), handler)
         return server
      
      
      if __name__ == "__main__":
         args = parse_args()
         configure_logging(args.debug)
      
         ftps = create_ftps_server()
         host, port = ftps.socket.getsockname()
         print(f"Starting FTPS server on {host}:{port} (debug={'on' if args.debug else 'off'})")
      
         try:
             ftps.serve_forever()
         except KeyboardInterrupt:
             print("\nServer stopped by user.")
         except Exception as exc:
             print(f"Server error: {exc}")
      
      

      Conclusions from desktop mode tests

      As you may see, most software that you find on a linux desktop does actually run well enough on Ubuntu Touch, although inside Libertine container. You can get most things done that you normally would use a desktop, laptop or notebook for.

      The absolute biggest headache is the difficulty to get copy-paste to work well between all windows, especially to and from LibreOffice.

      Screenshot functionality like xfce4-screenshooter or gnome-screenshot is wanted. It is used to grab a single window or to select a region and save it, or copy the screenshot directly into a chat. Printscreen key on a regular wired PS2 keyboard takes a screenshot of the whole screen and saves it in ~/Pictures/screenshots. I didn't get xfce4-screenshooter or gnome-screenshot to work as intended.

      Automated, simple VPN that regularly adjusts parameters and autoselects a good node is probably wanted by some users. An example of that would be the functionality of protonvpn, which exists on Android and linux desktops.

      Ability to control random MAC-addresses on public wifi networks is wanted. I read somewhere that Ubuntu Touch offers some privacy concerned MAC-address shifting when moving between public wifi networks, but it would be nice to get this verified by someone who knows more about how it works in detail.

      I think that Ubuntu Touch with Libertine can be used as a PC, a linux desktop, already now. It passed the test to be considered good enough. Once the copy-paste functionality works to satisfaction, it will be many user's choice.

      If the device supports USB3.0 display out so that you can connect Ubuntu Touch to an external monitor, mouse/touchpad, keyboard and external harddisk or pendrive, you really get the PC experience already in my opinion as a newbie myself.

      For USB2.0 devices, it would be good to know exactly what is needed to connect to needed periferals including a monitor and compare the cost to a device which offers USB3.0 display out.

      I have come to understand that the USB-port is used quite a lot more than one expects, which makes it the most sensitive part that eventualy will stop working at some point.

      RAM memory 6GB seems to be enough for all the use cases I went through. Most of the time I see 2.5-4.2 GiB RAM used, with the absolute top at 5.9 GiB. Thunderbird and Firefox do not eat as much RAM as I thought they would do.

      Hopefully these use cases give readers a bit more feeling for what Ubuntu Touch in desktop mode can offer at the present, using snaps and Libertine container. It gets better each day, as more and more users start to experiment with it and share their findings.

      Conclusions about native mode

      Desktop mode on a 24 inch monitor offers several ways to increase text sizes so that people with not perfect eyesight can adjust the zoom.

      The native mode when using the mobile device screen by itself does not offer as much scaling capability as the desktop mode without messing up the look and feel. As a consequence, it may at times be quite difficult to see miniature text smaller than 1mm without a magnifying glass.

      If Ubuntu Touch is meant for a larger target group, each app has to implement text scaling capabilities so that text can be shown bigger for those who need it without ruining the functionality of the app. Preferably, the text size settings should be set in Ubuntu Touch settings on a global level, which are then used by each app to show the text in the desired size. Android has this functionality from very early versions and new Ubuntu Touch users are going to look for these text scaling settings in the Ubuntu Touch settings.

      I think users would benefit from an app naming convention that clearly indicates if a native Ubuntu Touch app is supposed to run in desktop mode for improved visibility. As an example, Linphone that is usable on a device screen size five or six inches should be called Linphone. Linphone-Desktop clearly indicates that the app needs desktop mode for visibility reasons. Every app meant to be used on the device without desktop mode should be able to display large text for better visibiltiy without falling over the edge. Another example: Brave browser should be visible and usable on a small screen, otherwise it should be called Brave-Desktop to indicate that you need desktop mode to use the app for better visibility. Yet another example: Thunderbird should be usable on a small screen versus Thunderbird-Desktop which is supposed to be used in desktop mode for greater visibility. Preferably, an app should be able to be useful and have visible text on a small screen as well as in a scaled-up desktop mode.

      posted in General
      M
      mango
    • RE: Ubuntu touch as PC?

      vlc

      vlc is a good media player that can show subtitles.

      To install vlc, there is nothing more needed than:

      lirsh
      
      fakeroot
      
      apt-get update
      
      apt-get install vlc
      
      exit # jump out of fakeroot
      
      exit # jump out of lirsh
      
      if [ -d /home/phablet/.local/share/icons/hicolor ]; then
        touch /home/phablet/.local/share/icons/hicolor
      else
        mkdir -p /home/phablet/.local/share/icons/hicolor/scalable/apps
        wget -O /home/phablet/.local/share/icons/hicolor/index.theme https://github.com/matthewbauer/appstream-generator/raw/refs/heads/master/data/hicolor-theme-index.theme
      fi
      

      Optionally, if you want the text a bit bigger in vlc you can adjust the Libertine container file /usr/share/applications/vlc.desktop line that starts with Exec= to something like:

      # Exec=/usr/bin/vlc --started-from-file %U
      Exec=bash -c "QT_USE_PHYSICAL_DPI=1 QT_SCALE_FACTOR=1.4 GDK_BACKEND=x11 /usr/bin/vlc --started-from-file %U"
      

      If you prefer to do this with the help of sed:

      lirsh
      
      sed -i "s|^Exec=.*$|Exec=bash -c \"QT_USE_PHYSICAL_DPI=1 QT_SCALE_FACTOR=1.4 GDK_BACKEND=x11 /usr/bin/vlc --started-from-file %U\"|g" /usr/share/applications/vlc.desktop
      

      You can also edit this file from outside Libertine container:

      find / -name vlc.desktop 2>/dev/null
      # Output (it is the same file)
      /userdata/user-data/phablet/.cache/libertine-container/noble/rootfs/usr/share/applications/vlc.desktop
      /home/phablet/.cache/libertine-container/noble/rootfs/usr/share/applications/vlc.desktop
      
      
      # Adjust the scaling
      sed -i "s|^Exec=.*$|Exec=bash -c \"QT_USE_PHYSICAL_DPI=1 QT_SCALE_FACTOR=1.4 GDK_BACKEND=x11 /usr/bin/vlc --started-from-file %U\"|g" /home/phablet/.cache/libertine-container/noble/rootfs/usr/share/applications/vlc.desktop
      

      Observations

      • You may need to resize the window to show the whole video.
      • In full screen mode, it feels like the video skips frames or stutters. Make the window smaller, and it will flow better. If you open a video in the media player outside Libertine, the same video will flow faster or better than in vlc running inside the Libertine container. If this has to do with hardware acceleration not being used, it would explain why the video window size matters for rendering.
      posted in General
      M
      mango
    • RE: Ubuntu touch as PC?

      Scribus in Libertine

      Scribus is written in qt, which means we can reuse the knowledge above from installing Linphone-Desktop.

      To install scribus in libertine container, do the following:

      lirsh
      
      fakeroot
      
      apt-get update
      
      apt-get install scribus
      
      exit # jump out of fakeroot
      
      # Adjust scaling
      sed -i "s|^Exec=scribus %f$|Exec=bash -c \"QT_USE_PHYSICAL_DPI=1 QT_SCALE_FACTOR=1.5 GDK_BACKEND=x11 scribus %f\"|g" /usr/share/applications/scribus.desktop
      
      exit # jump out of lirsh
      
      if [ -d /home/phablet/.local/share/icons/hicolor ]; then
        touch /home/phablet/.local/share/icons/hicolor
      else
        mkdir -p /home/phablet/.local/share/icons/hicolor/scalable/apps
        wget -O /home/phablet/.local/share/icons/hicolor/index.theme https://github.com/matthewbauer/appstream-generator/raw/refs/heads/master/data/hicolor-theme-index.theme
      fi
      

      Now, scribus should be visible in Ubuntu Touch main menu.

      Testing

      • I created a pdf from the layout, which worked and showed in atril document viewer.
      posted in General
      M
      mango
    • RE: Ubuntu touch as PC?

      There is a PPA for the new gimp3 which you can test in Libertine container.

      gimp3

      gimp is a great image manipulation tool. gimp version 3 seems to only exist in PPA for noble (24.04) and you may want to compare it with the snap version which is installed with sudo snap install gimp.

      To install gimp version 3 in Libertine container, use Libertine Tweak Tool from Openstore to activate lirsh. In a freshly opened terminal, enter these commands:

      lirsh
      
      fakeroot
      
      add-apt-repository ppa:ubuntuhandbook1/gimp-3
      
      apt install gimp libgegl-0.4-0t64 libbabl-0.1-0
      
      exit # jump out of fakeroot
      
      exit # jump out of lirsh
      
      if [ -d /home/phablet/.local/share/icons/hicolor ]; then
        touch /home/phablet/.local/share/icons/hicolor
      else
        mkdir -p /home/phablet/.local/share/icons/hicolor/scalable/apps
        wget -O /home/phablet/.local/share/icons/hicolor/index.theme https://github.com/matthewbauer/appstream-generator/raw/refs/heads/master/data/hicolor-theme-index.theme
      fi
      

      Now gimp3 icon should be visible in Ubuntu Touch main menu.

      posted in General
      M
      mango
    • RE: Ubuntu touch as PC?

      Since testing out core software is exciting, let's look at how LibreOffice can be installed.

      Installing LibreOffice in Libertine

      LibreOffice can be installed with terminal command: sudo snap install libreoffice .

      Let's do a PPA install of LibreOffice-fresh inside Libertine for a change. Chances that someone working with LibreOffice development is also using Ubuntu Touch is probably greater than zero. Any adaptations are likely to be seen on the fresh PPA, rather than the stable PPA.

      We need command add-apt-repository from package software-properties-common. We also need Libertine Tweak Tool from Openstore where we need to activate lirsh in our Libertine noble container. Once that is done, open terminal and enter these commands:

      lirsh # to enter the Libertine noble container
      
      fakeroot
      
      apt-get update                                                                         
      
      apt-get upgrade                                                                        
      
      apt-get install software-properties-common
      

      Check that there are no missing packages and that everything is installed before you continue. If needed, install the missing packages manually or use:

      apt-get upgrade --fix-missing

      The LibreOffice-fresh PPA is installed as follows:

      add-apt-repository ppa:libreoffice/ppa
      
      apt-get update
      
      apt-get install libreoffice
      
      exit # jump out of fakeroot
      
      exit # jump out of lirsh
      

      Since I came to the conclusion that Xft.dpi: 120 is a good starting point for experimentation in Libertine container noble on a Fairphone 4, let's edit file .Xdefaults located here (it is the same file):

      # outside of lirsh
      find / -name .Xdefaults 2>/dev/null
      Output:
      /userdata/user-data/phablet/.local/share/libertine-container/user-data/noble/.Xdefaults
      /home/phablet/.local/share/libertine-container/user-data/noble/.Xdefaults
      
      
      cat /home/phablet/.local/share/libertine-container/user-data/noble/.Xdefaults
      Output:
      # default: Xft.dpi:197
      Xft.dpi: 120
      xterm*faceName: DejaVu Sans Mono
      xterm*faceSize: 10
      
      
      # Inside Libertine container
      lirsh
      cat ~/.Xdefaults
      

      Setting Xft.dpi: 120 means that we will need to change the scaling of all the other apps in Libertine container that we set up earlier with the help of command sed. Here I put the scaling to 1.0 to remove any extra scaling but you may want another value for some apps.

      sed -i "s|GDK_DPI_SCALE=0.6|GDK_DPI_SCALE=1.0|g" /usr/share/applications/emacs.desktop
      
      sed -i "s|GDK_DPI_SCALE=0.6|GDK_DPI_SCALE=1.0|g" /usr/share/applications/thunderbird.desktop 
      
      sed -i "s|GDK_DPI_SCALE=0.6|GDK_DPI_SCALE=1.0|g" /usr/share/applications/firefox.desktop 
      
      sed -i "s|GDK_DPI_SCALE=0.6|GDK_DPI_SCALE=1.0|g" /usr/share/applications/brave-browser.desktop
      
      exit # jump out of lirsh
      
      if [ -d /home/phablet/.local/share/icons/hicolor ]; then
        touch /home/phablet/.local/share/icons/hicolor
      else
        mkdir -p /home/phablet/.local/share/icons/hicolor/scalable/apps
        wget -O /home/phablet/.local/share/icons/hicolor/index.theme https://github.com/matthewbauer/appstream-generator/raw/refs/heads/master/data/hicolor-theme-index.theme
      fi
      

      Now LibreOffice-fresh icons should be visible in Ubuntu Touch main menu.

      The amazing part is that this fresh version of LibreOffice works flawlessly in Ubuntu Touch Libertine container, apart from the well known issue of copy paste not working between browswer(s) and other windows.

      To illustrate that it works also with python3 scripting using uno, the following python3 test script makes libreoffice produce a sample document with a square paper size 10x10cm with some text on it, saves it as ODT and as PDF in the same directory as the script itself. The pdf document can be opened with atril document viewer. Another option would be to install evince document viewer.

      lirsh
      
      fakeroot
      
      apt-get update
      
      apt-get install atril # or: evince
      
      exit # jump out of fakeroot
      

      Testing

      #!/usr/bin/env python3
      """
      File name: create10x10.py
      Create a 10 × 10 cm LibreOffice Writer document, add a heading and Lorem Ipsum,
      save as ODT and PDF. The script starts LibreOffice head‑less automatically.
      """
      
      import os, sys, time, subprocess, socket, uno
      from com.sun.star.beans import PropertyValue
      from com.sun.star.text.ControlCharacter import PARAGRAPH_BREAK
      
      HOST = "127.0.0.1"
      PORT = 2002
      SOCKET_URL = f"uno:socket,host={HOST},port={PORT};urp;StarOffice.ComponentContext"
      LIBREOFFICE_CMD = [
          "soffice",
          "--headless",
          f'--accept=socket,host={HOST},port={PORT};urp;StarOffice.ComponentContext',
      ]
      
      def _props(**kw):
          return tuple(PropertyValue(Name=k, Value=v) for k, v in kw.items())
      
      def _socket_open(host, port):
          with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
              s.settimeout(0.5)
              try:
                  s.connect((host, port))
                  return True
              except (ConnectionRefusedError, socket.timeout):
                  return False
      
      def _start_lo():
          print("Starting LibreOffice head‑less...")
          proc = subprocess.Popen(
              LIBREOFFICE_CMD,
              stdout=subprocess.DEVNULL,
              stderr=subprocess.DEVNULL,
          )
          for _ in range(10):
              if _socket_open(HOST, PORT):
                  break
              time.sleep(0.5)
          else:
              proc.terminate()
              raise RuntimeError("LibreOffice did not open the UNO socket in time.")
          print("LibreOffice ready.")
          return proc
      
      def main(out_dir="."):
          lo_proc = None
          if not _socket_open(HOST, PORT):
              lo_proc = _start_lo()
          else:
              print("Found existing LibreOffice UNO socket.")
      
          # Connect to UNO
          local_ctx = uno.getComponentContext()
          resolver = local_ctx.ServiceManager.createInstanceWithContext(
              "com.sun.star.bridge.UnoUrlResolver", local_ctx
          )
          ctx = resolver.resolve(SOCKET_URL)
          smgr = ctx.ServiceManager
      
          desktop = smgr.createInstanceWithContext("com.sun.star.frame.Desktop", ctx)
          doc = desktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, ())
      
          # ---- Page size (language‑independent) ----
          page_styles = doc.getStyleFamilies().getByName("PageStyles")
          page_style = page_styles.getByIndex(0)          # first page style = default
          cm_to_hundredths = lambda cm: int(cm * 1000)    # 1 cm = 10 mm = 100 hundredths of mm
          page_style.Width  = cm_to_hundredths(10)
          page_style.Height = cm_to_hundredths(10)
      
          # ---- Insert heading (Heading 1 style) ----
          cursor = doc.Text.createTextCursor()
          cursor.ParaStyleName = "Heading 1"
          doc.Text.insertString(cursor, "Sample Heading", False)
          doc.Text.insertControlCharacter(cursor, PARAGRAPH_BREAK, False)
      
          # ---- Insert Lorem Ipsum as body text ----
          cursor.ParaStyleName = "Standard"
          lorem = (
              "Lorem ipsum dolor sit amet, consectetur adipiscing elit. "
              "Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. "
              "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris "
              "nisi ut aliquip ex ea commodo consequat."
          )
          doc.Text.insertString(cursor, lorem, False)
      
          # ---- Save ODT ----
          odt_path = os.path.abspath(os.path.join(out_dir, "sample.odt"))
          doc.storeToURL(uno.systemPathToFileUrl(odt_path), _props(FilterName="writer8"))
      
          # ---- Export PDF ----
          pdf_path = os.path.abspath(os.path.join(out_dir, "sample.pdf"))
          doc.storeToURL(uno.systemPathToFileUrl(pdf_path), _props(FilterName="writer_pdf_Export"))
      
          doc.close(True)
          print(f"Created: {odt_path}")
          print(f"Exported: {pdf_path}")
      
          if lo_proc:
              lo_proc.terminate()
              lo_proc.wait()
      
      if __name__ == "__main__":
          main(sys.argv[1] if len(sys.argv) > 1 else ".")
      

      To run the test, you can do it in two ways:

      a. Either run the script with python3: python3 create10x10.py
      or
      b. Make the script executable: chmod +x create10x10.py; ./create10x10.py

      Observations

      • Copy-paste functionality is glitchy. I haven't figured out how to copy selected text from a web browser (Morph qt6, firefox, brave) into LibreOffice (snap, PPA).
      • I noticed fewer issues with LibreOffice-fresh from PPA than with snap.
      • It is possible to use LibreOffice scripting functionality.
      posted in General
      M
      mango
    • RE: Ubuntu touch as PC?

      Emacs

      Emacs: an editor for text and code with infinite adaptation possibilities

      I have been using Emacs extensively on Ubuntu Touch as text and code editor.

      I only got Emacs to work inside a Libertine container, since Emacs cannot find its libraries otherwise.

      Emacs can be adapted in the same way as Firefox inside Libertine container to scale well.

      The only issues I have seen with Emacs so far is that the menus do not show one out of three times.

      Keyboard shortcuts, Ctrl, Meta (usually the Alt key left from space bar) and Lisp functions cover all the needs of reformating text. MELPA is a repository with lots of add-ons to deal with things like beautifying html and css code, viewing EPUBs and playing games. When using linux, Emacs is probably one of the tools which is good to know about and use. Of course there are other tools which are equally good. I invite readers to share their view on which tools that are best to use as editors in Ubuntu Touch.

      Install Emacs in Libertine

      lirsh
      
      fakeroot
      
      apt-get update
      
      apt-get install emacs
      

      Adjust the emacs.desktop line that starts with Exec= to suit your eyes. I currently use these lines with default Xft.dpi: 197 setting:

      # TryExec=/usr/bin/emacs
      TryExec=bash -c 'GDK_DPI_SCALE=0.6 GDK_BACKEND=x11 /usr/bin/emacs'
      # Exec=/usr/bin/emacs %F
      Exec=bash -c "GDK_DPI_SCALE=0.6 GDK_BACKEND=x11 /usr/bin/emacs %F"
      
      posted in General
      M
      mango
    • RE: Ubuntu touch as PC?

      Out of curiosity, I tried to get Linphone-Desktop to function properly in desktop mode on my Fairphone 4 channel 24.04/daily.

      Linphone-Desktop

      Linphone-Desktop exists in many versions:

      • AppImage(s) 4.x.y to 6.x.y, alphas, betas, nightly
      • qt5 version(s) 5.x.y
      • DEB version(s) 5.x.y to 6.x.y
      • qt6 version(s) 6.x.y

      The ugliest install is probably the qt6 version straight from the main branch available on gitlab or github. I went for the main branch version in the trial to see if it would work.

      Compiling Linphone-Desktop is probably worth an essay by itself, but it is pretty straight forward to set CMAKE options where necessary.

      Packaging Linphone-Desktop into an installable DEB is probably worth another essay.

      It is also possible to unpack the AppImage version into a Libertine container somewhere like /opt/linphone and adjust LD_LIBRARY_PATH variable to give the executable a chance to find all libraries inside /opt.

      When launching from command line, there was a complaint about a missing qt6 module named Suru, but I kept re-launching the same command 3-5 times until Linphone-Desktop launched anyway without Suru module. The successfull Libertine container noble launch command was entered five times like this:

      QT_USE_PHYSICAL_DPI=1 QT_SCALE_FACTOR=0.8 GDK_BACKEND=x11 LD_LIBRARY_PATH="/opt/Qt6.10.2/lib:/opt/linphone/lib:$LD_LIBRARY_PATH" /opt/linphone/bin/linphone -V

      Remark: Sometimes Linphone-Desktop launches at first or third attempt. Linphone-Desktop should compile with any qt bigger or equal to version 6.10.0 (I used qt6.10.2). The initial launch showed such a tiny text in desktop mode that it was not readable at all. Some tinkering with variables in command line launch made the text bigger and the app more useful.

      Testing

      • Linphone-Desktop offers encryption of different types, such as PostQuantum ZRTP, which worked.
      • Several different sound card options appeared in the settings, of which the Droid soundcard worked.
      • Tested encrypted chat message delivery which worked.
      • Tested encrypted voice call (SIPS-protocol) with opus codec which worked.
      • Video camera did not work. Only static picture could be selected in the settings, which worked and was shown.

      Observations

      • Earlier versions of Ubuntu Touch have a native Linphone, which I think would be nice to have in noble as well. It may not offer the advanced encryption available in version 6, but still good enough performance compatible with other SIP-softphones.
      • Ubuntu Touch noble (24.04) does not have a native Linphone or any other SIP-softphone as far as I am aware.
      • On devices that do not meet operator's VoLTE requirements, a SIPS-softphone is an alternative for calls. Signal-Desktop, SignalUT is another voice calling option. Matrix.org yet another calling option.
      • I was not expecting Linphone-Desktop version 6 to work on Ubuntu Touch noble as well as it performed. Sound quality was good and chats were delivered as expected. Some icons were too large, but visible.
      • Wired external display functionality (USB3.0 display out) seems to be a more than neccessary feature of a device that for the moment requires desktop mode to show windows which are too large for a mobile screen dimension.
      • It should in theory be possible to port the Android version of Linphone to Ubuntu Touch, given that Linphone-Desktop works out of the box more or less. Maybe the developers of Linphone would be interested in helping out with that.
      • Since apps scale differently in Ubuntu Touch and Libertine, it is probably necessary to start off by selecting a Xft.dpi setting that suits most apps that do not honour any other gtk scaling variables. Linphone-Desktop and Brave are two such apps that are difficult to scale properly and should indicate proper value of Xft.dpi. I have come to an understanding that for Fairphone 4, Xft.dpi: 120 could be a good starting point for experimentation. The default Xft.dpi: 197 is probably too high scaling for Fairphone 4 in most of the test cases available on this page. If this has to do with the resolution and size of the screen itself, I do not know at this stage.
      • Having all kinds of windows open together with Linphone-Desktop uses 4.2 GiB RAM memory reports free -h.
      posted in General
      M
      mango
    • RE: Ubuntu touch as PC?

      Out of curiosity, I tried to get Brave web browser to function properly in desktop mode on my Fairphone 4 channel 24.04/daily.

      Brave browser (stable version) exists as snap as well as DEB and can be installed both ways. For comparison I installed both types to compare which one worked better on my Fairphone 4.

      From my testing I concluded that there is no difference in functionality. Both versions do not show the hamburger menu when clicked at the top right corner. The easiest installation was via snap, which took quite some time to complete. The DEB install was quicker and required tinkering with scaling.

      Brave installation via snap

      Open a terminal and type:

      sudo snap install brave

      Update all snaps with:

      sudo snap refresh

      When installation has finished, open Brave browser through Ubuntu Touch main menu or command line: brave

      To access the settings when hamburger menu is not working, type this in the address field: brave://settings

      Search for the setting exit and modify a keyboard shortcut (example: Ctrl + Q) to be able to quit the application the same way as you would be able to do using the hamburger menu if it was functional.

      Brave browser installation in Libertine

      Install Libertine Tweak Tool from Openstore.

      Activate lirsh command with Libertine Tweak Tool.

      On my Fairphone 4, the default container (look at the top of the tweak tool) is set to container name focal. I had to manually change focal to noble. Maybe the Libertine Tweak Tool could do this automatically as an improvement.

      Open a terminal window and type:

      lirsh
      
      fakeroot
      
      curl -fsS https://dl.brave.com/install.sh | sh
      
      exit # jump out of fakeroot
      

      The brave-browser.desktop did not automatically show up in Ubuntu Touch main menu. After touching folder ~/.local/share/icons/hicolor outside of the Libertine container, it appeared in the Ubuntu Touch main menu.

      Brave browser in Libertine only seem to honor the Xft.dpi setting in Libertine container ~/.Xdefaults. A one-line-command which sets the scaling would look like (here I use the value 120, you may want another value):

      # lirsh
      xrdb -merge <<< "Xft.dpi: 120"; GDK_BACKEND=x11 brave-browser
      

      Testing

      • Chrome web store extension Dark Reader works as intended.
      • Cookie popup windows do not show.
      • Unwanted ads are blocked.
      • duck.ai working.
      • Copy-paste (actually: Ctrl+C, Ctrl+V) seem to work from Brave browser to emacs (Libertine), firefox (Libertine), but not to mousepad (Libertine), not to Morph browser (qt6). Right-click copy option does not seem to exist.

      Observations

      • Copy-paste between different windows is glitchy. Some apps work to paste into, some don't. It seems the clipboard functionality needs an improvement to be solid.
      • Hamburger menu in top right corner does not open.
      • The Quit browser function has to be accessed via a custom new keyboard shortcut (I created shortcut: Ctrl + Q). This can be tied to a privacy cleanup to delete browser data in brave://settings on Brave exit. Killing the app with clicking the windows handler x maybe does not trigger the cleanup functionality by Quit at all times.
      • Having all sorts of windows open with several tabs at the same time uses 3.9Gi RAM memory, reports terminal command free -h.
      posted in General
      M
      mango