0

I use Ubuntu Mate 24.04.02

Often I start the terminal with the command :

ffmpeg -i 

And via drag and drop of the video-file in to the terminal I get the information what I want to have.

I did use the terminal settings : command during start, but it executes the command and close the terminal after all. Obviously the terminal will be started and an internal additional "Enter" performs the command.

My Question : Is it possible to start a terminal with a "string" in the command line, so I can complete the command via drag + drop ?

Gloster
  • 33
  • 1
  • 9

1 Answers1

1

You can do this by using xdotool and adding it to your .bashrc file.

  1. Install the xdotool in your system:

    sudo apt update
    sudo apt install xdotool 
    
  2. Edit the .bashrc file of your current user:

    nano ~/.bashrc
    
  3. Insert the following xdotool command at the end of the file:

    xdotool type "ffmpeg -i"
    
  4. Save and exit the file using the shortcuts Ctrl+S and Ctrl+X. Now, when you open a new terminal, the command will already be present in the terminal.

Ajay
  • 2,241