[Extensions] Broadway implementation #29

Open
andersevenrud opened this Issue Nov 7, 2014 · 20 comments

Projects

In Progress in Client

4 participants

@andersevenrud
Member
andersevenrud commented Nov 7, 2014 edited

This is something I have been thinking about for a long time and should be pretty straight forward now that Wayland/Broadway project is in full swing.

  • Create a new Package of type extension called Broadway
  • Re-create the broadway.js script in my own style
  • Create a new Window class of type BroadwayWindow
  • Implement full keyboard event handling
  • Implement full mouse event handling
  • Implement closing of windows
  • Implement moving of windows
  • Implement overlays (like menus etc)
  • Implement Login/Logout
  • In backend, create a simple spawner
  • Make a simple launcher in frontend
  • Fix mousemove outside windows viewport

A new version of Broadway is under way and it seems the image transfer has changed to Zlib binary compress instaed of base-encoded data... which is a nice thing, but will require some small changes to the handlingUpdate 17 dec 2016: This has now been implemented :)

These features are currently missing from Broadway:

  • Resizing of windows (maximize works however)

https://os.js.org/manual/client/broadway/

Screenshot

https://www.youtube.com/watch?v=Hd73b-Twf4I

Docs:

@andersevenrud andersevenrud self-assigned this Nov 7, 2014
@andersevenrud
Member

After looking at the GTK sources this seems to be way easier then first expected. I will cointinue experimenting with this, including writing an entirely new library that is modular and customizable (the sources from GTK is quite ugly)

@emersion
Contributor
emersion commented Nov 7, 2014

I'm also very interested in a well-written Broadway library. The only problem is that the spec is changing with each GTK release, so if we create a library it won't be compatible with older/newer versions of Broadway.

I would like to help, would it be a good idea to create a github repo for this library?

Thanks :-)

@emersion
Contributor
emersion commented Nov 7, 2014

(If you need docs about Broadway, there is a wiki page about it in Symbiose: https://github.com/symbiose/symbiose/wiki/Broadway)

@andersevenrud
Member

@emersion I'm planning to make something very portable and easy to update. From the looks of it is very simple and most of the changes could be an automated process (parsing .h files)

@andersevenrud
Member

@emersion I will have something to show off later today :)

@andersevenrud
Member

@emersion Created first prototype of the new library. See the link in main description :)
Started on Event handling now. After that it's just a matter of cleaning up and making it as portable as possible

@andersevenrud
Member

@emersion Btw. I was looking at the history of broadway.js and it seems that it does not change that often (if ever), so the protocol will most likely not receive any huge changes :)

@emersion
Contributor
emersion commented Nov 7, 2014

Seems good to me :-)

I was wondering, what about the server-side code? The user will be able to launch apps remotely? I already tried to emulate a GTK environment

@emersion
Contributor
emersion commented Nov 7, 2014

But it does not work well.

@andersevenrud
Member

@emersion I have done something like this before using PAM logins and a simple messaging system. Btw I have made some great progress on the implementation. Just pushed a few nice updates :D

@andersevenrud andersevenrud added this to the 2.0.0 milestone Nov 8, 2014
@andersevenrud andersevenrud added feature and removed enhancement labels Nov 8, 2014
@andersevenrud andersevenrud changed the title from Broadway implementation to [Core] Broadway implementation Nov 8, 2014
@andersevenrud
Member

@emersion I have now implemented a spawner for processes... not finished mind you, and not pretty at the moment, but works :) Code is in Broadway/vendor
Preview: https://www.youtube.com/watch?v=o0QLC9Sx-BA

@andersevenrud andersevenrud removed this from the 2.0.0 milestone Jan 5, 2015
@andersevenrud andersevenrud added this to the 2.0.0 milestone Jan 25, 2016
@andersevenrud andersevenrud changed the title from [Core] Broadway implementation to [Extension] Broadway implementation Mar 21, 2016
@andersevenrud andersevenrud changed the title from [Extension] Broadway implementation to [Extensions] Broadway implementation Mar 21, 2016
@davelab6
davelab6 commented Apr 26, 2016 edited

I'm curious, what is the latest status of this?

@andersevenrud this project is really super great :D

@emersion awesome work on Symbiose :D

@andersevenrud
Member

@davelab6 It's currently working of the "old" GTK implementation, but should work just fine. I am in the middle of writing a new encoder to support latest features!

@andersevenrud andersevenrud removed their assignment May 14, 2016
@RyanRiffle
Collaborator

@andersevenrud I haven't looked far into but maybe you could provide some insight about the intended security. When Login/Logout is implemented how do you see the security working? Do you plan on OS.js running as a server for all users and dishing out an forked process of itself setuid() and setguid() of the user? Or do you plan on it being a single user environment and changing the owner of the process to that user alone. I would like to assist on the Login/Logout part of the desktop.

@andersevenrud
Member

@RyanRiffle The plan (I have not thought to much about this myself) was to hook into the PAM authentication system to spawn a X-server and not a OS.js server for the requested user. Right now it just attaches to the specified server which has to be started manually (or just :0 which is the default one). I'll get back to you with some more in-depth info when I'm home again (holiday atm). Did this help ? :)

@RyanRiffle
Collaborator

That helps. I figured it was being run with startx ./whatever.sh -- :1. Got to keep users in their place and keep them from accessing files they don't have permissions to.

@andersevenrud
Member

@RyanRiffle, yeah, that's pretty much how it works now. So just need a
spawner of sorts to automate that process.

And when it comes to permissions, that's comes entirely down to how both
the system and user is configured :)

On Sat, Aug 6, 2016 at 1:21 AM, Ryan Riffle notifications@github.com
wrote:

That helps. I figured it was being run with startx ./whatever.sh -- :1.
Got to keep users in their place and keep them from accessing files they
don't have permissions to.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#29 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAJ3DAnBZvwwccJkEbuHwxu6I8s1GZlhks5qc8WDgaJpZM4C4WQn
.

Anders F. Evenrud
Software Developer

Blog: http://tinyurl.com/cjfrfx8

@andersevenrud andersevenrud modified the milestone: 2.0.0-beta1, 2.0.0 Nov 30, 2016
@andersevenrud
Member

I've pused an update that adds support for Broadway library version 2.0. Along with these changes:

  • Now runs as a "service" on the OS.js server (no manual launching required)
  • Now has connection settings from configuration files
  • Supports maximize/restore of windows
  • Much better input handling
  • Performance improvements and bugfixes

https://os.js.org/manual/client/broadway/

@davelab6
@andersevenrud andersevenrud referenced this issue Dec 17, 2016
@andersevenrud andersevenrud New broadway implementation
This adds support for the latest Broadway 2.0 interface. Also has
support for maximizing windows and lots of fixes. It is now also a part
of the "core", which changes how it is configured and run.
ed6ef89
@andersevenrud
Member

Firefox crashes, sadly (worked in some other version), and there's not many [full] Gtk 3.0+ applications yet included in ex. Ubuntu. I'm going to make a curated list of supported apps and see if I find a way to run apps that crash.

Everything seems to work fine with apps that are fully GTK3 compatible. Example:

https://lh5.googleusercontent.com/WjOID6FcjbjqBtB5byiR0OLJN6-_DEk8LjOmR-vFlrVOGw54BjN97BiocN968lj6LdKis3LqPMfVTJ8=w1920-h1110-rw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment