LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to run executable without terminal? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-run-executable-without-terminal-4175545932/)

Thug 06-20-2015 07:40 AM

how to run executable without terminal?
 
hi
i am new to linux and i use elementary os.
i have compiled pascal code with freepascal compiler. i would like to know if there is any way to run it without using terminal
in terminal i would just use
Code:

./program
from the folder where it is located and it would run.
in windows i could just double click on exe and it would run.
is there any way to run it without typing into terminal every time?
thanks !

jamison20000e 06-20-2015 08:19 AM

Hi.

Check these: http://www.linuxquestions.org/questi...-click-370091/

https://www.reddit.com/r/linuxquesti...without_using/

Hope they help, best wishes and have fun! :)

GarryRicketson 06-20-2015 03:13 PM

The links above give more details, but just wanted to comment,
You need to make sure the file permission is set to "executable" too.
Quote:

in windows i could just double click on exe and it would run
If you are going to use a linux based system, forget about "In windows I could", linux is not windows, and does not work like windows, fortunately.
Any, lets say the file name is "program", select it, right click you mouse,
that should give you a menu, down at the bottom, there is a option "properties",
click that, in the properties menu, there is a option, "permissions", select that,
then you should see a little box, and it says, "Execute" "allow executing of file as program." that little box MUST be checked, or it will not allow the file to run as a executable program.
Linux does not use .exe, like windows does, it is best to just forget what you used "in windows", and learn what works, for linux,

GarryRicketson 06-20-2015 03:15 PM

Ooops, edited, for some reason it posted twice, and then I could not delete the 2nd one, This can be deleted,by a mod.

jefro 06-20-2015 07:32 PM

By the way hello and welcome to LQ.

Basically as above.

Some notes. Linux has a window manager or gui (if this is your starting point too) that isn't exactly connected to a shell. To compound it there are many shell's (terminals). While you may be able to run a program in a shell you may wish to keep some terminal open to see results.
I guess I'll ask too if you are trying to run this script without a terminal at all too and run a gui app.

brianL 06-21-2015 07:29 AM

Use the terminal. It's not difficult, it's not time consuming, and it's good exercise for your fingers.

jamison20000e 06-21-2015 10:25 AM

Try [Alt]+[F2] ;)

vincix 06-21-2015 10:56 AM

I would also recommend to forget EVERYTHING you've learnt by now when trying Linux. NOTHING that you've learnt is of any use when starting Linux. You need to get completely amnesiac and then let the linux revelation fill your intestines, if you get my point.


On a more serious note, when it comes to the GUI, there are a lot of similarities with Windows, it's just that you simply need to be conscious of the fact that you're using a different operating system. But obviously you can double-click (in gnome, for instance) on icons and run programs like that and so on. It's just that in this case, the OS has no idea that what you're trying to do is an executable program, so that's why you need to set the executable permission.

Have fun!

onlyesterday16 06-21-2015 10:38 PM

I remember with nautilus, I can double click then choose Run or Run in Terminal, but now, I can't.

rtmistler 06-22-2015 06:52 AM

In the graphical file manager you can double click an executable file and then it will execute.

Couple of things here:
  1. It might be better to run from a command line so that any outputted data to stdout will be seen in that command line
  2. It might be better to run from a command line if you end up using command line arguments for your program

Thug 06-28-2015 08:22 AM

i am frustrated, it didnt help... maybe i will try different distro, maybe ubuntu mate (although i really like how does elementary look) or i stay with windows for a while ... however i have a few problems with windows too... i cant install libreoffice and nobody seems to ever had that problem ... but thats another story,
thanks for your help!

jamison20000e 06-28-2015 08:25 AM

KDE?

catatom 06-28-2015 01:57 PM

It's just Bash code. You could assign the command line to a keyboard shortcut in Ubuntu.


All times are GMT -5. The time now is 07:26 PM.