So I am basically looking for the easiest approach here, what I want as a result is an in-game-linux-shell (will be rendered using opengl and sfml), that will emulate/simulate a linux box.
It doesn’t need to be all that fancy, what I prioritize is the basics (ls, grep, cat, echo..), some kind of editor (vim/nano-like), and that the game logic can interact with /dev, /etc etc.
I’ve thought about chrooting an environment, but I see more issues than solutions doing so. Also thought about if there is some kind of popular linux emulator written in C++ which can be tightly integrated with the hostcode, this is a longshot and I haven’t found anything yet.
Any help in getting me on the right path is hugely appreciated!
PS. The end-product will be cross-plattform (at least for win / linux)
You might be interested in BusyBox which is a small and freely available implementation of many features of a Linux command line. You should be able to embed it in your game without too much trouble. You’ll also have to model separately the filesystem and the tty interface, of course.