Waydroid Container Service

What does systemctl status YourServiceName say?
9 Replies
Pixel ๐Ÿ”œ SF ๐ŸŽง
So, I've tried:
[deck@fedora ~]$ cat .local/share/systemd/user/waydroid.service
[Unit]
Description=WayDroid User Container

[Service]
ExecStart=waydroid container start

[Install]
WantedBy=default.target
[deck@fedora ~]$ cat .local/share/systemd/user/waydroid.service
[Unit]
Description=WayDroid User Container

[Service]
ExecStart=waydroid container start

[Install]
WantedBy=default.target
and
[deck@fedora ~]$ cat .local/share/systemd/user/waydroid.service
[Unit]
Description=WayDroid User Container

[Service]
ExecStart=bash -c 'waydroid container start'

[Install]
WantedBy=default.target
[deck@fedora ~]$ cat .local/share/systemd/user/waydroid.service
[Unit]
Description=WayDroid User Container

[Service]
ExecStart=bash -c 'waydroid container start'

[Install]
WantedBy=default.target
doing sudo systemctl enable /home/deck/.local/share/systemd/user/waydroid.service enables it for the system user, then you can start/stop waydroid.service just like normal, but it doesn't log anything here
[deck@fedora ~]$ sudo systemctl status -l waydroid
โ—‹ waydroid.service - WayDroid User Container
Loaded: loaded (/etc/systemd/system/waydroid.service; enabled; preset: disabled)
Drop-In: /usr/lib/systemd/system/service.d
โ””โ”€10-timeout-abort.conf
Active: inactive (dead) since Tue 2023-08-08 18:41:58 CDT; 2min 41s ago
Duration: 50.927s
Process: 20058 ExecStart=waydroid container start (code=exited, status=0/SUCCESS)
Main PID: 20058 (code=exited, status=0/SUCCESS)
CPU: 326ms

Aug 08 18:41:07 fedora systemd[1]: Started waydroid.service - WayDroid User Container.
Aug 08 18:41:58 fedora systemd[1]: Stopping waydroid.service - WayDroid User Container...
Aug 08 18:41:58 fedora systemd[1]: waydroid.service: Deactivated successfully.
Aug 08 18:41:58 fedora systemd[1]: Stopped waydroid.service - WayDroid User Container.
[deck@fedora ~]$
[deck@fedora ~]$ sudo systemctl status -l waydroid
โ—‹ waydroid.service - WayDroid User Container
Loaded: loaded (/etc/systemd/system/waydroid.service; enabled; preset: disabled)
Drop-In: /usr/lib/systemd/system/service.d
โ””โ”€10-timeout-abort.conf
Active: inactive (dead) since Tue 2023-08-08 18:41:58 CDT; 2min 41s ago
Duration: 50.927s
Process: 20058 ExecStart=waydroid container start (code=exited, status=0/SUCCESS)
Main PID: 20058 (code=exited, status=0/SUCCESS)
CPU: 326ms

Aug 08 18:41:07 fedora systemd[1]: Started waydroid.service - WayDroid User Container.
Aug 08 18:41:58 fedora systemd[1]: Stopping waydroid.service - WayDroid User Container...
Aug 08 18:41:58 fedora systemd[1]: waydroid.service: Deactivated successfully.
Aug 08 18:41:58 fedora systemd[1]: Stopped waydroid.service - WayDroid User Container.
[deck@fedora ~]$
akdev
akdevโ€ข11mo ago
You shouldn't use sudo for user-level units
Pixel ๐Ÿ”œ SF ๐ŸŽง
Iโ€ฆknow what Iโ€™m doing Iโ€™m storing the unit file as the user but Iโ€™m executing the file as rootโ€”this was intentional for testing at least it does read the file just fine and creates the symlink just fine
akdev
akdevโ€ข11mo ago
you could try disabling selinux temporarily, might be causing issues?
Pixel ๐Ÿ”œ SF ๐ŸŽง
likely correct yeah, something about the context that systemd tries to start waydroid's container in is blocked by SELinux--both the provided service and my custom service are fixed I guess I could set permissive and log what needs some love
akdev
akdevโ€ข11mo ago
Yeah, is there an existing policy already? (Like upstream or something)
Pixel ๐Ÿ”œ SF ๐ŸŽง
I would have imagined--though, it may be in mainline, but not in silverblue? interesting--gamescope supports xdg_shell, so the whole nested-compositor thing might be more diable than I thought? sway might make it easier, as you could just give sway a config that launches waydroid; but I'm kinda determined to get something working using just a session start script in ~/ endgame android apps in gamescope so you can have chat apps or whatever running in the background while your game is in the foreground--or like, offline youtube in the background with Premium, etc
Pixel ๐Ÿ”œ SF ๐ŸŽง
oh man Waydroid doesn't handle multimonitor well--I mean, how could it? but like--oof