Go to advanced search

by plasticus
Mon Nov 07, 2016 1:43 pm
Forum: General discussion
Topic: start script via bash = huge CPU drain
Replies: 14
Views: 3796

start script via bash = huge CPU drain

Hi, I wrote a simple bash script to autostart a couple of programs (pure data and a python script) when the rasp boots ... I set the bash script to autorun at startup or if I run it manually). ...
by frankenberry
Wed Oct 26, 2016 2:10 am
Forum: Python
Topic: Run Python Script at Startup
Replies: 1
Views: 775

Run Python Script at Startup

... explaining how to do it eludes me... I have a python script I want to run in the background when the raspberry boots up. The script I run ...
by barraba
Mon Oct 10, 2016 10:26 am
Forum: Raspberry Pi OS
Topic: Jessie dhcpcd.conf
Replies: 7
Views: 5070

Re: Jessie dhcpcd.conf

... i read all thread that i can and this what i add ... slaac private # A hook script is provided to lookup ... but it should not be run by default. nohook lookup-hostname ... need that couse i have python script in cron that relyes ... raspberrypi systemd[551]: Startup finished in 46ms. Oct ...
by ShaunVW
Thu Oct 06, 2016 3:01 pm
Forum: Python
Topic: Autostarting a scanning program
Replies: 4
Views: 971

Autostarting a scanning program

I am running the latest version of Jessie... When I run my python program from the prompt, it ... was to make an executable shell script called from rc.local, and in ... there are 2 users on the auto startup, and when I scan in the code, ...
by robboz4
Mon Oct 03, 2016 3:14 am
Forum: General discussion
Topic: Best way to run a python script at startup?
Replies: 35
Views: 345680

Re: Best way to run a python script at startup?

Looks like the service solution works on the Pi0. It's been running and rebooting for a couple of days without a problem. Thanks for the help.
by Heater
Thu Sep 29, 2016 9:36 am
Forum: General discussion
Topic: Best way to run a python script at startup?
Replies: 35
Views: 345680

Re: Best way to run a python script at startup?

Ah Dougie, I came here to suggest using systemd and link to my post.

You did it for me!

I learned a trick here though, with your "After=mosquitto.service mysql.service", thanks.

I should really read up more about all the things one can put in a service file....
by DougieLawson
Thu Sep 29, 2016 7:57 am
Forum: General discussion
Topic: Best way to run a python script at startup?
Replies: 35
Views: 345680

Re: Best way to run a python script at startup?

viewtopic.php?p=921354#p921354 tells it all.

It's very simple and much easier than a /etc/init.d script.
by robboz4
Thu Sep 29, 2016 1:15 am
Forum: General discussion
Topic: Best way to run a python script at startup?
Replies: 35
Views: 345680

Re: Best way to run a python script at startup?

Thanks guys. I'll try the service method. Do you have link to set that up? As I state earlier I couldn't get cron to run. Any reason why there is a different between the two versions of OSes? I don't think the hardware will care...
by johnb_summers
Thu Sep 29, 2016 12:54 am
Forum: General discussion
Topic: Best way to run a python script at startup?
Replies: 35
Views: 345680

Re: Best way to run a python script at startup?

... force it to wait until MySQL is running. [Unit] Description=PHP SQL server After=mosquitto.service ... WantedBy=multi-user.target that example waits for both Mosquitto and ... matters is way beyond me, it is a python script I run at boot and it does ...
by DougieLawson
Wed Sep 28, 2016 11:36 pm
Forum: General discussion
Topic: Best way to run a python script at startup?
Replies: 35
Views: 345680

Re: Best way to run a python script at startup?

Use a systemd service file. You can force it to wait until MySQL is running. [Unit] Description=PHP SQL server After=mosquitto.service mysql.service [Service] ExecStart=/usr/local/bin/some_such_pgm.php Restart=always StandardOutput=syslog StandardError=syslog SyslogIdentifier=SQL_PHP_service User=pi...
by johnb_summers
Wed Sep 28, 2016 11:13 pm
Forum: General discussion
Topic: Best way to run a python script at startup?
Replies: 35
Views: 345680

Re: Best way to run a python script at startup?

I run a python script at boot, it has a try loop at the start to wait until ...
by robboz4
Wed Sep 28, 2016 8:51 pm
Forum: General discussion
Topic: Best way to run a python script at startup?
Replies: 35
Views: 345680

Re: Best way to run a python script at startup?

I'm trying to run a script on a Pi 0 at boot time and I cannot get it to work with ... GNU/Linux This is the rc.local command: sudo python /home/pi/PiGMiMon.py & The only difference ...
by Crannog
Tue Sep 27, 2016 7:41 am
Forum: Beginners
Topic: Automatic respawn of a init script
Replies: 4
Views: 1537

