waydroid / docs

https://docs.waydro.id/
16 stars 45 forks source link

Fix, improve script for running waydroid in weston #44

Open Boruch-Baum opened 1 year ago

Boruch-Baum commented 1 year ago

1) Running konsole as written doesn't work 2) No need to sleep 3) Added logic to show how to create a nicely proportioned waydroid window

Quackdoc commented 1 year ago

whats the point of the xdpyinfo stuff? when launching weston as the main compositor it should automatically chose the optimal resolution. also doesn't xdpyinfo need to be launched inside of a compositor? I don't see how this is useful for a waydroid only session.

the sleep is used to make sure that weston has time to actually start up when launching a new session.

exporting wayland session shouldn't be needed since waydroid will typically inherit it from inside the compositor.

Boruch-Baum commented 1 year ago

Hi. Thanks that someone has finally taken notice of the PR. I thought the project had gone stale or something.

1) About xdpyinfo: 1a) As I wrote in the commit's comment, it's "logic to show how to create a nicely proportioned waydroid window" 1b) The prior code does NOT "choose the optimal value", it seizes all of its parent's windows size, which for many people running a desktop will be undesirable. In my case, my desktop has a modern 'wide' (landscape) screen, but my expectation for android emulation is for the presentation to be similar to that of my phone, in 'thin' (portrait) layout. The code snippet fetches the parent window's dimensions, and applies the golden ratio to it's height to produce a width value. 1c) It does, and it is. 1d) Back to '1a', above.

2) About the 'sleep'. With my code, the sleep is unnecessary. Three seconds is also a really long time.

3) About "exporting wayland session". The ID of the session most definitely did need to be set, and then be exported. That was part of the trial-and-error experience behind getting the snippet to work.

I've been using this modification since I posted the code in March, over three months ago.

Quackdoc commented 1 year ago

all in all im not opposed, just a couple issues

Boruch-Baum commented 1 year ago

I'm also using sddm (debian, version 0.19.0-5). My environment is debian 12 bookworm, kde (debian plasma-desktop version 4:5.27.5-2), weston (debian version 10.0.1-1+b1). For me, this patch was also working before the dist-upgrade to bookworm.

What should happen visually is that immediately there should appear a weston compositor window in the 9:16 portrait dimensions with its default background. Then it loads waydroid. For me, this has always been an agonizingly slow process, even without the patch. It takes my system about five to ten seconds to load waydroid. Waydroid immediately displays by default for me an astronomy/nebula wallpaper and then loads the icons of the installed apps that I've selected for my home screen.

Double-checked just now.

On 2023-07-08 22:33, Mitchel Stewart wrote:

all in all im not opposed, just a couple issues

  • This doesn't work for me when launching via SDDM, seems like it needs more testing, what greeter did you use?
  • the expectation for a lot of users is for it to be running using the full screen, I'm not opposed to 16:9 form factor, but it should be a separate entry, not a replacement, and should be made clear the distinction between the two.

    — Reply to this email directly, [1]view it on GitHub, or [2]unsubscribe. You are receiving this because you authored the thread. Message ID: @.***>

References

  1. https://github.com/waydroid/docs/pull/44#issuecomment-1627611789
  2. https://github.com/notifications/unsubscribe-auth/AAOE3KEGZSUAK54DV75QI6LXPI7CZANCNFSM6AAAAAAWARHWEI

-- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0

Boruch-Baum commented 1 year ago

I agree about being user-friendly about the form factor.

IMO, waydroid should remember the sizing used last by the user. I mean that if the user resizes a waydroid instance, that form factor should be used on the next waydroid launch.

Additionally, there should be some kind of easily accessible relevant config variable, and config file. As it stands, waydroid doesn't have any presence in $HOME/.config ($XDG_CONFIG).

My memory is that it was because of my frustration with those issues that I put the form factor snippet in the code in the first place -- ie. no config option, and no resize memory.

On 2023-07-08 22:33, Mitchel Stewart wrote:

all in all im not opposed, just a couple issues

  • This doesn't work for me when launching via SDDM, seems like it needs more testing, what greeter did you use?
  • the expectation for a lot of users is for it to be running using the full screen, I'm not opposed to 16:9 form factor, but it should be a separate entry, not a replacement, and should be made clear the distinction between the two.

    — Reply to this email directly, [1]view it on GitHub, or [2]unsubscribe. You are receiving this because you authored the thread. Message ID: @.***>

References

  1. https://github.com/waydroid/docs/pull/44#issuecomment-1627611789
  2. https://github.com/notifications/unsubscribe-auth/AAOE3KEGZSUAK54DV75QI6LXPI7CZANCNFSM6AAAAAAWARHWEI

-- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0

Quackdoc commented 1 year ago

wait, are you launching this from within kde as nested? these docs are for launching weston as the primary compositor and then running waydroid in that. I just verified and xdpyinfo does need to be launched inside of a compositor running from something like TTY wont work with this.

electrikjesus commented 1 year ago

I would suggest making this PR a separate doc entry for running as a nested window.

Boruch-Baum commented 1 year ago

From sddm, I'm running kde-plasma as a non-wayland session, and launching weston/waydroid within that.

On 2023-07-09 18:53, Mitchel Stewart wrote:

wait, are you launching this from within kde as nested? these docs are for launching weston as the primary compositor and then running waydroid in that. I just verified and xdpyinfo does need to be launched inside of a compositor running from something like TTY wont work with this.

— Reply to this email directly, [1]view it on GitHub, or [2]unsubscribe. You are receiving this because you authored the thread. Message ID: @.***>

References

  1. https://github.com/waydroid/docs/pull/44#issuecomment-1627953592
  2. https://github.com/notifications/unsubscribe-auth/AAOE3KCU4H7VJXZWL67ZJVTXPNOCZANCNFSM6AAAAAAWARHWEI

-- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0

Quackdoc commented 1 year ago

yes, that is a nested session, this docs page is for using waydroid only as a single isolated session. however as electrikjesus it would be great to have a separate entry in the docs for nested sessions!