I want to disable os gui and just keep the python gui when my code is being executed. Is there a way to do this ?
Hi,
Please share more information. Is your python gui based on X11? Or it is based on DRM(Direct Rendering Manager)?
It is a opencv window is based on x11 and os gui is based on lightdm
I can’t answer the question, but some terminology might be useful here…
X11 (or just “X” server…the 11 is a version) is an interface to the GPU (or to a buffer not using a GPU). X runs a single program, and normally that’s the desktop manager (the part you normally associate with a GUI). X itself is sometimes used even when there is no GUI.
The desktop manager is what manages multiple programs, e.g., this is why you can run both a browser and another app at the same time.
In some cases X can be customized to run a single program, e.g., it could be told to start running only firefox. There would be no other program, no ability to switch to another, no ability to see a second firefox (unless it is in a tab of the original firefox).
Lightdm, Gnome, KDE, and other desktops are the true GUI you are thinking of. An X server can be told to run any of those as its single app, after which it becomes capable of running multiple GUI apps (it isn’t X running them, it is the desktop manager).
Alternately, there is Vulkan, which is being developed as a lighter weight (faster) replacement to X. Plus, as mentioned by @DaneLLL, there is DRM.
Incidentally, when Linux boots, it eventually adds key bindings to switch among several text-only terminals. If you are in a text-only terminal, then you can switch to other fully independent text-only logins via ALT-F1 through ALT-F6 (this is different depending on the system). Then X replaces the first text-only terminal, and the X init files load the desired window manager. Once in the GUI, you can switch to a purely text-only terminal with CTRL-ALT-F2 through CTRL-ALT-F6 (the number of terminals, and placement, might vary on some distributions).
If you are in a purely text terminal, e.g., from the GUI you use “CTRL-ALT-F3
”, and log in there, can you run your program without error for lack of GUI? If so, what command line do you use?
Hi,
Please check this section for disabling Ubuntu desktop and demonstrating DRM:
https://docs.nvidia.com/jetson/archives/l4t-multimedia-archived/l4t-multimedia-3273/l4t_mm_08_video_decode_drm.html
You can run the commands to disable Ubuntu GUI:
$ sudo systemctl stop gdm
$ sudo loginctl terminate-seat seat0
Ad then you can run either X11 or DRM
For enabling X11, you can run $ xinit to enable simple X window
For DRM, you can run 08_video_dec_drm sample
Hey @DaneLLL I tried DRM and it was exactly what I was looking for. Currently I am looking how to integrate a ui and have it displayed instead of just a video (I saw the ui sample too but I am trying to make it work with more functionalities). Thank you for your help.