Ask HN: How to see commands used by Linux GUI software
1 comments
Most of the time, no, it's not possible, since said GUI programs do not call the command-line programs.
Instead, they use the same system calls the command-line tools do: stuff provided by the C library. When you right click and say "make shortcut", it calls the link(2) function deep down, just like 'ln' does. It doesn't call the 'ln' program at all.
The best way to learn the command line is to start using it, and looking at various shell scripts, in my opinion.
Instead, they use the same system calls the command-line tools do: stuff provided by the C library. When you right click and say "make shortcut", it calls the link(2) function deep down, just like 'ln' does. It doesn't call the 'ln' program at all.
The best way to learn the command line is to start using it, and looking at various shell scripts, in my opinion.
This is good advice. Also, if the OP interested in seeing the system calls that the different programs do, they should look up the strace command.
Thanks to both of you for your expertise, had a feeling it might not be possible but worth a shot..
However, it occurred to me that it would be somewhat a useful way to learn more command-line syntax if I could see what was being used by the different GUI programs (e.g. Gnome). For example, if I right-click and say make shortcut that I can see the 'ln -s ...' used by the script that the GUI calls.
Is it possible to list these commands (like a read-only termnial) somewhere, ideally as a discrete widget fixed somewhere on the screen? Thanks in advance