Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wayland support #15

Open
balsoft opened this issue Jan 29, 2020 · 3 comments · May be fixed by #16
Open

Wayland support #15

balsoft opened this issue Jan 29, 2020 · 3 comments · May be fixed by #16
Labels

Comments

@balsoft
Copy link

@balsoft balsoft commented Jan 29, 2020

Currently appvm uses X11/Xorg. This issue is for experimentation with Wayland, with eventual goal being to have optional Wayland support without Xorg on the guest, and maybe to pass windows to the host more directly with waypipe.
Possible approaches

  • cage (or other simple wayland compositor)
    Cage is a simple compositor that starts a single application full-screen and quits as soon as that application quits.
    Problems: no support for automatic resizing or other features of SPICE. It's a deal-breaker, as the almost-native experience that we thrive for is ruined by the need to capture pointer and keyboard, and the window does not resize correctly.
    Possible solution: write a daemon that reacts to SPICE events.
    Things done

    • mingetty autologins user, cage starts from loginShellInit
      Problems: not very fast, feels bodgy
    • cage replaces getty, logs in via a PAM module (as suggested upstream)
    • Make cage understand SPICE (either by patching cage or by writing a shim`
    • Find another wayland compositor that already knows SPICE
  • GNOME3
    Gnome3 supports SPICE natively or maybe not, see the following

    Potential problems: SPICE not working, very heavy, not sure if it can run a single full-screen app without all the fuss (see https://help.gnome.org/admin/system-admin-guide/stable/lockdown-single-app-mode.html.en, not sure if this is for wayland or for X)
    Things done:

    • GDM starts a wayland gnome kiosk session
      Problems: really heavy, might be buggy
    • dbus-launch gnome-session from loginShellInit
      Problems: might not support SPICE or whatever
  • waypipe without compositor
    It might be possible to run waypipe on a guest without having a compositor at all. This would solve most of our problems with SPICE, since all of the window management now happens on the host. I have not looked into waypipe, so maybe I'm wrong, but this looks like the most elegant and "correct" solution of them all.
    Problems: might not actually run without a compositor, might be slow, requires networking between guest and host, might be insecure
    Investigation process:

    • waypipe can run without a compositor (tested with waypipe ssh headless-server konsole, where headless-server only has waypipe and konsole installed)
    • Figure out how host and guest can talk to each other
    • Figure out how to make guest's waypipe server talk with host's waypipe client (using -s argument and socat)

    Things done:

    • Run a guest with waypipe and the application installed, then run waypipe ssh user@guest application from the host (we have to figure out credentials)
    • Run waypipe client on a host, run guest with waypipe server CMD, make them communicate (I like this solution the most of them all)
@jollheef jollheef changed the title [Experiment] Use wayland Wayland support Jan 29, 2020
@github-actions

This comment has been minimized.

Copy link

@github-actions github-actions bot commented Jan 29, 2020

Donate to this issue

Current balance

  • 0.00491457 BTC
  • 0.00000000 ETH
  • 0.00000000 ADA
  • Total $45.91
How to claim a bounty

  1. Specify this issue in commit message (keywords);
  2. Put to the body of pull request your BTC, ETH, ADA addresses in the format: BTC{your_btc_address}, ETH{your_eth_address}, ADA{your_ada_address};
  3. When pull request will be accepted, you'll immediately get all cryptocurrency to wallets that you're specified.

Top 10 issues with a bounty (this repository)

  1. Wayland support — jollheef/appvm#15 — $46.10
  2. NixOS module — jollheef/appvm#13 — $2.51
  3. torbrowser appvm: block all connections outside tor from VM — jollheef/appvm#7 — $2.51

Top 10 issues with a bounty (all repositories)

  1. Wayland support — jollheef/appvm#15 — $46.10
  2. Private mode — jollheef/donate#2 — $12.61
  3. Database encryption based on secret splitting — jollheef/donate#3 — $12.61
  4. New supported cryptocurrency is not shown for old issues — jollheef/donate#4 — $9.51
  5. Generate Yoroi-compatible mnemonic — jollheef/cryptocurrency#6 — $5.61
  6. Proper fee calculation — jollheef/cryptocurrency#7 — $5.61
  7. NixOS module — jollheef/appvm#13 — $2.51
  8. torbrowser appvm: block all connections outside tor from VM — jollheef/appvm#7 — $2.51
  9. Support latest logrusorgru/aurora — jollheef/out-of-tree#15 — $2.51
  10. Testing exploits without ssh (as local user) — jollheef/out-of-tree#18 — $2.51

The default fee is 0% (someone who will solve this issue will get all money without commission). Consider donating to the donation project itself, it'll help keep it work with zero fees. List of all issues with bounties.
@balsoft

This comment has been minimized.

Copy link
Author

@balsoft balsoft commented Jan 30, 2020

I've made waypipe work. It appears to function just as I assumed it would.

@jollheef

This comment has been minimized.

Copy link
Owner

@jollheef jollheef commented Jan 31, 2020

The idea of using something like Waypipe for Wayland support (as additional, keeping current implementation as the main one) sounds good.

However, I'm concerned about Waypipe implementation itself. The quality of code is quite below my expectations.

@balsoft balsoft linked a pull request that will close this issue Jan 31, 2020
2 of 2 tasks complete
balsoft added a commit to balsoft/appvm that referenced this issue Jan 31, 2020
Resolves jollheef#15
balsoft added a commit to balsoft/appvm that referenced this issue Jan 31, 2020
Resolves jollheef#15
balsoft added a commit to balsoft/appvm that referenced this issue Jan 31, 2020
Resolves jollheef#15
balsoft added a commit to balsoft/appvm that referenced this issue Jan 31, 2020
Resolves jollheef#15
balsoft added a commit to balsoft/appvm that referenced this issue Jan 31, 2020
Resolves jollheef#15
balsoft added a commit to balsoft/appvm that referenced this issue Jan 31, 2020
Waypipe implementation in this PR might be insecure, review with care.

Resolves jollheef#15

BTC{1AYoK2TScSpD5bhf67mv9AxHDJ2RidRvjD}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.