Go to advanced search

by RDK
Fri Apr 05, 2019 5:48 am
Forum: Beginners
Topic: Error when sudo apt-get dist-upgrade of Pi B+
Replies: 8
Views: 765

Re: Error when sudo apt-get dist-upgrade of Pi B+

Note: Pi B+ Continuing the saga from my previous posts: I found a Bluetooth dongle and reran these commands: sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade The last one took forever (5+ hours), but finished with no errors. However, now when I boot-up, I get this message: failed t...
by RDK
Tue Apr 02, 2019 4:46 pm
Forum: Beginners
Topic: Error when sudo apt-get dist-upgrade of Pi B+
Replies: 8
Views: 765

Re: Error when sudo apt-get dist-upgrade of Pi B+

Yes, I just finished upgrading to Stretch via this reference (https://www.datenreise.de/en/raspberry-pi-raspbian-update-update-jessie-to-stretch/). And, yes, I got basically the same errors from the sudo apt-get dist-upgrade and the sudo apt-get autoremove commands Is there a way to tell it not to l...
by RDK
Tue Apr 02, 2019 5:31 am
Forum: Beginners
Topic: Error when sudo apt-get dist-upgrade of Pi B+
Replies: 8
Views: 765

Error when sudo apt-get dist-upgrade of Pi B+

Yesterday I decided to update this Pi B+ currently running Jessie. I ran the sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade The first two completed normally, but the last sudo apt-get dist-upgrade ended with an error Setting up bluez (5.23-2+rpi2) ... Job for bluetooth.service fa...
by RDK
Tue Apr 02, 2019 5:20 am
Forum: Beginners
Topic: Get a new folder in the the PATH
Replies: 6
Views: 411

Re: Get a new folder in the the PATH

OK, I edited /etc/profile and when I echo $PATH it shows the change. However, I not sure this will affect other users on the Pi....RDK
by RDK
Mon Apr 01, 2019 4:16 pm
Forum: Beginners
Topic: Get a new folder in the the PATH
Replies: 6
Views: 411

Re: Get a new folder in the the PATH

OK, I saw that reference, but mostly it confused me!! There are/were too many answers and they often seemed to be in conflict. Mostly I want one simple answer. But, I will go back for another look....ROK
by RDK
Mon Apr 01, 2019 3:38 pm
Forum: Beginners
Topic: Get a new folder in the the PATH
Replies: 6
Views: 411

Re: Get a new folder in the the PATH

OK, but if I want to keep them all together in the current directory. Is there a way, as per my original post?....RDK
by RDK
Mon Apr 01, 2019 3:03 pm
Forum: Beginners
Topic: Get a new folder in the the PATH
Replies: 6
Views: 411

Get a new folder in the the PATH

I have installed some programs in /usr/pgms/MyStuff which I would like to run from the command line without first cd-ing the that folder or including the full path on the program command. In addition I want those programs to be available to other users on this Pi. For example, I want to run test.py ...
by RDK
Sun Mar 17, 2019 7:39 am
Forum: Beginners
Topic: How to detect if USB controller is hung
Replies: 0
Views: 468

How to detect if USB controller is hung

I've been reading about folks with issues ( https://raspberrypiandstuff.wordpress.com/2017/08/04/rtl_433-on-a-raspberry-pi-made-bulletproof/ ) where a program stops suddenly with no errors or explanations. The explanation seem to be associated with the USB or USB controller hanging. I've experienced...
by RDK
Sun Feb 24, 2019 3:04 pm
Forum: Automation, sensing and robotics
Topic: Using a Pi to Log Data in a Magnum Energy System
Replies: 123
Views: 54473

Re: Using a Pi to Log Data in a Magnum Energy System

Charles....OK, thanks. I will let you know if we decide to got head with this idea.....Rob
by RDK
Sun Feb 24, 2019 5:51 am
Forum: Automation, sensing and robotics
Topic: Using a Pi to Log Data in a Magnum Energy System
Replies: 123
Views: 54473

Re: Using a Pi to Log Data in a Magnum Energy System

Charles....It has been a while since I communicated on this subject. My system, which spies on the MAG-Web communications, has been working just fine, although it does stop working, as documented, when we lose internet. Now I would like to look into setting up your system on a different Pi. We have ...
by RDK
Fri Feb 08, 2019 1:12 am
Forum: Beginners
Topic: tmux command and options
Replies: 1
Views: 322

tmux command and options

I'm using the following command in my rc.local to start a Python script/program in a tmux window. Just looking at the manual and the web, I'm trying to figure out how it works? su xxx -c "tmux new-session -s XDR -d '/usr/bin/python /mnt/usbdrive/pgms/yyyy.py; exec bash'" I've been using this for som...
by RDK
Thu Oct 11, 2018 8:58 am
Forum: General discussion
Topic: Screen Application
Replies: 18
Views: 2106

Re: Screen Application

tpyo king.....OH, now I understand, I mistakenly thought the

Code: Select all

 \; set remain-on-exit on \;
were comments. Sorry for the confusion....RDK
by RDK
Thu Oct 11, 2018 8:13 am
Forum: Beginners
Topic: Confusion with /etc/rc.local
Replies: 14
Views: 1232

Re: Confusion with /etc/rc.local

Folks......Geez, this was a much simpler idea. My way was way too complicated and, apparently, prone to system issues. I'm now creating a file instead of swapping out the rc.local files and using that file to prevent the Python program from restarting. Thanks again for showing me the error in my way...
by RDK
Thu Oct 11, 2018 8:07 am
Forum: General discussion
Topic: Screen Application
Replies: 18
Views: 2106

Re: Screen Application

tpyo king....OK, I looked at that possibility but am not sure how to implement it. As I'm trying to do this via a command in the rc.local, it is not clear where and how to set this option for just the window being created by the rc.local. I was searching the web and found this possible answer which ...
by RDK
Wed Oct 10, 2018 5:30 pm
Forum: General discussion
Topic: Screen Application
Replies: 18
Views: 2106

Re: Screen Application

Folks.....I have finally gotten back to this project. I have installed tmux and am playing with it. However, I find it had the same problem as "screen" when I start it with this command: tmux new-session -s foobar -d "/usr/bin/python /mnt/usbdrive/pgms/testa.py" The test program run (counts down fro...
by RDK
Sat Oct 06, 2018 6:27 am
Forum: Beginners
Topic: Confusion with /etc/rc.local
Replies: 14
Views: 1232

Re: Confusion with /etc/rc.local

Folks.....Thanks for all of the good ideas. I'll put a file in /var/tmp, but first I'll clean it out:

Code: Select all

sudo find /var/tmp/ -mindepth 1 -delete
....RDK
by RDK
Fri Oct 05, 2018 2:21 pm
Forum: Beginners
Topic: Confusion with /etc/rc.local
Replies: 14
Views: 1232

Re: Confusion with /etc/rc.local

Thanks for the ideas. I'll give it some thought....RDK
by RDK
Fri Oct 05, 2018 5:44 am
Forum: Beginners
Topic: Confusion with /etc/rc.local
Replies: 14
Views: 1232

Re: Confusion with /etc/rc.local

OK now that we have discussed the merits (or lack thereof) for using rc.local, can anyone comment on the meat of my original question?...RDK
by RDK
Tue Oct 02, 2018 2:19 pm
Forum: Beginners
Topic: Confusion with /etc/rc.local
Replies: 14
Views: 1232

Re: Confusion with /etc/rc.local

OK, :) This is a program monitoring a continuous process, like for example the weather. The program posts data to a database. It can run for days, weeks, months without any issues. However, it does fail on occasion. In that case I trap the error and I don't want the program to restart during the nex...
by RDK
Tue Oct 02, 2018 12:21 pm
Forum: Beginners
Topic: Confusion with /etc/rc.local
Replies: 14
Views: 1232

Re: Confusion with /etc/rc.local

@mfa298.....OK, but this totally avoids the meat of my posting: why am I seeing/ why have I created two rc.locals and what can I do about it?...RDK Now to your comments , the goal of my code was to prevent the screen session and associated Python pgm from starting automatically after a reboot. I'm w...
by RDK
Tue Oct 02, 2018 7:02 am
Forum: Beginners
Topic: Confusion with /etc/rc.local
Replies: 14
Views: 1232

Confusion with /etc/rc.local

I have a Python pgm which is started in a screen session by the /etc/rc.local. su me -c "screen -d -m /usr/bin/python /mnt/usbdrive/pgms/mypgm.py" Regardless of the reason, in the Python pgm I execute the two shutil.move lines to swap rc.local.nopgm into rc.local and then initiate a reboot. rc.local...
by RDK
Wed Sep 26, 2018 5:15 am
Forum: General discussion
Topic: Screen Application
Replies: 18
Views: 2106

Re: Screen Application

Thanks folks....I'm resurrecting an old PiB+ Jessie to experiment with all of these ideas. I'm aware of the "screen -r" command, but the screen session created by my rc.local itself is closed when my Python program ends, so there is no screen session to attach to. Rebuild in progress and experiments...
by RDK
Tue Sep 25, 2018 6:51 pm
Forum: General discussion
Topic: Screen Application
Replies: 18
Views: 2106

Re: Screen Application

Hmmmm, that was what I suspected. I don't really what to restart that program/script, I really want to see the error messages which should be displayed when the program/script terminates. Oh well....RDK
by RDK
Tue Sep 25, 2018 1:13 pm
Forum: General discussion
Topic: Screen Application
Replies: 18
Views: 2106

Re: Screen Application

Perhaps I need a bit of clarification? Then when you re-attach to the screen you will be asked if you wish to kill the window by pressing 'k' or restart the process that failed by pressing 'r' When you say "restart the process that failed", I'm not sure if "process" means the screen session window o...
by RDK
Tue Sep 25, 2018 5:39 am
Forum: General discussion
Topic: Screen Application
Replies: 18
Views: 2106

Re: Screen Application

Thanks for the information, I've started looking into tmux. However, in the mean time, is there an option or keyword that I can add to my rc.local command su xxx -c "screen -d -m /usr/bin/python /mnt/usbdrive/pgms/mypythonpgm.py" so that this session does not end if the program itself terminates? I'...

Go to advanced search