Hot answers tagged

3

In order to store the script’s text output in a log file, you can change the ExecStart line to: ExecStart=/usr/bin/python3 /home/pi/sample.py > /home/pi/sample.log 2>&1 This is wrong, although I notice there are a few Raspberry Pi oriented tutorials that claim it will work. It will not work because > (and 2>&1) are POSIX shell ...


3

If you're expecting a GUI browser to open, the DISPLAY environment variable may need to be explicitly set so that the browser the webbrowser module opens knows where to show itself. Otherwise it would likely not start at all and instead crash, not finding a valid GUI. For a systemd.service, you would do this by adding the line Environment=DISPLAY=:0 to the ...


3

Just haven't a monitor by hand so I can't test it but here are some ideas how it could work with reference to this accepted answer How to make a service to run a python script which includes browser automation. First of all we have a graphical output so the multi-user.target isn't enough. It is only for the text console. We have to use the graphical.target. ...


3

Get a new SDCard and a USB reader. Etch a copy of Raspbian Lite on the new card. Boot that. Mount the broken system in a USB reader. Mount the USB reader in your RPi. Open a command line and use sudo -s to get a root shell. Run these commands for i in a1 a2 a5 a6; do umount /dev/sd$i; fsck -f -y /dev/sd$i; done mount /dev/sda2 /mnt or mount /dev/sda6 (if ...


1

You noted in a comment that the pcscd service starts another service pcscd.socket. You should edit the question and add this important information to it. With the command rpi ~# systemctl enable pcscd you have only enabled pcscd.socket as you can see at the link to enable the socket service: Created symlink /etc/systemd/system/sockets.target.wants/pcscd....


1

sudo systemctl enable pcscd will get it active at boot time.


1

I had an issue like that with one of my Python projects, where I needed a Bash script with the steps to run my program to run not only after the Raspberry Pi boots, but also after the GUI loads. What worked for me was following the instructions in one of the posts in the "How to launch programs on LXDE startup" topic in the raspberypi.org forums, depending ...


1

Why systemd-analyze shows 3.8s boot time Actually what it says is "Startup finished in...". At what point "booting" is finished depends on your definition of booting, which is really about context. It could be defined as the amount of time it takes the kernel to load from power on and launch a userland -- I think this would be equivalent to the first ...


1

power issue? 3b+ draws more than 3B


1

Most current OS like, for example, Raspbian use the systemd init system by default. Assuming you have an OS with systemd (check you have it installed with command systemd --version) you can easily create a service that runs your python script at startup. Change your settings to have the RPi boot into text console mode instead of GUI sudo systemctl set-...


1

Same problem here. A Pi4 will not reboot if a powered USB 3.0 hub with HDD is connected. I have opened up a cheap Chinese USB 3.0 hub, and de-soldered the red 5V power cable to the computer, so, this one will always need external power to work, and it does. But the Pi4 will not reboot while it is connected. This indicates that the problem is not back ...


1

I have the same issue that @thatoneguy245 and test my 32 GB sd card on windows and Unix with all solutions found on Google. But, after many many many pull push SD card from different devices. I found the issue : the strength of the card was broken and micro power cuts broke the links and create circuit breakages. I only saw it after returning the SD card ...


1

Had a similar problem with an old RPi 1B not booting from the SD. Tried all kind of software and configuration fixes. Very occasionally it worked then stopped again. Then I tried pressing on the SD card while booting and then it boots 100% ok. I cleaned the connections to card and the SD connector on the Pi using a special PCB cleaning brush (fibreglass ...


Only top voted, non community-wiki answers of a minimum length are eligible