Hello. I’m making Rover Car with Jetson TK1 and Pixhawk(Drone Flight Controller)
I have to run Startup Python Script on Jetson TK1.
My Python Script is
/home/ubuntu/Drone/AutoRun.py
:
import pygame
LandingFile = ‘/home/ubuntu/DroneChallenge/Voice/Landing.mp3’
PythonScriptsLauchingMP3File = ‘/home/ubuntu/DroneChallenge/Voice/PythonScriptsHasBeenLaunched.mp3’
pygame.init()
pygame.mixer.init()
pygame.mixer.music.load(LandingFile)
while(1) :
pygame.mixer.music.play()
#delay command should be input
while pygame.mixer.music.get_busy():
pygame.time.Clock().tick(10)
and it is my Shell Script to launch Python Script(home/ubuntu/drone/ShellScriptPractice) :
#!/bin/sh
#Linux Script for Executing Python Script.(booting)
echo “Hello World!”
python ~/DroneChallenge/AutoRun.py
I ran Shell Script with this command : sudo sh home/ubuntu/drone/ShellScriptPractice/Script.sh
and it worked well.
So I tried to add this script to startup application.
https://askubuntu.com/questions/228304/how-do-i-run-a-script-at-start-up
I followed this instruction but the all three instructions didnt work.
and I followed this :
but it didnt work.
I used gedit instead of Vi Editor. maybe is it problem?
(gedit:2814): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
I met this error whenever I used gedit.
I have no idea of adding simple shell script to startup application…please help me