Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Perl programs I've written earlier were simple text processing scripts, for executing them I use to use terminal. Now I am learning GUI programming(I want to make some games as a hobby), using Tcl/TK library for Perl.

I've used a sample Hello, World! dialog program provided in the tutorial. When I execute it using terminal it was working properly, but when I try to execute by clicking the file icon, its giving me some options, like

run in terminal, Display, Cancel, Run

None of them are producing any dialog-box, previously it produced when executed using terminal.

I've searched Google for any suggestions, but I found none. Many of them are facing the same issue(from un-answered questions in various forums).

  1. When I double-click on hello-world_tcl.pl I want it to execute it.

  2. Can I change the icon of the executable script ?

share|improve this question

migrated from stackoverflow.com May 2 '13 at 9:15

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

It should run properly when you choose "Run", if it doesn't, you have another problem as well.

To run your script without having that dialog appear and to change its icon, you will need to create a .desktop file for it:

[Desktop Entry]
Name=My script
Comment=Test hellow world script
Exec=/home/user/myscript.pl
Icon=/home/user/myicon.gif
Terminal=false
Type=Application

Save the file on your Desktop folder as myscript.desktop, it should now appear using the icon /home/user/myicon.gif and you can run it by double clicking.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.