How to display a linux application as a viewport inside a Godot Application?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By interesting_shepherd

I’m trying to display a linux application, let’s say the file manager of Gnome inside a Godot application I’m developing. I want to interact with the file manager normally, inside the Godot application. Is there a way I can display them as a viewport? or Is there any other way?

:bust_in_silhouette: Reply From: CharlesMerriam

I may not be understanding your question and I probably don’t have the answer. Please bear with me.

First, you could just spawn the new process with OS.execute, figuring out the arcana of the perfect command line. You should definately check the FeatureSet to be sure you can. In general, anything you spawn will be limited to your current permissions.

While I am unclear about Godot, the usual issue in spawning an interactive process is the keyboard buffering. You may find that something is buffering keys and only passing them on end of line.

Good luck! Come back and write-up your experience.

I apologize if my question wasn’t clear! Thanks for the information. I’ve looked into OS.execute, tried the demo too, I think that’s the way to go. You also mentioned sending keyboard buffering which is needed. That being said, I’ll further look into it.

Basically, what I’m trying to achieve is a ~sorta Virtual Desktop Window Manager inside a Godot Environment. I could open up bunch of desktop apps from a menu - possibly using OS.execute and the applications run inside that godot environment - can be 2D/3D environment. I could drag windows and interact with them.

interesting_shepherd | 2022-05-25 07:48