Click here to Skip to main content
15,887,325 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
It's the fourth day since I moved from Windows to Ubuntu (14.04) and I still am having problems setting up my development environment. I used to be a Delphi programmer, but now want to change to some other language, I've these in mind:
C#
C++
Python
D

I installed MonoDevelop, it installed the Mono Runtime too, I compiled a hello world, but when I locate the final exe file (yes it created an exe file), and open it, it tries to open the archive manager.

Then I try C++: the program compiles, I double-click the compiled file, and this message is shown:
There is no application installed for “executable” files. Do you want to search for an application to open this file?

So I open the Terminal, write the path to the compiled file, and press enter, this is what it says: Permission denied

How am I supposed to run my programs in Ubuntu? What is the Windows exe equivalent in Linux?

What I have tried:

I've tried compiling "Hello World"s from different languages but it just doesn't run on Linux.
Posted

1 solution

An easy way to run programs on Linux is from the terminal. Open it, navigate to the directory containing the compiled programs (using the cd command) and run them.

C# on Mono:
cd yourdirectory
mono compiledcsharp.exe

Compiled C++:
cd yourdirectory
./compiledcplusplus


[Edit]

If you want to make it more user-friendly by executing the executables using a double-click from the file manager, there is no other option than having them tweak configuration settings at the moment:
execute command - How do I run executable scripts in Nautilus? - Ask Ubuntu[^]
This is not the desired behavior, however, so there's a bug filed about it, but it hasn't been changed so far: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1433774[^]

[Edit #2]

If you get a permission denied message from the terminal, you need to change the permissions using the chmod command:
chmod Man Page | Bash | SS64.com[^]
 
Share this answer
 
v3
Comments
Nafees Hassan 6-Feb-16 3:13am    
I have no problem running them from the Terminal, but there has to an easy way for my users.
Thomas Daniels 6-Feb-16 3:22am    
I've updated my answer.
Nafees Hassan 6-Feb-16 3:27am    
And what about that permission denied message, it won't let me run them even through the Terminal.
Thomas Daniels 6-Feb-16 3:31am    
See my latest edit; you need to use the chmod command to change permissions, I've posted a link to a manual page.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900