Sailfish Community News, 12th September 2024 - Flashing Line

Sailfish OS update from Jolla

It has been busy two weeks! A lot of progress in multiple fronts both in community and here at Jolla – it’s very appreciated to see that we’re doing things together. We’re aiming to update on weekly basis regarding the limited Jolla C2 community edition delivery progress. Surely, Sailfish 5 is maturing as well for the Jolla C2 production.

Jolla C2 delivery highlights

  • We got a great amount of volunteers willing to help with 4G calling testing - big thanks to all who joined! :rocket: :pray:
  • We started gradually sending links for the final payment on first come first served basis from the pre-order list
  • This week we’re preparing the mass production flashing line for C2 together with our manufacturing partner Reeder in Turkey
  • The actual mass production is booked to the end of the month, between Sept 24-30 for now :crossed_fingers:
  • We are planning participate to the Prague Hackathon organized by pherjung et al. We’ll try to get as many as possible units with us to the event so that those present could receive their C2 there on spot. :crossed_fingers:

The ones who have pre-ordered Jolla Mind2 should have received an update newsletter on your Jolla Mind2 pre-order. For further updates, please tune into the Jolla Mind2 Discord server. We’re eager to hear your thoughts and feedback!

Please enjoy this fortnight!

Energy from the Community

Repository roundup

As reported on Flypig’s blog, his huge work on moving to a newer engine for the native browser, started to get merged in the Sailfish OS repositories, also with the help of other contributors. The user facing part of the telephony stack received the ability to filter out incoming calls. And last but not least, one can notice that direc85 has now write access to the official repositories, which means he’s working directly for Jolla. LLVM, Rust and other packages were upgraded thanks to his work as a contributor and he started his new public tasks by upgrading various low level libraries.

Network and telephony stack

Native browser

Multimedia framework

Low level libraries

Developer’s corner

App roundup

It’s easy to take for granted how high the quality of screens are on modern phones. Even the venerable Xperia 10 with its IPS LCD display enjoys a resolution of 1080 x 2520 pixels at 457 ppi. At my age, that’s a higher resolution than my eyes can distinguish. Yet while the resolutions on top end phones continue to increase, sometimes it’s not pixel density that’s the important characteristic. Sometimes the size of the display is all that counts.

Cast your mind back to July 2021 and you may recall we shared an interview with Andrei (coderus) in which we discussed the apps he’s developed for Sailfish OS. One of these, Screencast, allows you to cast the picture on your phone to another device. Any device, in fact, that can access your phone across the network via a Web browser.

So today we thought we’d take a look at screen casting. We’ll cover not just casting your phone to another device, but also casting another device to your phone.

I’ve already mentioned Screencast from coderus. I was surprised to discover that, apart from said interview, the app has never appeared in the newsletter in its own right. It’s good to get the chance to rectify this today as it’s a really fantastic app. Having said that, in use it doesn’t look like an app at all, nestled as it is between the Backup and Storage entries in the Settings app. Select the Screencast entry from the list and you’ll be presented with an array of options, mostly aimed at balancing quality with latency.

At the bottom of this Settings page are the URLs you can use to connect and view the screen. Enter these into a browser on another device and voilá! Your Sailfish screen is there in the browser. The Sailflsh user interface is embelished with beautiful animations, fades, swooshes and slides, but despite this the mirrored browser image does an impressive job of keeping up, at least when running over Wifi.

It’s a brilliant app that’s both very slick in its design and rock solid in use. I’ve used it myself for live presentations where — as we all know — if something can go wrong it will go wrong. Despite this Screencast worked flawlessly with impressively effective results.

If you ever need to present your Sailfish OS device to a wider audience, I can’t recommend Screencast highly enough. Version 0.3.1 is available from both OpenRepos and Chum.

Screencast is great, but it’s not always the most appropriate way to cast material from your phone. If you want to show a video, having it download to your phone, only to then have to be re-compressed, sent across the network and decompressed again elsewhere can hit performance hard. The framerate will struggle to keep up and even if you do manage to get enough of the image, you won’t get any of the sound.

Just over a decade ago now Google came up with the Chromecast as a way to work around this. With a Chromecast dongle plugged in to a television, any Android phone can trigger the Chromecast to stream video, making it appear to be streamed directly from your phone. In practice the phone is just a controller, allowing the Chromecast to achieve great picture quality as well as low latency playback.

Sailfish OS is, of course, not Android. But that doesn’t mean we can’t join in. The Chromecaster app from Daniele Rogora (daniele) will allow you to interact with a Chromecast device as well. It does have some limitations though, the primary one being that you can only cast videos from YouTube. This still makes it a powerful tool and the quality of output you get from it is impressive. There’s some real joy to be had from controlling a Chromecast device using a phone running Sailfish OS.

