28
submitted 1 year ago* (last edited 1 year ago) by db2@sopuli.xyz to c/android@lemmy.world

In order to get an Android-only app working on a desktop computer I installed Weston and Waydroid which worked, but as I (and the target machine) run Mint 21 it's not as simple as just running Waydroid and having it work, plus there is no way to close out Waydroid from within itself. In order to make it easier to start and stop I made this little script, run it once to start and again to stop. Edit as needed obviously but this should work as-is.

Edit: the & is not correct, lemmy is doing that, edit it to remove the amp; parts

#!/bin/bash
PID=$(pgrep "weston")
if [ "$?" -eq "0" ]; then
    waydroid session stop
    kill $PID
    exit
fi
weston --width=1920 --height=1080 --socket=wayland-1 &>/dev/null &
sleep 5
WAYLAND_DISPLAY=wayland-1 XDG_SESSION_TYPE=wayland waydroid show-full-ui
top 2 comments
sorted by: hot top controversial new old
[-] Rikj000@discuss.tchncs.de 4 points 1 year ago* (last edited 1 year ago)

Hi, I've been struggling with similar things lately.

So I spent the day writing out a launcher tool similar to yours, but a bit more full featured :)

Check it out at: https://github.com/Rikj000/XWaydroid

Right now it only works for KWin_Wayland though,
which in my experience has been more stable / easy to work with compared to Weston/Cage.

However I'm open to merge in support for them too :D

[-] AlmightySnoo@lemmy.world 3 points 1 year ago* (last edited 1 year ago)

Cool thanks! I also played around with Waydroid and it's amazing, it can run Android games at near native speed provided they have x86 binaries (otherwise it's going to be using Arm emulation, which is very slow). I pasted your script on termbin to get rid of the & escaping by Lemmy: https://termbin.com/x704

this post was submitted on 21 Oct 2023
28 points (88.9% liked)

Android

27855 readers
60 users here now

DROID DOES

Welcome to the droidymcdroidface-iest, Lemmyest (Lemmiest), test, bestest, phoniest, pluckiest, snarkiest, and spiciest Android community on Lemmy (Do not respond)! Here you can participate in amazing discussions and events relating to all things Android.

The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:

Rules


1. All posts must be relevant to Android devices/operating system.


2. Posts cannot be illegal or NSFW material.


3. No spam, self promotion, or upvote farming. Sources engaging in these behavior will be added to the Blacklist.


4. Non-whitelisted bots will be banned.


5. Engage respectfully: Harassment, flamebaiting, bad faith engagement, or agenda posting will result in your posts being removed. Excessive violations will result in temporary or permanent ban, depending on severity.


6. Memes are not allowed to be posts, but are allowed in the comments.


7. Posts from clickbait sources are heavily discouraged. Please de-clickbait titles if it needs to be submitted.


8. Submission statements of any length composed of your own thoughts inside the post text field are mandatory for any microblog posts, and are optional but recommended for article/image/video posts.


Community Resources:


We are Android girls*,

In our Lemmy.world.

The back is plastic,

It's fantastic.

*Well, not just girls: people of all gender identities are welcomed here.


Our Partner Communities:

!android@lemmy.ml


founded 1 year ago
MODERATORS