I am trying to start the Appium 2.0 server as a startup program when system boot up. The previous one is not working for me. Please support
if you want Appium automatically load after mac restart ->
Step ONE: turnOff encryption from your SSD
Its already done but its not helping. Can you provide me complete steps to start the server on boot up on mac 13.3
Step TWO: enable autologin with your user on mac -> https://support.apple.com/en-us/HT201476
Step THREE: add into login items script to start appium e.g. https://apple.stackexchange.com/questions/449441/where-do-the-allow-in-the-background-login-items-in-the-macos-ventura-system-s or https://support.apple.com/guide/mac-help/open-items-automatically-when-you-log-in-mh15189/mac
-
Install Appium 2.0. You can do this by running the following command in your terminal:
Code snippet
npm install -g appium@next -
Create a new file called appium-start-on-boot.sh and save it in your home directory.
-
Open the file and add the following code:
Code snippet
#!/bin/bash
appium &
-
Make the file executable by running the following command:
Code snippet
chmod +x appium-start-on-boot.sh -
Finally, add the following line to your ~/.bash_profile file:
Code snippet
start_appium_on_boot() {
/path/to/appium-start-on-boot.sh
} -
Save the file and close it.
-
Restart your Mac.
The Appium 2.0 server will now start on boot.
Here is an explanation of the code in the appium-start-on-boot.sh file:
Code snippet
#!/bin/bash
appium &
The first line tells the shell to execute the bash script. The second line starts the Appium server in the background.
The start_appium_on_boot function in the ~/.bash_profile file simply calls the appium-start-on-boot.sh script. This function is called when your Mac starts up.
I followed above steps and it has already added in to login item, but didn’t work on start up .