2

Is there any application (or sequence of commands) for this function: seeing the result of the actions, while using a GUI interface, being automatically translated into a Terminal (or similar CLI environment) on the same machine.

I saw this in action long years ago in VBA for Applications (for example the Macros in Excel). I wonder if there is same function in Linux.

4

GUI actions often have no external replament

There is no general possibility to "listen" to GUI actions, and translate them directly to cli equivalents. On Linux nor on Windows.
In general only a small selection of the GUI actions is to be controlled by cli at all. The developer of the software in question will make a decision on what actions he or she thinks are useful to make available as a command "from outside", and we depend on API's, or those cli options the developer made available. Most of these commands, you will usually find in the man pages of an application. type:

man <application>

This does not mean we are totally helpless if no command is available, and to be able to control many things on our box, we have numerous tools, to at least "listen" to what happens, and replace the processes inside the application by our own designed commands, or our own scripted solutions.

What tool is useful in your case totally depends on the action you'd like to simulate. We'd need an additional question to point you in the right direction.

One (random, but extremely useful in many situations) option I'd like to mention though:

  • If we open a terminal, and run:

    dconf watch /
    

    We can exactly see what dconf/gsettings keys the (any) application is playing with, and we can directly run gsettings commands to do the same. With this command, we can practically see all actions different tweak tools apply.

Furthermore, many script languages have very powerful tools to control both hardware and edit files directly, but as mentioned, we'd need a more specific example to help you further with that.

Note

Another option you have, if you are more or less familiar with coding, is to look into the source code of the application. Especially interpreted languages will often be quite readable, to give you useful information.

  • I found this answer very complete and very useful. For me, as a user (did code long years ago using Fortran and Pascal at University), today mainly objective it to use batch files for repetitive tasks. Will follow these options. – cjclm7 Dec 17 '17 at 15:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.