Run C project automatically after boot - boot

I have followed the http://www.adapteva.com/white-papers/building-linux-for-parallella-platform and Booting went well. How would I get my C code to run automatically after the parallella boots up?

you can put the script into ~/.bash_profile or ~/.bashrc

Related

Unable to run chromium startup command inside of SH file on Raspberry Pi

I am having an issue when it comes to running Chromium on startup on my Raspberry Pi. I am able to get it to run when I include the command chromium-browser --start-fullscreen https://www.google.com/ in /etc/xdg/lxsession/LXDE-pi/autostart But for my webapp project I want to run chromium after I run an SH file that opens a virtual environment and runs a python code. Issue is when I put the chromium command in my sh file startup.sh and run it in rc.local using the command bash /home/pi/MySQLAppTrueTrue/startup.sh. The chromium browser doesn't launch. Even though all the other commands inside the sh file operate without error. I thought it may be due to the sh file not having excutable permissions so I ran chmod +x startup.sh in the rpi terminal. But that did not fix my issue. Do I need to add this permission to rc.local? If not, what is the solution to this problem. Thanks!

Google Coral Dev Board: Fastboot is not found on path?

I am trying to flash my google coral dev board on the macos. I learned that Catalina wouldn't function for using the board, so I downgraded to Mojave. Everything goes smoothly, except when I type the command
bash flash.sh
Onto my terminal in the process of flashing my board. The terminal returns the command:
Couldn't find fastboot on your PATH -- did you install it?
I am sure I installed it. When I type fastboot devices or version on my terminal, it shows up correctly. And, when I echo path, this comes up
/Users/name/Downloads/fastboot:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
So I am sure that it is on my path also. Does anyone know the solution to this?
Try opening a new terminal and see if it is still in your path. If it is not in your path you can add it to ~/.bash_profile
sudo vim ~/.bash_profile
Add the line:
export PATH=${PATH}:~/.local/bin
Then when you open a new terminal it will still be in $PATH and bash flash.sh should work
I faced the very same issue as you, and the way I could run flash.sh to "flash" my Coral dev was by modifying the file (flash.sh) and added the path where fastboot was located.
(I'm a Mac user) This is how I did it:
I went to check the version of fastboot (It also gives you where is the file located at)
cd ~/.local/bin
then:
./fastboot --version
Command results:
fastboot version 30.0.4-6686687
Installed as /Users/jegamboafuentes/.local/bin/./fastboot.
Then I went to the flash.sh file, open it and modify the line 19:
FASTBOOT_CMD="$(which fastboot)"
for:
FASTBOOT_CMD="/Users/jegamboafuentes/.local/bin/./fastboot"
I re-run, and BOOM! it worked, my Coral Dev Board was flashed.
Check your model number using the reference here. If it was manufactured before April 10, 2019, then there are some steps for you to follow.
Similarly, make sure you download the latest fastboot version here. Fastboot should be version 28.0.2 or higher. Hope this helps.

OSX: env variable is not available

In my gradle project, I am using Dropwizard Crypto for encrypting passwords. I have added the passphrase to IntelliJ env variable and when running "gradlew run" task got the error that can't decrypt.
I have also added the env variable to ~/.bash_profile and run the IntelliJ from terminal and got same error. It works perfectly fine on Windows but on Mac not working (My os is Sierra 10.12)
I have tried running the gradlew run task from terminal and got same error. Any help appreciated.
It should probably be in
~/.bash_profile (with a dot)
or
~/.profile
Try to
export IntelliJ=passphrase
from a terminal session and run gradlew from the same session.

Why when i restart the shell, java is unavailable?

I have installed java 1.7 on my mac, and I have edited ~/.bash_profile as the following:
export JAVA_HOME=/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Content s/Home
export PATH=${JAVA_HOME}/bin:$PATH
When I execute source /.bash_profile, the java become available. But when I restart the shell, I got the following error message:
No Java runtime present, requesting install.
I have to re-execute source /.bash_profile to make it available.
I am so confused, hope someone can help me.
It is because variables you export are only valid in the current ssh session.
Look here for deeper explanation:
Mac OS X 10.9 - setting permanent environment variables
As #trojanfoe stated there:
The .bash_profile is only executed for a login-shell, whereas .bashrc
is executed for every new shell instance
Check this posting out please. I don't believe your problem is a JAVA problem but it looks rather misunderstanding on BASH side.

pod install: command not found when called from bash script

I'm improving the continuos integration of a project. And we decided to take an extra step and start using cocoapods. All the rvm installation is legacy and indeed I have a lot of troubles installing ruby 2.2.0. The thing is that, when I test my build script using terminal it works fine, but when I try to run them without opening a terminal window (called from applescript, jenkins or another ruby script). The command is not found.
Already tried adding the path to .rvm/scripts to the PATH variable in both .bashrc and .bash_profile
Have you try to reconnect the server after you installed the cocoapods? sometimes it doesn't see the new vars till it disconnected and reconnected.
Also make suer that the vars that you see through the terminal are available for jenkins user. you can check that through the slave "Script Console"
If it still don't work, try to set the path in the "execute shell", just before you run the pod install.
This is how it works for me:
echo "Running pod install"
cd ${WORKSPACE}
export LANG=en_US.UTF-8
pod install

Resources