Is gui based in the kernel?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Touch
Member
Member
Posts: 56
Joined: Sun Oct 22, 2006 10:33 am
Location: England

Is gui based in the kernel?

Post by Touch »

Hey,

I'm currently building a kernel for my OS, and after reading about GUI and how to make it etc, I was wandering, do you make it in the kernel?

I guess that your "desktop" or whatever, as the kernel, would have it. And any programs would just be programmed with an inside kernel.

Touch
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

There are many ideas where a kernel starts and ends etc, but i would say it should not be part of the kernel.
User avatar
Touch
Member
Member
Posts: 56
Joined: Sun Oct 22, 2006 10:33 am
Location: England

Post by Touch »

So your saying that, that the GUI, should be loaded through the kernel, as a sort of shell?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Post by Pype.Clicker »

it's extremely rare to have the GUI as part of the kernel. Typically, the kernel just expose the video memory to user space -- sometimes with access restricted to a single process (the GUI manager / video server / whatever) together with a library containing code to render the "system" widgets.
User avatar
Touch
Member
Member
Posts: 56
Joined: Sun Oct 22, 2006 10:33 am
Location: England

Post by Touch »

So the GUI is almost a complete shell of the OS.
User avatar
bluecode
Member
Member
Posts: 202
Joined: Wed Nov 17, 2004 12:00 am
Location: Germany
Contact:

Post by bluecode »

What has a shell to do with a GUI? The first is a CLI (Command Line Interface). And the GUI is _much_ bigger than just a CLI.
User avatar
Touch
Member
Member
Posts: 56
Joined: Sun Oct 22, 2006 10:33 am
Location: England

Post by Touch »

I dont mean it how you think.

Look:

Code: Select all

<CLI> (This is the first part of the kernel)
<CLI><GUI> (This sits on top of the CLI)
Thats what I mean.
"We cannot trust the sword in the hands of a n00b!" - Southpark
User avatar
bluecode
Member
Member
Posts: 202
Joined: Wed Nov 17, 2004 12:00 am
Location: Germany
Contact:

Post by bluecode »

They have nothing to do with each other. A GUI is independent of a CLI. These are just two different interface methods an OS can present to the user. And sure, you can also combine these two.
User avatar
Touch
Member
Member
Posts: 56
Joined: Sun Oct 22, 2006 10:33 am
Location: England

Post by Touch »

So if I was to make the CLI and the GUI seperate, it might be easier, but if I did them together, it would be better?
"We cannot trust the sword in the hands of a n00b!" - Southpark
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Post by Brendan »

Hi,

Write a kernel that's capable of running applications. Then write an application called "CLI" that's capable of starting other applications. Then write another application called "GUI" that's also capable of starting other applications.

Now boot your OS and start the CLI. From the CLI type "GUI" and start the GUI, and then exit the CLI. Next, click on something in the GUI to start the CLI again in a window.

To make this work, implement "virtual terminals" so the user can press alt+F1 to alt+F12 to select which virtual terminal to look at, where each virtual terminal can have a CLI, a GUI or any other (full screen) application.

Next, write 2 more CLI's (call one BASH and the other CSH) and 2 more GUIs (one that uses 3D effects like shadows, alpha blending, etc, and the other that is very "minimal"). Now have 3 completely different CLIs running on alt+F1, alt+F2 and alt+F3, and have 3 completely different GUIs running on alt+F4, alt+F5 and alt+F6.

Now consider what happens when the user starts one "GUI application" in a window of another GUI. Does the OS allow this? If not, why not?

BTW it'd also be a good idea to allow applications (and CLIs, GUIs) to be transferred from one place to another. That way the user can shift applications/CLIs/GUIs from one virtual terminal to any other unused virtual terminal, and could also shift applications/CLIs/GUIs between virtual terminals and GUI windows.


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
Touch
Member
Member
Posts: 56
Joined: Sun Oct 22, 2006 10:33 am
Location: England

Post by Touch »

Right. So heres what I gotta do:
  • Make Kernel, capable of running apps
  • Make CLI, also runs apps
  • Make GUI, can run apps by graphics
Just a quick question, has anyone got a simple CLI?
"We cannot trust the sword in the hands of a n00b!" - Southpark
Post Reply