You are not logged in.

#1 2012-12-29 08:50:55

SteveHatcher
Member
Registered: 2012-12-27
Posts: 2

Auto-generate commands in terminal based on GUI usage?

Hi Guys,

I am quite a Linux noob but competent with computers in general and have been having a great time setting up my first Arch system (Openbox). In a program I use a lot on windows (called IGOR pro - graphing and maths program), you can do things in the GUI menu and it writes commands in its scripting area for you. You can then just use that command in the future (once you know it).

Does Arch have anything like this? So for example if I were to use thunar to browse to ~/ and rename hello.txt to hello2.txt     the terminal would be auto generated with:

mv ~/hello.txt hello2.txt

Thanks

Offline

#2 2012-12-30 02:55:51

metgz
Member
From: United States
Registered: 2012-11-13
Posts: 21

Re: Auto-generate commands in terminal based on GUI usage?

There is nothing I know of with that sort of function. Question - does this work in all Windows applications? Like, if you go to google.com in firefox, does it write 'firefox http://www.google.com/' in the Windows terminal?

Where exactly does it 'write' this stuff? Could you perhaps point me to a screenshot?

Offline

#3 2012-12-30 18:57:33

Multimoon
Member
From: /usr/share/zoneinfo/US/Eastern
Registered: 2012-09-30
Posts: 170

Re: Auto-generate commands in terminal based on GUI usage?

You are asking the system to keep a log of every command a application uses, this could create a log of 20gb or more easy.

If you are saying most used terminal commands, then that is do-able, as a log of this is already kept by the shell.

Last edited by Multimoon (2012-12-30 19:00:06)


It always makes me laugh when people complain and rage over any distro's management ideal, when this is a linux community, and you could always make your own distro and experience the pains yourself.

Offline

#4 2012-12-30 20:31:01

metgz
Member
From: United States
Registered: 2012-11-13
Posts: 21

Re: Auto-generate commands in terminal based on GUI usage?

Just to clarify what multimoon said, you can view your command line history with either of these methods

% history
% cat ~/.bash_history

Do either of those give you what you have in mind?

Offline

#5 2012-12-30 20:34:07

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: Auto-generate commands in terminal based on GUI usage?

That would just be for commands you enter yourself into the command-line. What SteveHatcher wants to do perform tasks via a GUI and have a log of the equivalent cli command.

Offline

#6 2012-12-30 21:33:47

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Auto-generate commands in terminal based on GUI usage?

I can see how you might find that helpful, but there really is no substitute for learning the core commands properly i.e. by reading their docs and actually using them (not necessarily in that order).

You should also bear in mind that your IGOR thing is just one app that happens to have this functionality, for reasons best known to its developer. Is this a common thing with Windows apps? Because I'm pretty sure it isn't with linux apps.

Offline

#7 2012-12-30 21:48:38

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 990

Re: Auto-generate commands in terminal based on GUI usage?

There are programs that use the GUI to generate textual commands that then do the actual work. AutoCAD comes to mind; at least when I last used it, it had a terminal that would show each command as it was run. In some ways it was a precursor to Photoshop's actions window (don't know what the official name is). It's also similar to the way some WYSIWYG HTML editors have a pane to display how the markup changes when you use the GUI to edit the page. But I don't know of any file managers with this functionality.

I'll allow that it would be a cool feature, though.

Offline

#8 2012-12-30 22:09:04

metgz
Member
From: United States
Registered: 2012-11-13
Posts: 21

Re: Auto-generate commands in terminal based on GUI usage?

If this is something that is software-level, as opposed to OS or DE-level, Trent is right. For instance, PacmanGUI is a graphical front-end for pacman. When you do anything, a pop-up shows you the command you will be running.

Offline

#9 2012-12-30 22:27:14

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: Auto-generate commands in terminal based on GUI usage?

This would be an interesting, but odd (bad) feature for a gui file manager.

Certainly a gui filemanager could do this: the "point and click" interactions would simply generate commands or scripts that would then be executed in a shell and the user could watch.  As a learning tool this would be interesting, but as a file manager it'd be very inefficient.  A file manager does not generate shell commands and execute them in bash or any other shell, a file manager uses "lower level" function calls within it's own code.

The CAD programs, html editors, or SPSS statistical software as another example, in constrast have GUIs that really do just generate the scripts/commands - so it is easy to reveal these commands to the user.

In otherwords with the SPSS example you have:
SPSS gui actions -> SPSS "syntax" commands -> data analysis

What you want in a file manager is:
Filemanager gui actions -> shell commands -> file system actions

But actual filemanagers do not do this, they cut out the middleman:
Filemanger gui actions -> filesystem actions.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB