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: 72

[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
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,486

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.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

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

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

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
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,486

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'

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

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

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

Re: [SOLVED] Short key to exec a command

now it works,  thank you!

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.013 seconds, 7 queries executed - Memory usage: 533.27 KiB (Peak: 534.12 KiB) ]