problem running executable
I have compiled a gtkmm program, which will run when I enter ./program_name in the terminal, but will not run when I click/ double-click it. Other programs I have compiled do. I have checked permissions and there seems to be no difference. I suspect I have just missed doing something pretty simple. But what?
Thanks for any help. |
you said you checked this but permission to execute also is it in your path or the one in which you are running it from error in the code or trying to run a 32 bit executable on a 64 bit without 32 bit libraries or a 32 bit system trying to run a 64 bit executable. what happens when you run it from a terminal any error? no output?
|
You could possibly have wrong relative paths in your code. Try to go into into your home directory 'cd ~' and run your program with full path and name, for example '/usr/local/bin/my_program'.
If it works, you win :-) When it doesn't, check if SELinux is running and if there is an SELinux denial. |
some clarification
I was not clear. The program runs with no error messages when I am in the terminal (and in the same directory as the program). The problem is that I get no response (including no error messages) when I click (or double-click) the icon. Other programs I have compiled function as expected, so I do not think this is a problem between systems. I do not think that I have done anything differently from I have done in other situations, but for some reason this program will not run from clicking the icon (but will run from the terminal command). Perhaps it is just bad karma, but I am assuming (perhaps naively) that I have just neglected some basic step.
Thanks for the responses. |
Executable issues
Try chmod 0764 your_program.
Some freshly compiled programs will run from the directory they are compiled in but not from anywhere else. Perhaps you need to move the program so it is at least in your /home path and perhaps the icon's path will subsequently need to be changed, otherwise there is no reason unless a library to run in the GUI is missing or some other such thing. |
Are you sure the program isn't running and then just killing itself? No output for most commands means it ran and exited without error. Perhaps it's an error in the program itself.
|
My take...
Quote:
|
Thank you
Thank you for these suggestions. Unfortunately, none seem to address whatever the issue is. When the program runs (which it does when called in the terminal) it creates a window which persists until I close it, so I do not think the program is running and closing itself. Also, the properties all seem to be in order. I have recompiled it, thinking there may be something in that, but recompiling did not help.
As I mentioned in my first post, other programs I have compile run when I click on their icon, so I am very much stumped. This is obviously not a major issue, but any thoughts would be welcome. Thanks again. |
Quote:
Does the Terminal window stay open along with the program? You might look in the home directory of the program for a configuration file of some kind (it is likely hidden as a .filename file which can be viewed with ls -a from a terminal), it might be that your config file shows a different PATH or version variable. This happened to me when I installed BlueJ, but with a bit of editing, I now have all working according to my needs. |
Thank for these responses. I have not exactly solved the problem, but I believe that I have identified (or at least narrowed) the suspects: it seems to be with the signal handling routine in the program itself. When I remove that section of the program, I can double click the icon and the program will run. I don't really understand what is going on (this applies generally), but the signal emitted from the mouse-click and the signal within the program seem to be in conflict of some sort. Further thoughts would be helpful, but essentially I am going to solve the problem by removing it(the signal handling part).
Thanks again. |
Looks fine, very interesting problem.
|
Actually, this seems to be related to the computer's system. The machine which experiences problems is running PClinuxOS. At work I run Mandriva and there things function as I expected (hoped).
|
Quote:
|
The first (non-obedient) machine is running PClinuxOS with KDE desktop. The other machine (Mandriva) has, I think, a gnome (or gnome-ish) desktop.
Thank you for the suggestion about the kernel. I am really pretty new at this, so that is an option for when I know (much) more. |
Quote:
Larry |
All times are GMT -5. The time now is 02:58 AM. |