How to make this command open a new terminal & execute the command within it ( Exec=bash -c "tail -n 10 -f /var/log/httpd/error_log" )

StackOverflow https://stackoverflow.com/questions/18137531

Question

This is simply a shortcut for the panel.

[Desktop Entry]
Exec=bash -c "tail -n 10 -f /var/log/httpd/error_log"
Type=Application
Icon=/root/Desktop/2.svg

i need that Exec= command to open a new terminal and run the command in it.

Was it helpful?

Solution

To open a terminal Exec=nameOfYourTerminalApp (eg:gnome-terminal, lxterminal, xterm) Then you can run your commands in the opened terminal. Otherwise, you can create a script with some command and run it. In that case you have to put tail -n 10 -f /var/log/httpd/error_log in the script and make it executable. Then call it with a shortcut file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top