LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-20-2015, 07:40 AM   #1
Thug
LQ Newbie
 
Registered: Jun 2015
Posts: 2

Rep: Reputation: Disabled
Angry 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 !
 
Old 06-20-2015, 08:19 AM   #2
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US, Earth, end border$! ◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that works well on my cheapest; has been KDE or CLI but open... http://goo.gl/NqgqJx &c ;-)
Posts: 3,368
Blog Entries: 2

Rep: Reputation: 984Reputation: 984Reputation: 984Reputation: 984Reputation: 984Reputation: 984Reputation: 984Reputation: 984
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!
 
Old 06-20-2015, 03:13 PM   #3
GarryRicketson
LQ Newbie
 
Registered: Jun 2015
Location: mexico
Distribution: Debian Wheezy, MX-14, Debian Jessie
Posts: 25

Rep: Reputation: Disabled
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,
 
Old 06-20-2015, 03:15 PM   #4
GarryRicketson
LQ Newbie
 
Registered: Jun 2015
Location: mexico
Distribution: Debian Wheezy, MX-14, Debian Jessie
Posts: 25

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

Last edited by GarryRicketson; 06-20-2015 at 03:21 PM.
 
Old 06-20-2015, 07:32 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 16,031

Rep: Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332Reputation: 2332
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.
 
Old 06-21-2015, 07:29 AM   #6
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,453
Blog Entries: 55

Rep: Reputation: Disabled
Use the terminal. It's not difficult, it's not time consuming, and it's good exercise for your fingers.
 
1 members found this post helpful.
Old 06-21-2015, 10:25 AM   #7
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US, Earth, end border$! ◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that works well on my cheapest; has been KDE or CLI but open... http://goo.gl/NqgqJx &c ;-)
Posts: 3,368
Blog Entries: 2

Rep: Reputation: 984Reputation: 984Reputation: 984Reputation: 984Reputation: 984Reputation: 984Reputation: 984Reputation: 984
Try [Alt]+[F2]
 
Old 06-21-2015, 10:56 AM   #8
vincix
Member
 
Registered: Feb 2011
Distribution: Centos 6.7, 7
Posts: 606

Rep: Reputation: 53
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!
 
Old 06-21-2015, 10:38 PM   #9
onlyesterday16
LQ Newbie
 
Registered: Dec 2014
Distribution: Fedora
Posts: 9

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

Last edited by onlyesterday16; 06-21-2015 at 10:41 PM.
 
Old 06-22-2015, 06:52 AM   #10
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,810
Blog Entries: 10

Rep: Reputation: 1727Reputation: 1727Reputation: 1727Reputation: 1727Reputation: 1727Reputation: 1727Reputation: 1727Reputation: 1727Reputation: 1727Reputation: 1727Reputation: 1727
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
 
Old 06-28-2015, 08:22 AM   #11
Thug
LQ Newbie
 
Registered: Jun 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
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!
 
Old 06-28-2015, 08:25 AM   #12
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US, Earth, end border$! ◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that works well on my cheapest; has been KDE or CLI but open... http://goo.gl/NqgqJx &c ;-)
Posts: 3,368
Blog Entries: 2

Rep: Reputation: 984Reputation: 984Reputation: 984Reputation: 984Reputation: 984Reputation: 984Reputation: 984Reputation: 984
KDE?
 
Old 06-28-2015, 01:57 PM   #13
catatom
LQ Newbie
 
Registered: Oct 2014
Posts: 22

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

Last edited by catatom; 06-28-2015 at 01:58 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running JMRI/Decoder Pro - Run in Terminal - Terminal flashes and dissappears. HarrisCreekCentral Linux - Newbie 2 06-07-2015 11:59 PM
LXer: Linux Terminal Scripting and Executable PHP Scripts LXer Syndicated Linux News 0 10-28-2013 12:20 PM
cannot run executable unixor Linux - Newbie 9 10-23-2012 06:17 AM
cannot get an executable to run... disruptive Linux - Newbie 5 03-04-2008 11:18 AM
an executable that does not run jgoggel Programming 2 07-22-2004 07:54 PM


All times are GMT -5. The time now is 08:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration