I have a simple script that basically does "tail -1000f /public/XERlog"

I created a file called log.desktop on the desktop which contains:

Exec= tail -1000f /public/XERlog
Name= XERlog

The file is on the desktop and when you doouble-click on it, it opens a dialog box that has a few options like "Run in Terminal" and "Run" and "View" etc. I want it to automatically run in a terminal, is there a way to force it so it doesn't give the dialog box each time?

  • 1
    which terminal do you use? – LilloX Dec 16 '15 at 16:07
  • I'm not even sure. Whatever terminal it defaults to when I select "Run in Terminal". How can I tell? – clayton33 Dec 16 '15 at 16:15
  • did you use gnome? kde? – LilloX Dec 16 '15 at 16:17

You could run a terminal emulator not the tail. Each terminal emulator accepts a command to execute as a parameter.

To run a gnome-terminal you can change the Exec line as follows:

Exec=gnome-terminal --window --command "tail -f /var/log/messages"

The exact line changes according to the terminal emulator you choose.

Note that you should change the Terminal line to false


Your file is missing the header line:

[Desktop Entry]
Exec=tail -f /var/log/messages

You can run it directly from the Terminal. Just open the terminal, find the file and rename it to "somename.sh" and then:

 mv log.desktop somename.sh
 chmod +x somename.sh

And your script is running .

  • Thanks but what I am looking to do is be able to doubleclick on the file and have it automatically open in a terminal. This is a script that we use often, and I want to avoid having to manually open a terminal each time and type in the script. – clayton33 Dec 16 '15 at 15:59
  • Try with right click and select properties, on the permissions tab ensure 'execute' is checked then double click again you should get your option box to run or edit. If it working I will edit my answer. – ValeriRangelov Dec 16 '15 at 17:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.