Closed James-Livesey closed 10 months ago
To switch to the Linux user with the Terminal app (instead of using the system
user), we'll need to use su -
(-
sets $PWD
to the user's home directory).
To prevent the user's password from being asked, we can use sudo su -
.
For Xorg integration, we can refer to this to start a virtual, headless Xorg server using xvfb
: https://en.wikipedia.org/wiki/Xvfb
xvfb
does not have GPU acceleration.
We could just open windows within the same X session as gShell, and then ensure that gShell is always the topmost application.
Also very useful: https://jichu4n.com/posts/how-x-window-managers-work-and-how-to-write-one-part-i
Useful for implementing compositing window management with Xorg: https://www.talisman.org/~erlkonig/misc/x11-composite-tutorial/
Protocol specs: https://cgit.freedesktop.org/xorg/proto/compositeproto/tree/compositeproto.txt
More technical explanations/details: https://magcius.github.io/xplain/article/composite.html
For interfacing with Xorg, we can use this Node.js library: https://github.com/sidorares/node-x11
For testing Xorg control from gShell we can use Xephyr to sandbox the environment:
Xephyr -br -ac -noreset -screen 1200x800 :1 &
DISPLAY=:1 ./gshell --device-type=desktop --no-touch-emulation --allow-host-control --scale-factor-emulation
We need to create a flag to make gShell aware that it should act as the window manager (much like how --real
puts gShell into fullscreen) for testing purposes.
For getting gShell's Xorg window ID, we can use Electron's win.getNativeWindowHandle
.
Accidentally merged into main
earlier so merging now!
In fact nah, I'll continue work on the main
branch.
This PR brings support for Linux apps to LiveG OS, both in a terminal and with Xorg.
Task list