Wayland on Focal

I want to use waydroid.
Is there a way to use wayland with Ubuntu Mate on Ubuntu 20.04?
It would be great if you could choose it at login.

1 Like

First of all I would like to thank you for this great finding. Until now (reading this thread) I used full Android Studio to run AVD with Virtual Android device via QEMU. WayDroid looks promising and more lightweight.

Then about Wayland. AFAIK it is not yet supported by MATE and Ubuntu MATE out-the-box. Some applications support it, but not whole system. Possible solution would be to install Wayland-based display manager, but this will not be Ubuntu MATE anymore. We can do this in lightweight manner by

sudo apt update
sudo apt install weston

Then we need to install Waydroid using official guide and howto or by using below commands:

sudo apt install curl ca-certificates -y

export DISTRO="$(lsb_release -cs)" && \
sudo curl -# --proto '=https' --tlsv1.2 -Sf https://repo.waydro.id/waydroid.gpg --output /usr/share/keyrings/waydroid.gpg && \
echo "deb [signed-by=/usr/share/keyrings/waydroid.gpg] https://repo.waydro.id/ $DISTRO main" | sudo tee /etc/apt/sources.list.d/waydroid.list

sudo apt update
sudo apt install waydroid python3-pip -y
sudo pip3 install pyclip

sudo waydroid init

Then reboot and login to freshly installed Weston session to run the following commands from terminals:

# 1st terminal
sudo waydroid container start
# 2nd terminal
waydroid session start
# 3rd terminal
waydroid show-full-ui

To logout from Weston session use kill -9 -1 and then select needed session from greeter menu.

Note: I'm note sure that Waydroid is fully functional nowadays, there are many similar issues reported about its problems.

2 Likes

Thanks, i got the same tip on matrix ( https://app.element.io/#/room/#ubuntu:matrix.org/$5HDXg8YdPBN_9Lsq7b6RxX6qrnYcknO3vsDxHXfxlW4 )
(It's a shame that the ubuntu mate discord isn't bridged with matrix t2bot.io - Discord Bridge )

You can start weston out of ubuntu mate.
And then start the android apps from the app drawer in mate and it will start in weston.
For example:
You open weston and then type in the ubuntu mate terminal waydroid show-full-ui and it will magically open in weston.

The only problem is, that the most other programs like evolution (no Steam) will open in the weston window, too...

The solution is there to start the programs with --display=$DISPLAY which isn't practicable in my opinion.
But Ubuntu 22.04 isn't far away =)

If the problem is with GTK+ applications, you can easily fix that by setting a little environment variable:

export GDK_BACKEND=x11

Look ma, no option switches! :slight_smile:

1 Like

I am trying to install Waydroid and I am running into this error:

The following packages have unmet dependencies:
python3-gbinder : Depends: python3 (< 3.9) but 3.10.4-0ubuntu2 is to be installed
E: Unable to correct problems, you have held broken packages.

I don't understand what this error means. I think I have some version of python3.9 installed too.