Answer the question
In order to leave comments, you need to log in
In unix, all actions in the gui interface actually call some kind of console command?
Somewhere I came across on a foreign site about it. I read through a translator, he translated poorly, but in principle he understood what was written there. So is this true? I just know a similar example. The Maya program is a program for 3D graphics, there is a built-in mel scripting language, the core of this program only accepts these commands. That is, when you do something in the interface using interactive tools, for example, you create a model, move or edit it, then it turns out to be just commands with parameters. You can open the script editor and there will be a list of what exactly was done, but in text form. You can even copy the text and run the script again and it will repeat the sequence. Even the graphical interface itself is written in mel and can also be changed. Here, and in linux? Is it possible the same? Or all the same, the gui program and the console version are different things and one could only say that they use the same api?
Answer the question
In order to leave comments, you need to log in
You are a bit confused. mel in a T-shirt is a real interpreted PL, similar to lua \ js \ python and many other languages.
3) the shell can also be written in anything and, for example, it can stupidly generate /etc/sysconfig/network-scripts/ifcfg-Auto_eth1 or directly run ifconfig with the necessary parameters. But no one forbids you to implement the same functionality as in ifconfig and be completely independent.
The above is just an example, and not quite correct and is written just for an example of how it can be.
Regarding Linux, everything is simple here. The program itself can have different "layers", if we exaggerate:
1) the program itself can be in any language, let's take ifconfig for example.
2) around the program there may be script wrappers in other languages or the same. For example, the script /etc/sysconfig/network-scripts/ifcfg-Auto_eth1 which, roughly speaking, runs ifconfig with the given parameters.
In windows programs, the situation is completely similar, only there, with \ instead of a layer with scripts, the registry \ configs \ wmi, etc. can be used.
Therefore, it is impossible to give an unambiguous answer yes / no, it all depends on the functionality of the program and how it was implemented.
In Linux, GUI programs can in principle use exec console commands instead of "API", since there are many convenient console commands that work quite stably from version to version compared to Win.
But usually they still use just calling system functions directly - it's faster and more reliable.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question