how to run appium command on startup by using terminal - bash

I want to run appium program and see appium process running in terminal automatically on startup
I have created a simple bash script to run the appium command using gnome-terminal.
appium.sh
#!/bin/sh
gnome-terminal -- appium
and when I run the command by terminal ./appium.sh it works.
(Use `node --trace-deprecation ...` to show where the warning was created)
[Appium] Welcome to Appium v1.21.0
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
but when I put in sudo nano /etc/xdg/lxsession/LXDE-pi/autostart to run the program automatically at startup.
#lxpanel --profile LXDE-pi
#pcmanfm --desktop --profile LXDE-pi
#lxterminal -e bash /home/pi/appium.sh
#xscreensaver -no-splash
gnome-terminal opens successfully, but the appium command fails to run.
There was an error creating the child process for this terminal
Failed to execute child process “appium” (No such file or directory)
Is there something wrong ? please help

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!

On Windows, how can I stop npm from running processes in new windows?

When I run npm commands on my Windows 10 machine, new processes seem to spawn in new windows.
On my (Mac-using) colleagues machines, I see that these commands run in the same terminal window from which they were called. This is the behaviour I'd expect and is much more useful - it's really hard, for instance, to see my test results in the split second between them finishing and the terminal window being closed!
As an example, our packages.json has a script to run jest:
scripts": {
"test": "jest"
}
When I run npm run test, the following gets written to the current terminal:
$ npm run test
> #headuplabs/mobile#0.0.1 test C:\Users\TomWright\Documents\Repos\HeadUp.Mobile
> jest
But the actual execution of jest then gets started in a newly created window:
I'm using "git bash" as my default integrated terminal in VS Code, but I'm able to replicate this using cmd.exe and outside VS Code (i.e. by running git bash or cmd standalone).
I presume that my npm installation is improperly configured, but my Google search haven't yielded any answers.
Does anyone know what I'd need to do to make npm processes run in the same terminal window?
As mentioned in "how to set shell for npm run-scripts in windows", you might want configure the shell in npm itself:
npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"
That would avoid the default setting, which can trigger a new shell window.

Running a macOS service for open with emacs failed with "emacsclient: could not get terminal name mac"

I created a service in macOS so I could open any file with emacs as I wanted. The service was created using Automator with the following shell script:
/usr/local/bin/../Cellar/emacs/25.3/bin/emacsclient -nc "$#"
While this service will always failed with the following message:
emacsclient: could not get terminal name
Anyone has some clues? Thanks forward.

Unable to install qunit using npm

I was trying to install "qunit" using Windows command Prompt by executing the command
"npm i qunit".
On executing , it loads something and then it does not show anything . I have to press Ctrl+C twice to stop whatever this command is executing in the background.
Because of this "qunit" is not getting installed properly.
How should i resolve this problem ?

Run meteor tests with Chimp at Codeship CI

I have Meteor project and I want to run my tests with Chimp at Codeship.
I have a problem that Meteor project must be started before running Chimp. After starting Meteor, it blocks terminal showing that server si ready at localhost:3000
Usually at localhost I just run (and wait to start) Meteor. Then in another bash tab I run chimp.
At Codeship bash I cannot do such a thing. I tried some linux commands sleep, &, nohup but I cannot put it together.
Setup commands
# Install node
nvm install 4.0
nvm install 0.10
node -v
# Install chimp
npm install -g chimp
# Install meteor
curl -o meteor_install_script.sh https://install.meteor.com/
chmod +x meteor_install_script.sh
sed -i "s/type sudo >\/dev\/null 2>&1/\ false /g" meteor_install_script.sh
./meteor_install_script.sh
export PATH=$PATH:~/.meteor/
meteor --version
Test commands
nohup bash -c "meteor --settings=settingsRemote.json 2>&1 &" && sleep 3m; cat nohup.out
chimp --ddp=http://localhost:3000 --mocha --browser=firefox --path=tests
With above settings I got this output on meteor command. Chimp is never run.
[[[[[ ~/src/bitbucket.org/jirikrepl/nedatluj-meteor ]]]]]
=> Started proxy.
=> Started MongoDB.
=> Started your app.
=> App running at: http://localhost:3000/
------------------------------------------------------------------------------
This command didn't output anything for 10 minutes, thus we stopped it.
Please make sure your steps regularly print to standard out or standard error.
If the error is on our end please inform us so we can help you to fix this.
------------------------------------------------------------------------------
Ok here is the solution. I edited code above, so it now works.

Resources