Installing the SDK on Ubuntu 20.04

I’ve just installed the Sailfish SDK 3.1.7 on Ubuntu 20.04 and there were a couple of things I needed to do to get it working. Even though this material has already been noted elsewhere, I thought it might be helpful to have it all in one place.

Apart from the points below, I just followed the general installer instructions for the online and docker install.

  1. Ubuntu 20.04 has openssl 1.1.1 in the repos, but the online installer requires an earlier version to work as explained by Ville on TJC and pilino on FSO. Downloading and installing this version of openssl did the trick:
sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5.3_amd64.deb
  1. To install the docker version, the installing user has to be in the docker group. There’s a clear guide for installing docker on the Digital Ocean site, but the crucial part (at least that I originally missed) is this:
sudo usermod -aG docker username
// now reboot
  1. As explained by coderus, to avoid an error with the Clang Tools on startup, install libtinfo5:
sudo apt install libtinfo5

With these changes I can install and run the SDK, and build projects nicely.


Hi flypig,

Thank you for your tutorial which, I think, should be written in the SDK installation page.

I’m commenting because you wrote that you did succeed to use the SDK with Docker.

I need (not a personal choice) to use the SDK on a VM, so I figured I’d use Docker with it. Docker by itself works just fine. (I can run Ubuntu on it with docker run -it ubuntu) I did follow the same installations points as described above…

Yet here am I ^^

Problem is, I don’t know how to configure the SDK afterwards to use Docker.

The SDK works just fine but how can I configure it to display a virtual SailfishOS environment just like when using a VirtualBox (when you build an app, you can see it on a virtual machine running sailfishos with your app in it)

A picture below where, when using SDK with VirtualBox instead of Docker, an option of launching the app on a VM should be available.

When using the SDK with VB there is an additional button bellow the hammer to launch the VM and in the “Debug” tab you can pick if you want to build the app in a VM or elsewhere.

Thank you for your time and I hope I got everything right

(I’m running Debian)

You have to reistall SDK and at the very begitting of sdk installation wizard choiose docker backend instead of virtualbox one. This cannot be done after sdk installation.

I think that there are two things here. One is the environment where your code is built (which can be either docker or VirtualBox) and the other is where your code is run (which can be either VirtualBox or a real device). Unfortunately there isn’t a way to run your application in docker.

Is this what you’re trying to do, or did I misunderstand?

You can still use the VirtualBox device “emulator” even if you’re using Docker, but I’m not sure whether you can run VirtualBox inside another VirtualBox. I guess probably not.

Just to add, one thing you could consider doing is running two VMs: one with the SDK in as you already have set up (with docker running inside it), and another with the emulator. You’d need to figure out a way of getting your built application out of one VM and into the other (ideally using SSH), but this should be possible to set up with a bit of work.

Hi @coderus and @flypig and thank you for your answers

  • I did a clean install where I first installed Docker then the SDK

  • I did not understand that (the two different uses of VB and Docker) so thank you for explaining it, indeed I thought I could run the application inside a Docker (and no you can’t run a VB inside a VB)

  • I will try this second option (of SSHing the code to the emulator), so just to check if I got all things right :
    – I need create a second VB with the SailfishOS iso (which btw if you know where I can get it I’d be thankfull)
    – To whom I would send by SSH/SCP my built app and then I just need to install it in the “phone”

  • If the code can be built in a VM or a Docker… what’s the (notable) difference for the developer ?

The emulator images are available here:
If you unpack the archive you’ll find a .vdi file inside that you can install into VirtualBox.

I’d have to try this out to give you a proper answer, so will need a little time. Probably @vige (or maybe someone else on these forums) is in a better position to answer. Let me get back to you if not.

Probably the main difference is speed and convenience. The docker install should run more efficiently because it’s not virtualised. The applications that are produced will be identical.

Using the emulator images is a little bit more complex than just firing up a virtual machine with the image. Also the port forwardings and file shares need to be set up correctly. We don’t really support such, but in theory you could have a look at how they are set up in the SDK and duplicate the setup.

Yes, you can run VirtualBox inside another VirtualBox. It requires that your hardware supports nested VMs, and that you have the corresponding features enabled in BIOS.