0

I am developing an embedded application on an ARM platform. I want to use ArchLinux as the underlying operating system and then create my own GUI. I want the application to be extendable (have apps if you wish).

I want to be able to run these 3rd party apps in a sandbox to limit security issues. I want the developers to have as much freedom as possible without giving access to potentially dangerous features. I also need to be able to overlay toolbars over the apps when swipes happen from the sides (Think Android when you're in a full screen app but if you swipe from the side, you can still pull up the Android notification bar and the Android navigation buttons).

The way I see things currently, I would have my application running and when it loads it would look in a directory to see all the installed 'apps'. The apps would each have their own folder. Then when a user runs an app, I would:

fork -> change root directory to app directory -> set app user id to a user with low privileges -> exec app -> pipe graphic output back to main app.

When I say pipe graphic output back, I mean literally stream like a video through a pipe.

Then I can use ptrace to trace what the applications are doing and take control back if the children application crashes or exit or anything of the sort. This method also allows me to overlay my things when necessary.

My main concern right now is performance if the app has to pipe its graphic output to the main program.

Is this a viable solution or is this naive? The other option I'm seeing is to actually create a graphic API with XML files a la Android and then the rendering would happen from within the main application. The main application would load XML layout files from the apps directory and render the contents itself. This would be much more time consuming mind you and would restrain the developers a bit more.

Any input is appreciated, especially if you have experience with modular applications.

  • If you use wayland instead of X11, clients are pretty strongly isolated. – o11c Sep 4 '15 at 3:18
  • I wasn't planning on using any windowing system. Just OpenGL in the frame buffer with full screen applications. I basically wanna cut all the fat out and go as low resources as possible and put the focus on the UI thread and have things behaving as snappy as iOS. Hope I'm making sense. – ReX357 Sep 4 '15 at 3:23
  • 1
    That's what wayland is for. – o11c Sep 4 '15 at 3:25
  • Probably, serialization with JSON is faster and simpler than with XML – Basile Starynkevitch Sep 4 '15 at 4:22
  • You mention the similarities to Android so often that I have to wonder why you aren't simply using Android. – null Sep 4 '15 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.