Automatic respawn of a init script

... a remote solar powered weatherstation. It runs Python script at startup using a Start-Stop-Damon as described ...
by shapefree
Thu Sep 22, 2016 6:30 pm
Forum: Troubleshooting
Topic: Raspberry Pi not running crontab script on startup
Replies: 8
Views: 7091

Raspberry Pi not running crontab script on startup

... in my post. I am trying to run a code when the R Pi boots ... and run it. I have also created a launch.sh file for my python script. I have changed the crontab ... scripts can run the crontab at startup. I even checked and the functions ...
by StormMaster1
Tue Sep 20, 2016 10:22 pm
Forum: Troubleshooting
Topic: Running Tkinnter Program on Boot
Replies: 6
Views: 1727

Re: Running Tkinnter Program on Boot

... I have tried adding in that command, @lxterminal -e /usr/bin/python3 ... strange thing is when I run the program in the terminal ... and run the script directly it runs without ... getting it to start on startup is the hard part. This ... for compatibility with Python 2.6 credentials = tools.run(flow, ...
by jacks909
Mon Sep 12, 2016 10:08 am
Forum: Troubleshooting
Topic: 16x2 LCD Module writing speed issues on the Pi3
Replies: 0
Views: 331

16x2 LCD Module writing speed issues on the Pi3

... to a 16x2 LCD module. A python script is setup to run on startup and write a message on the LCD module. The problem is that the LCD write seems to be very slow, ...
by firlus
Sun Sep 11, 2016 9:06 am
Forum: Troubleshooting
Topic: Problems with vlc and rc.local
Replies: 1
Views: 1086

Problems with vlc and rc.local

... a rtsp stream on bootup. At the moment my rc.local (which runs on startup) runs a python script that manages everything with this ...
by VaeInimcius
Wed Sep 07, 2016 2:47 pm
Forum: Other projects
Topic: "Cyber-Prepping" Project
Replies: 0
Views: 377

"Cyber-Prepping" Project

... in this post – I am gathering requirements for this ... python/ So obviously all of ... jump out your window - On startup through scripts (I assume Cron tasks/.py ... if you have to remain on the run – I know I can get most of ...
by CarlRJ
Tue Sep 06, 2016 10:38 pm
Forum: General discussion
Topic: Static Python GUI Program
Replies: 1
Views: 484

Re: Static Python GUI Program

I have created a Python GUI application and want ... and turn off the setting that runs X-windows at startup, and also turn off the bit ... at a login prompt. Write a small script to start your GUI application. ...
by scottwalter
Tue Aug 30, 2016 10:28 pm
Forum: Camera board
Topic: Lightweight python motion detection
Replies: 259
Views: 288206

Re: Lightweight python motion detection

... to improve stability / operation. Here is my code, including a basic wrapper script for start / stop (which ... /etc/init.d for automatic startup on reboot). I also tweaked ... image captures. Primary Python code (see wrapper script ... #Run once an hour and 23:55 (catch ...
by kusti8
Thu Aug 25, 2016 12:30 pm
Forum: Beginners
Topic: Running python shutdown script on startup
Replies: 6
Views: 2254

Re: Running python shutdown script on startup

... know some stuff but not much on scripting). Is there much difference in the coding between a python script and a shell? Can I just ... Or #!/usr/bin/env python At the top. Or just run it as python /path/to/script.py
by vck3000
Tue Aug 23, 2016 3:31 am
Forum: General programming discussion
Topic: RPi crontab python error, camera
Replies: 3
Views: 1452

RPi crontab python error, camera

Hi there, I have a python script that is configured with crontab to run on reboot, however the script crashes ... can I get this script to run on startup? By the way, a couple months ...
by JimmyN
Mon Jul 25, 2016 5:39 pm
Forum: Beginners
Topic: HowTo auto-run LXTerminal from LXDE desktop at startup
Replies: 44
Views: 80012

Re: HowTo auto-run LXTerminal from LXDE desktop at startup

Sure you can. And depending on what you're doing and how you want it ... another keyboard/mouse). Synergy runs in the background so I start the script directly, and I use the "@" so it ... runs in the background as well, using Python. Just to test I added a second line ...
by asandford
Fri Jul 15, 2016 12:39 am
Forum: Python
Topic: Launching Python script at startup
Replies: 11
Views: 2443

Re: Launching Python script at startup

Thanks for that. So I added a sleep in my init.d script and now I get my email at boot up. ... told to 'start' or 'stop', it will run on startup and shutdown. It is not a bug in the OS, ...

Go to advanced search