LinuxQuestions.org
Visit Jeremy's Blog.
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 01-15-2012, 03:58 PM   #1
amgilman
LQ Newbie
 
Registered: Mar 2011
Posts: 12

Rep: Reputation: 0
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.
 
Old 01-15-2012, 04:08 PM   #2
celthunder
Member
 
Registered: Feb 2009
Location: Newton, WI
Distribution: Arch
Posts: 84

Rep: Reputation: 8
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?
 
Old 01-15-2012, 05:10 PM   #3
MartinStrec
Member
 
Registered: Jan 2012
Location: Czech
Distribution: Fedora, RHEL, Ubuntu, Mint
Posts: 110

Rep: Reputation: 13
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.
 
Old 01-15-2012, 06:54 PM   #4
amgilman
LQ Newbie
 
Registered: Mar 2011
Posts: 12

Original Poster
Rep: Reputation: 0
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.
 
Old 01-15-2012, 07:30 PM   #5
lisle2011
Member
 
Registered: Mar 2011
Location: Surrey B.C. Canada (Metro Vancouver)
Distribution: Slackware 2.6.33.4-smp
Posts: 183
Blog Entries: 1

Rep: Reputation: 25
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.
 
Old 01-15-2012, 09:54 PM   #6
celthunder
Member
 
Registered: Feb 2009
Location: Newton, WI
Distribution: Arch
Posts: 84

Rep: Reputation: 8
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.
 
Old 01-15-2012, 11:09 PM   #7
larrym82
Member
 
Registered: Dec 2011
Posts: 71

Rep: Reputation: Disabled
My take...

Quote:
Originally Posted by amgilman View Post
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.
A couple of things come to mind: First, I assume you are clicking or dbl clicking on an icon (not from within the terminal). If that's the case, your icon properties likely do not have the path/command entered correctly. Right click the icon, go to properties and you should be able to fix your problem from there.
 
Old 01-16-2012, 07:47 AM   #8
amgilman
LQ Newbie
 
Registered: Mar 2011
Posts: 12

Original Poster
Rep: Reputation: 0
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.
 
Old 01-16-2012, 01:03 PM   #9
larrym82
Member
 
Registered: Dec 2011
Posts: 71

Rep: Reputation: Disabled
Quote:
Originally Posted by amgilman View Post
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.
When you open in the Terminal, are you logged in as root? (You should NOT be, but if you are that means your permissions aren't correct.)

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.

Last edited by larrym82; 01-16-2012 at 01:06 PM.
 
Old 01-17-2012, 07:23 AM   #10
amgilman
LQ Newbie
 
Registered: Mar 2011
Posts: 12

Original Poster
Rep: Reputation: 0
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.
 
Old 01-17-2012, 07:45 AM   #11
MartinStrec
Member
 
Registered: Jan 2012
Location: Czech
Distribution: Fedora, RHEL, Ubuntu, Mint
Posts: 110

Rep: Reputation: 13
Looks fine, very interesting problem.
 
Old 01-17-2012, 11:03 AM   #12
amgilman
LQ Newbie
 
Registered: Mar 2011
Posts: 12

Original Poster
Rep: Reputation: 0
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).
 
Old 01-17-2012, 12:49 PM   #13
larrym82
Member
 
Registered: Dec 2011
Posts: 71

Rep: Reputation: Disabled
Quote:
Originally Posted by amgilman View Post
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).
That is interesting. I run PClinuxOS with KDE desktop, and have noticed that there are elements of Mandriva in it while scouting around in the terminal. Are you operating the same desktop on both machines? Keep in mind that the kernel is the only truly Linux part of your system and that it acts as an intermediary between the software you're using and the hardware. It might be the case that compiling a customized kernel for your specific hardware would obviate this issue, but I for one do not possess those skills.
 
Old 01-18-2012, 07:39 AM   #14
amgilman
LQ Newbie
 
Registered: Mar 2011
Posts: 12

Original Poster
Rep: Reputation: 0
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.
 
Old 01-18-2012, 07:56 AM   #15
larrym82
Member
 
Registered: Dec 2011
Posts: 71

Rep: Reputation: Disabled
Quote:
Originally Posted by amgilman View Post
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.
You're welcome. In my experience KDE is not compatible with GNOME and possibly gtk software. It may be PCLOS though, because I know they are pretty insistent on getting software ONLY from their repositories. Guess it's time to sign off. Best
Larry
 
  


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
problem running executable kostis Linux - Newbie 14 03-08-2007 04:57 AM
problem running executable kostis Linux - Software 1 03-05-2007 05:33 PM
Running a Java executable class from another executable class LUB997 Programming 22 07-24-2005 05:57 AM
Running an executable. wesleyarchbell Linux - Software 4 05-03-2005 04:50 AM
running an executable wogga Linux - Software 8 06-12-2004 05:21 AM


All times are GMT -5. The time now is 04:30 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