Version 0.1 of Chromecaster is available from OpenRepos, but sadly has started suffering from bitrot. My first attempt to use it left me frustrated, with more error messages in the console output than videos on screen. Even more unfortunate is that there doesn’t seem to be a public git repository available for making changes to the code.

But that doesn’t have to be a barrier to getting it to work. If you have root access on your phone and are willing to risk a bit of command line shenanigans (all at your own risk of course), it is possible to get it up and running again. The procedure is a little involved, so if you do try it, please take care.

The problem is that the dependencies needed to run the underlying Python code are no longer up-to-date. So we’ll need to replace them. After SSH-ing on to your phone the first thing to do is remove the existing Python dependencies:

devel-su rm -R -- /usr/share/Cast/python/*/

Now let’s get ourselves some refreshed copies of these packages. I’m not in the habit of installing Python packages as root, so will instead install them into a virtual environment.

$ cd ~
$ python3 -m venv venv-cast
$ . ./venv-cast/bin/activate
$ pip install async-timeout==4.0.3 casttube==0.2.1 \
    certifi==2024.8.30 charset-normalizer==3.3.2 \
    idna==3.8 ifaddr==0.2.0 protobuf==3.20.0 PyChromecast==9.4.0 \
    requests==2.32.3 urllib3==2.2.2 zeroconf==0.134.0

I’ve been very precise with the versions here to avoid any mismatches. The packages are of no use to us in this location; we need to copy them over to the Chromecast’s virtual environment.

$ cd venv-cast/lib/python3.8/site-packages/
$ devel-su cp -r async_timeout casttube certifi charset_normalizer google \
    idna ifaddr pychromecast requests urllib3 zeroconf /usr/share/Cast/python/

We’re done with the virtual environment now, so can deactivate and delete it.

$ cd ../../../..
$ deactivate
$ rm -rf venv-cast

We need to make one final change to fix an issue with the icons.

$ devel-su sed -i 's/icon-l/icon-m/g' /usr/share/Cast/qml/pages/FirstPage.qml

Before running the app make sure you’ve got the URL of a YouTube video copied to the clipboard. Now when you run it you’ll be able to connect to any locally accessible Chromecast devices and control the video from your phone like magic!

If you try this you’ll immediately realise the user interface is a bit wonky, but the controls still do the job. If you’re willing to make the few hacks above then the app is worth having, with version 0.1 available from OpenRepos. If I manage to find a git repository with the app’s code, I’ll be sure to submit a pull request with these proposed changes.

We’ve looked at casting content from your phone to another device, but what if you want the reverse? If you have a machine — maybe a laptop, desktop or server — running a VNC or Virtual Network Computing server, then Sailfish OS has you covered. The VNC Screen app from Marcello Di Guglielmo (marcellodgl) is a simple and — mostly — effective way to connect to and interact with such remote devices.

After running the app simply pull down the menu to select the Connect option, enter the URL of the server, including the appropriate port and Accept the dialogue. If your server has a password you’ll be asked to enter it, after which you’ll be presented with the desktop of your remote device.

It’s a bit of a strange experience if I’m honest. Unlike the case of casting a small phone screen onto a larg television, using VNC this way feels more like interacting with your desktop while wearing boxing gloves and looking through the wrong end of a telescope. The fact it works at all is a thing of beauty, but doing anything practical on it turns out to be somewhat of a challenge.

Mark Washeim (poetaster) is to be applauded for packaging up and making available VNC Screen via the Chum repositories, where you can get yourself version 0.3. Just make sure you bring with you your sharpest eyesight and keenest dexterity.

We’ve gone full circle: from phone to remote device and back again. As always, it’s the amazing developers of Sailfish OS, building on open source packages from the wider community, who allow all this to happen. The result is that if you want to cast your screen, in whichever direction, there are some really neat Sailfish OS solutions on offer.

Please feed us your news

As always, please do not hesitate to share your ideas, thoughts, or suggestion for future newsletter topics.

Hope you enjoyed reading this one!

Please do also join us at our community meetings on IRC, Matrix and Telegram. Next community meeting will be on the 19th September. Let’s keep on working together!

25 Likes

Just for sake of completeness, the OpenRepos and Chum version aren’t exactly the same.

I took over maintenance from coderus when he retired from SFOS development, and created a fork of Screencast, and attempted to improve some small things.
This is the source for the version available from Chum (and the variant in my OR Repo).

A list of differences can be found here.

“My” versions are 0.4.x, while Andrei’s are 0.3.x. I noticed a recent update (0.3.1) in Andrei’s version, and have forward-ported it to “my” version in v0.4.4, currently on Chum:Testing.

8 Likes

Great to see you guys having fun! Cant also wait to get the next version of SFOS flashed on my brand-new Xperia 10 iV :wink:

5 Likes