Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-02-15 19:28:35

daunbailo
Member
From: Italy
Registered: 2015-11-22
Posts: 35

[SOLVED] Short key to exec a command

Hi there,
in the Setting Shortcut Keyboard I've created a new one:
xfce4-terminal -x 'ffmpeg -f x11grab -framerate 25 -i :0.0 /home/myuser/output.mp4' associated to CTRL+1 key.

But it doesn't work: every time I type CTRL+1 an empty terminal is shown with this message: "Failed to execute child process [see command above...]. Failed to excecve: no such file or directory"

Can you help me please?
Thank you

Last edited by daunbailo (2021-02-20 11:43:58)

Offline

#2 2021-02-15 21:25:41

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 7,415

Re: [SOLVED] Short key to exec a command

Don't use quotes with "-x". If you do, it assumes the whole string is the command. Try:

xfce4-terminal -x ffmpeg -f x11grab -framerate 25 -i :0.0 /home/myuser/output.mp4

...or use "-e" with the quotes.

Offline

#3 2021-02-16 21:05:03

daunbailo
Member
From: Italy
Registered: 2015-11-22
Posts: 35

Re: [SOLVED] Short key to exec a command

ToZ wrote:

Don't use quotes with "-x". If you do, it assumes the whole string is the command. Try:

xfce4-terminal -x ffmpeg -f x11grab -framerate 25 -i :0.0 /home/myuser/output.mp4

...or use "-e" with the quotes.

seems ok.
And if I want a file with date in the name? this doesn't work:

/home/myuser/`date +%d-%m-%Y_%H-%M-%S`_output.mp4

Offline

#4 2021-02-16 21:23:54

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 7,415

Re: [SOLVED] Short key to exec a command

The built-in interpreter is not a full shell interpreter. Best to enclose complex substitutions in a shell. Something like:

xfce4-terminal -x bash -c 'ffmpeg -f x11grab -framerate 25 -i :0.0 /home/myuser/`date +%d-%m-%Y_%H-%M-%S`_output.mp4'

Offline

#5 2021-02-17 17:06:51

daunbailo
Member
From: Italy
Registered: 2015-11-22
Posts: 35

Re: [SOLVED] Short key to exec a command

now it works,  thank you!

Offline

Board footer

Powered by FluxBB