Terminal manage

Asked by Andrey on 2017-07-16

I'm going to put the program on a device without a display. Can I manage the program directly from the terminal?

Question information

Language:
English Edit question
Status:
Answered
For:
Audio Recorder Edit question
Assignee:
No assignee Edit question
Last query:
2017-07-16
Last reply:
2017-07-25
moma (osmoma) said : #1

Hello,
Are you still going to install necessary libraries for GTK and Xwindow (XLib) on your system?

Audio-recorder has been compiled and linked against those display libraries and it needs them to function. It is a GUI program.

Nevertheless it is possible to control audio-recorder from a terminal window.

Run audio-recorder --help and look for the -c, --command option.

-c, --command option:
Sends a command to the recorder.
Valid commands are; status,start,stop,pause,show,hide and quit.
The status argument returns; 'not running','on','off' or 'paused'.

For example:
$ audio-recorder --command=hide
$ audio-recorder --command=start
$ audio-recorder --command=pause
$ audio-recorder --command=show
$ audio-recorder --command=status
--> paused
$ audio-recorder --command=stop

Notice that parec or arecord programs a better options if you are running a pure terminal environment (without xwindow).
parec
arecord

moma (osmoma) said : #2

One good solution is to use Gstreamer directly !
It does not need GUI libraries.

Please start audio-recorder and go into the [Additional settings] dialog. Choose the [Recording commands] tab. There you can see the actual Gstreamer commands that do the recording work. There are Gstreamer pipelines for various codex and formats (.mp3, .ogg, flac, etc.) . Use the [Show Cmd] button to see and test the pipelines in a terminal window.

You will need to install gstreamer1.0-tools package.
It contains the gst-launch-1.0 command.

Become also familiar with the pactl command that is explained in the dialog.

Can you help with this problem?

Provide an answer of your own, or ask Andrey for more information if necessary.

To post a message you must log in.