1

I have been told that when configuring the system, for instance setting the volume or changing the screen resolution, anything you can do with a GUI, you can do from the console. In fact, the suggestion was that GUI applications provided for this in the 'Control Centre' of Mint simply issue text commands to the system to execute their actions.

I am trying to create scripts that I can bind to shortcut keys for a number actions that I'd normally do from GUI controls, but having difficulty getting the syntax of the console command correct.

If it's true that these GUI controls issue 'console commands' to the system, is there any application I can run that intercepts and logs or displays these?

I have both Mint and Raspberian systems, in case the answer is different for the two.

1 Answer 1

2

No, it's not true.

Some GUI programs are little more than fancy wrappers around CLI programs. Most are not, they're GUI programs because they do things that only really work well with a graphical interface - e.g. graphics editors like gimp or krita, PDF viewers, WYSIWIG word processors with fancy fonts, etc. Some of these programs may have alternative CLI tools that can perform vaguely similar jobs (e.g. a plain text editor like vim plus LaTeX or markdown for formatting, or gnuplot to generate graphs) but these are completely different programs, doing similar but different tasks.

Those that are "fancy wrappers" tend to be teaching and/or configuration tools, and they tend to greatly simplify what the actual program they're wrapping is capable of and/or make choices that are reasonable defaults but not so great for some specialised needs. They're OK for people who just need to get basic functionality up and running quickly, without needing to delve into the details or make much use of advanced features.

Some are more than just fancy wrappers, though, and add functionality that would be difficult without a GUI - lyx as a front-end for LaTeX, for example. I personally prefer editing plain text with vim (and running make to "compile" my source text into a pretty document using md or TeX), but some people swear by tools like this and are far more productive with a GUI, menus, and almost-WYSIWYG document editing. There isn't much you can do manually in LaTeX that you can't do in lyx....and you can always hand-edit the files, because lyx works with the same plain text + markup language that you would otherwise edit with vim or some other plain text editor.

3
  • My apologies, my question wasn't clear. I've updated it to reflect that I was specifically talking about one-liners that configure the system, the sort of things found in the 'control centre' of Mint, not application programs like gimp.
    – Neil_UK
    May 4, 2022 at 12:41
  • You should ask whoever made that suggestion to provide examples and evidence to support their assertion. Some things in the control center may fork command-line tools (like dconf or gconftool-2) to do the work, but most are probably just making library calls to either directly query or modify configuration settings or send a message via dbus to the relevant service....because it's easier and faster to do it that way than to fork an external program to do it.
    – cas
    May 5, 2022 at 0:35
  • Command line tools like dconf etc mostly exist as an alternative method, so that changes can be scripted/automated. They're basically a CLI wrapper around the existing configuration db libraries. And, Unfortunately, they also tend to be abysmally documented, so they're only really of much use if you're either already well-versed in how those libs work and what keys are available and what they do and what values they can take, or you're willing to spend a lot of time investigating and exploring those details.
    – cas
    May 5, 2022 at 0:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .