Page 1 of 1
running executable files in Rpi
Posted: Fri Sep 12, 2014 2:07 pm
by ybohan
Hello,
i have bought an Rpi in order to use it alongside with eHealth platform. When i run the .cpp files with the command
"g++ -lrt -lpthread temperature.cpp arduPi.o eHealth.o -o temperature" it creates an executable file that runs on the LXTerminal with the command "sudo ./temperature" . On the other hand, when i try to run it by double clicking it , it asks me whether to execute it or execute it in terminal. Both options doesn't work at all for me.
What should I do? I simply dont want always to execute them via commandline in terminal
Thank you in advance,
ybohan
Re: running executable files in Rpi
Posted: Fri Sep 12, 2014 8:10 pm
by lmarmisa
I recommend to create a shell script.
Edit a file named, for example,
temperature.sh and type these lines:
Code: Select all
#!/bin/bash
sudo ./temperature # Maybe an absolute path to the file temperature would be more suitable
Save the file and then type this command:
You can read a little tutorial about bash scripting here:
http://linuxconfig.org/bash-scripting-tutorial
Re: running executable files in Rpi
Posted: Tue Sep 16, 2014 2:17 pm
by ybohan
I did this but when I double-click it,it asks me to execute it or execute it in terminal and in both options it does nothing.
In option execute in terminal it seems that something is loading but nothing.
Re: running executable files in Rpi
Posted: Tue Sep 16, 2014 3:39 pm
by r3d4
gdb ?
--
http:// en.wikipedia.org/wiki/GNU_Debugger
Re: running executable files in Rpi
Posted: Wed Sep 17, 2014 7:26 am
by ybohan
I did so,
it didn't have any segmentations. It runs normally.
Re: running executable files in Rpi
Posted: Fri Sep 19, 2014 7:33 am
by ybohan
Is there any other solution i could try?
Re: running executable files in Rpi
Posted: Fri Sep 19, 2014 8:24 am
by ghans
Try this :
http://linux.koolsolutions.com/2009/09/ ... e-desktop/
It's defnitely not intuitive when you come from a Windows background , any program you double-click starts in a window there ( but many console tools
close it after complaining about missing parameters).
ghans
Re: running executable files in Rpi
Posted: Fri Sep 26, 2014 8:00 am
by ybohan
I just want a programm to be run not from terminal for a use from someone who is not familiar with linux.
Nut all solutions till now cant help for raspberry
Re: running executable files in Rpi
Posted: Fri Sep 26, 2014 8:24 am
by gkreidl
What kind of interface/output does this program supply? If it is text based, it must be run from inside a terminal. If it has some kind of X-interface (gtk+, QT, tk whatever), it can be run without a terminal. In your case its has to be run as root and that's a special case. Desktop programs running as root should be started with gksudo.
To start it with a double click from the desktop, you have to create a desktop file. Ghans already supplied a link. You may also look into other desktop files in /usr/share/applications.
Re: running executable files in Rpi
Posted: Fri Oct 03, 2014 12:01 pm
by ybohan
It is a binary executable file that is created from the following command:
g++ -lpthread -lrt program.cpp first.o second.o -o program
and i run the executable called "program" with the following command in terminal
sudo ./program
I want this to execute it by a desktop shortcut so there is no need to open always the terminal but to be opened and run by this shortcut.
The .desktop file that was suggested is ok but is says that my file is binary and it opens as text.
This is what i need to do and thanks for your help in advance
Re: running executable files in Rpi
Posted: Fri Oct 03, 2014 1:43 pm
by ybohan
I finally found the solution
I wrote
Exec=lxterminal --command sudo /home/pi/Desktop/program
Thank you for your help
Re: running executable files in Rpi
Posted: Thu Feb 11, 2016 2:43 am
by I'mPavan
Hello ybohan !!
I'm pavan. I just read your post running executable files in Rpi. I too use the e-health kit with Rpi.
I am working on uploading the values of temperature from the kit to cloud with Ethernet connection. But I am not successful in doing so.
I am using arduPi library with modified code for e-health kit with Ethernet. Then I encountered errors in compiling.
modifying the wifi
So I decided using wifi for this. Can you help me how to modifythe code with wifi to get the accessible to local server.
Regards,
PavanKumarK