startup problems

Hello, I am writing because I had a trouble.
On my raspberry I created a small web server with emoncms I shows the measured temperature and brightness in my room.
When you start doing from 4 programs in python who ran all the functions, the boot file was as follows:

GPIO_start.sh

    #! / bin / bash /
    modprobe i2c-dev
    cd / home / LR /
    nohup python /home/LR/LEDServer.py> / dev / null / &
    nohup python /home/LR/GPIOInt_ff.py> / dev / null / &
    nohup python /home/LR/GPIOInt_AUX.py> / dev / null / &
    nohup python / home / LR / GPIOInt_MESS py> / dev / null / &

I wanted to edit the boot file in this way:

GPIO_start.sh

    #! / bin / bash /
    modprobe i2c-dev
    cd / home / LR /
      python /home/LR/LEDServer.py
      python /home/LR/GPIOInt_FF.py
      python /home/LR/GPIOInt_AUX.py
      python / home / LR / py GPIOInt_MESS

because the execution of the program LEDServer.py there are some mistakes that I wanted to see.
The problem is that now when I start my program raspberry GPIOInt_FF.py I occupies the terminal and I can no longer get out of the program's running, not even by pressing ctrl + c.
I also do not work with the free LAN because the software kitty I can no longer connect to my raspberry card, in fact I had to connect the monitor.
How do I get out of this situational?
There is no way to modify the startup files GPIO_start.sh?
I report the last message I see on the terminal Raspberri.

Code: Select all
    INIT: Entering runlevel: 2
    [info] Using makefile-style concurrent boot in runlevel 2
    [ok] Network interface plugging Deamon ... skip eth0 ... done.
    [ok] Starting enhanced syslogd: rsyslogd.
    error opening '/ dev / input / event *': No such file or directory
    Traceback (most recent call last):
       File "/home/LR/LEDServer.py", line 45, in <module>
         with mdb.connect = (DbServer, dbuser, DbPasswd, 'RaspiBase');
       File "/usr/lib/python2.7/dist-packages/MySQLdb/_init_.py", line 187, in _init_
         super (Connection, self) init ._ _ (* args, ** kwargs2)
    _mysql_exceptions.OperationalError: (2002, "cant't connect to local MySQL server through socket
    pin initial value = '1'
    _

Thanks for your help.
Marcello

ricello's picture

Re: startup problems

I've come up with a solution but not if it is feasible.
I can not remove the SD card from my raspberry and a reader usb connect to pc with windows, so I could edit the script that I created (GPIO_start.sh) in /etc/init.d.

Thank you

pb66's picture

Re: startup problems

If the file is located in /etc/init.d you are unlikely to be able to access it in windows.

You could either use a "linux live cd" to reboot your windows PC as linux or if your SD card reader is a portable usb device and have another working SD card, boot the Pi using the good SD card and access the problem SD card using your card reader connected to the Pi.

ricello's picture

Re: startup problems

I am a beginner with linux environment, it is difficult to browse and edit the files in a usb card with linux?

pb66's picture

Re: startup problems

It maybe difficult but at least it is possible. I do not think you will be able to access the files you want on a windows PC as they are in a linux file system which windows cannot see.

If you struggle with the command line you could boot to a graphical user interface where there is a desktop and a file manager which is not whole lot different to windows, point and click.

If you connect a screen, keyboard and mouse to the Pi and type xstart (or maybe sudo xstart, I'm not sure which) it should start the desktop GUI. 

The issues you have are not specific to this project and you would actually get more suitable advice on the raspberry pi forum.

Paul

ricello's picture

Re: startup problems

Ok, thanks for the tip
This evening I make some attempt.

ricello's picture

Re: startup problems

You have been my help with your last suggestion, I got a new SD card, I uploaded an image of the distribution debian, I did restart my raspberry with the new card, and from there I connected with the old going to modify the boot file.
Now I work as before.

Thank you all for the help.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.