Send Motion-user mailing list submissions to
        motion-user@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/motion-user
or, via email, send a message with subject or body 'help' to
        motion-user-requ...@lists.sourceforge.net

You can reach the person managing the list at
        motion-user-ow...@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Motion-user digest..."


Today's Topics:

   1. Re: can Motion be run without using sudo (Ted Romer)


----------------------------------------------------------------------

Message: 1
Date: Tue, 16 Jul 2019 23:11:47 -0500
From: Ted Romer <li227...@gmail.com>
To: Motion discussion list <motion-user@lists.sourceforge.net>
Subject: Re: [Motion-user] can Motion be run without using sudo
Message-ID: <ef3e3b57-58f5-4cff-8a5a-56c5fd672...@gmail.com>
Content-Type: text/plain; charset="utf-8"

I checked lsmod and the bcm2835-v4l2 module is listed. However, it is not 
listed in /etc/modules, so I don?t know how it is getting loaded on reboots. I 
also had uncommented the line ?mmalcam_name vc.ril.camera? in motion.conf. I 
have Motion 4.1.1 installed (installed by apt). I don?t know if that is doing 
anything or not. I will have to do some more tinkering.

I am using ?v4l2_palette 17?  Is that one okay to use with the PiCam or would a 
different palette choice be better.

I appreciate everyone?s advice. I have been using Motion for a number of years 
but as long as my Pi?s are running okay I leave them alone except for running 
apt-get update and apt-get upgrade every couple weeks to keep them up to date. 
The Pi I have been updating to Buster had been on Jessie and was running a 3.x 
version of Motion. Lately, its networking functionality was not working 
reliably on reboots.

Ted



> On Jul 16, 2019, at 6:27 PM, Adam Goryachev 
> <mailingli...@websitemanagers.com.au> wrote:
> 
> On 17/7/19 8:21 am, Jack Christensen wrote:
>> mmalcam works but as the doc states, only if Motion is installed from the 
>> .deb file. In order to do that, it's first necessary to install the gdebi 
>> utility which is then used to install the .deb file.
>> 
>> That's what I did, very straightforward actually, mmalcam is working fine 
>> for me, using the 4.2.2 release.
>> 
>> I believe that modprobe is a one time thing, but if there is a kernel 
>> update, then it will need to be done again. Someone can correct me if that's 
>> wrong.
>> 
> I believe you would need to load the kernel module each time you reboot. I'd 
> suggest manually doing a reboot and testing everything starts up correctly.
> 
> You should probably:
> echo bcm2835-v4l2 > /etc/modules
> 
> That will ensure the module is loaded after a reboot.
> 
> Regards,
> Adam
> 
>> On 7/16/19 3:24 PM, Ted Romer wrote:
>>> With Motion 4.1.1, does the mmalcam option (I am using a PiCam) still work? 
>>> I was reading the Basic Setup page for Motion on the GitHub site 
>>> (motion-project.github.io <http://motion-project.github.io/>) and it said 
>>> for using Motion installed by apt to use the bcm2835-v4l2 module (sudo 
>>> modprobe bcm2835-v4l2). If I should be using the module, is loading it a 
>>> once and done thing or do I need to load it after each restart of the Pi?
>>> 
>>> Thanks.
>>> 
>>> Ted
>>> 
>>> 
>>>> On Jul 15, 2019, at 7:18 PM, Jack Christensen 
>>>> <christensen.jac...@gmail.com <mailto:christensen.jac...@gmail.com>> wrote:
>>>> 
>>>> Hi Ted,
>>>> 
>>>> To start Motion on reboot, I have "@reboot motion" in my crontab.
>>>> 
>>>> I wrote a couple simple scripts to operate three camera machines and a 
>>>> fourth machine (also a Pi Zero) that serves to archive the captured videos.
>>>> 
>>>> One script just uses rsync to send the video files to the archive machine. 
>>>> This runs on the three camera machines, and is started by the on_movie_end 
>>>> parameter in the config file.
>>>> 
>>>> A second script runs once a day on the archive machine, started by cron. 
>>>> It creates a directory, moves all the video files collected that day to 
>>>> it, stops Motion on the camera machines, deletes all videos on the camera 
>>>> machines and retrieves the motion log, then restarts Motion.
>>>> 
>>>> The whole setup has worked quite well.
>>>> 
>>>> Jack
>>>> 
>>>> 
>>>> 
>>>> On 7/15/19 7:57 PM, Ted Romer wrote:
>>>>> Putting the pid file and log in the home directory is a good idea.
>>>>> 
>>>>> Do you have Motion set to start on reboot? If so, how do you configure 
>>>>> it? I have three Pis running Motion and I have a call in rc.local to 
>>>>> start Motion on reboot. That gets Motion restarted when the power goes 
>>>>> out.
>>>>> 
>>>>> Ted
>>>>> 
>>>>> Sent from my iPad
>>>>> 
>>>>> On Jul 15, 2019, at 6:23 PM, Jack Christensen 
>>>>> <christensen.jac...@gmail.com <mailto:christensen.jac...@gmail.com>> 
>>>>> wrote:
>>>>> 
>>>>>> I've been running Motion on several Pi Zero W machines without sudo. I 
>>>>>> like to create my own user (jack) instead of using pi but I think pi 
>>>>>> should work the same.
>>>>>> 
>>>>>> The config file is /home/jack/.motion/motion.conf
>>>>>> 
>>>>>> Log and pid files are in my home directory. In the config file I have:
>>>>>> 
>>>>>> daemon on
>>>>>> setup_mode off
>>>>>> pid_file /home/jack/motion.pid
>>>>>> log_file /home/jack/motion.log
>>>>>> 
>>>>>> I start motion just with a simple "motion" command.
>>>>>> 
>>>>>> Works very well.
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> On 7/15/19 6:51 PM, Ted Romer wrote:
>>>>>>> Hi all,
>>>>>>> 
>>>>>>> Thanks for the suggestions. Unfortunately, none have worked. I tried 
>>>>>>> editing /etc/default/motion and setting it to ?yes? (without the 
>>>>>>> quotes) and then I issued the command ?sudo systemctl enable motion? 
>>>>>>> (without the quotes) and then rebooted. Motion failed to start. This is 
>>>>>>> what I got when I typed sudo systemctl status motion
>>>>>>> 
>>>>>>> Jul 15 17:33:39 sPiCam2 systemd[1]: Starting LSB: Start Motion 
>>>>>>> detection...
>>>>>>> Jul 15 17:33:42 sPiCam2 motion[257]: Starting motion detection daemon: 
>>>>>>> motion.
>>>>>>> Jul 15 17:33:43 sPiCam2 systemd[1]: Started LSB: Start Motion detection.
>>>>>>> Jul 15 17:33:50 sPiCam2 motion[329]: [17090184:motion] [NTC] [ALL] 
>>>>>>> conf_load: Processing thread 0 - config file /etc/motion
>>>>>>> Jul 15 17:33:50 sPiCam2 motion[329]: [17090184:motion] [ALR] [ALL] 
>>>>>>> conf_cmdparse: Unknown config option "mmalcam_name"
>>>>>>> Jul 15 17:33:50 sPiCam2 motion[329]: [17090184:motion] [NTC] [ALL] 
>>>>>>> motion_startup: Motion 4.1.1 Started
>>>>>>> Jul 15 17:33:50 sPiCam2 motion[329]: [17090184:motion] [ERR] [ALL] 
>>>>>>> myfopen: Error opening file /var/log/motion/motion.log w
>>>>>>> Jul 15 17:33:50 sPiCam2 motion[329]: [17090184:motion] [EMG] [ALL] 
>>>>>>> motion_startup: Exit motion, cannot create log file /var
>>>>>>> 
>>>>>>> Every time I try to get it to run as a service I get the file 
>>>>>>> permissions error on /var/log/motion/motion.log
>>>>>>> 
>>>>>>> It runs okay when I use "sudo motion -c /.motion/motion.conf"    or   " 
>>>>>>> sudo motion -c /etc/motion/motion.conf?   (Ihave the motion.conf file 
>>>>>>> in both locations
>>>>>>> 
>>>>>>> Ted
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>>> On Jul 15, 2019, at 2:40 PM, Allan Peda <bizco...@gmail.com 
>>>>>>>> <mailto:bizco...@gmail.com>> wrote:
>>>>>>>> 
>>>>>>>> Be sure SELinux is off before you start adjusting permissions.  I am 
>>>>>>>> running motion with it enabled, but permissions are trickier when it's 
>>>>>>>> set to enforcing.
>>>>>>>> 
>>>>>>>> Here's an article explaining:
>>>>>>>> https://www.tecmint.com/disable-selinux-temporarily-permanently-in-centos-rhel-fedora/
>>>>>>>>  
>>>>>>>> <https://www.tecmint.com/disable-selinux-temporarily-permanently-in-centos-rhel-fedora/>
>>>>>>>> 
>>>>>>>> As to the service, in a modern distro, the systemd subsystem controls 
>>>>>>>> why user "owns" a given service.
>>>>>>>> https://askubuntu.com/questions/676007/how-do-i-make-my-systemd-service-run-via-specific-user-and-start-on-boot#676022
>>>>>>>>  
>>>>>>>> <https://askubuntu.com/questions/676007/how-do-i-make-my-systemd-service-run-via-specific-user-and-start-on-boot#676022>
>>>>>>>> 
>>>>>>>> You'll need to master commands chown, and chmod to get those files 
>>>>>>>> writeable without destroying security.
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On Sun, Jul 14, 2019 at 11:48 PM Ted Romer <li227...@gmail.com 
>>>>>>>> <mailto:li227...@gmail.com>> wrote:
>>>>>>>> I upgraded one of my systems and I am trying to see if I can run 
>>>>>>>> Motion without sudo. I have a Pi Zero W with Buster Lite and Motion 
>>>>>>>> 4.1.1. I have been starting Motion on my systems with sudo but I would 
>>>>>>>> like to see if I can get it to run without sudo. My user account is 
>>>>>>>> pi. If I try to run Motion as pi it fails out due to lack of 
>>>>>>>> permission to write to /var/log/motion/motion.log and also cannot 
>>>>>>>> create the pid file. If I try to get Motion to start as a service I 
>>>>>>>> get file permissions errors on /var/log/motion/motion.log. When I 
>>>>>>>> start motion with sudo, my jpg and video files are created with root 
>>>>>>>> as the owner. I am having the files saved in a directory in pi?s home 
>>>>>>>> directory.
>>>>>>>> 
>>>>>>>> I have been searching for information pertaining to how to configure 
>>>>>>>> and deal with the permissions issues but have not found a solution. Is 
>>>>>>>> there a way to do it without sudo?
>>>>>>>> 
>>>>>>>> Thanks.
>>>>>>>> 
>>>>>>>> Ted
>>>>>>>> 
>>>>>>>> _______________________________________________
>>>>>>>> Motion-user mailing list
>>>>>>>> Motion-user@lists.sourceforge.net 
>>>>>>>> <mailto:Motion-user@lists.sourceforge.net>
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/motion-user 
>>>>>>>> <https://lists.sourceforge.net/lists/listinfo/motion-user>
>>>>>>>> https://motion-project.github.io/ <https://motion-project.github.io/>
>>>>>>>> 
>>>>>>>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user 
>>>>>>>> <https://lists.sourceforge.net/lists/options/motion-user>_______________________________________________
>>>>>>>> Motion-user mailing list
>>>>>>>> Motion-user@lists.sourceforge.net 
>>>>>>>> <mailto:Motion-user@lists.sourceforge.net>
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/motion-user 
>>>>>>>> <https://lists.sourceforge.net/lists/listinfo/motion-user>
>>>>>>>> https://motion-project.github.io/ <https://motion-project.github.io/>
>>>>>>>> 
>>>>>>>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user 
>>>>>>>> <https://lists.sourceforge.net/lists/options/motion-user>
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> _______________________________________________
>>>>>>> Motion-user mailing list
>>>>>>> Motion-user@lists.sourceforge.net 
>>>>>>> <mailto:Motion-user@lists.sourceforge.net>
>>>>>>> https://lists.sourceforge.net/lists/listinfo/motion-user 
>>>>>>> <https://lists.sourceforge.net/lists/listinfo/motion-user>
>>>>>>> https://motion-project.github.io/ <https://motion-project.github.io/>
>>>>>>> 
>>>>>>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user 
>>>>>>> <https://lists.sourceforge.net/lists/options/motion-user>_______________________________________________
>>>>>> Motion-user mailing list
>>>>>> Motion-user@lists.sourceforge.net 
>>>>>> <mailto:Motion-user@lists.sourceforge.net>
>>>>>> https://lists.sourceforge.net/lists/listinfo/motion-user 
>>>>>> <https://lists.sourceforge.net/lists/listinfo/motion-user>
>>>>>> https://motion-project.github.io/ <https://motion-project.github.io/>
>>>>>> 
>>>>>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user 
>>>>>> <https://lists.sourceforge.net/lists/options/motion-user>
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> Motion-user mailing list
>>>>> Motion-user@lists.sourceforge.net 
>>>>> <mailto:Motion-user@lists.sourceforge.net>
>>>>> https://lists.sourceforge.net/lists/listinfo/motion-user 
>>>>> <https://lists.sourceforge.net/lists/listinfo/motion-user>
>>>>> https://motion-project.github.io/ <https://motion-project.github.io/>
>>>>> 
>>>>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user 
>>>>> <https://lists.sourceforge.net/lists/options/motion-user>_______________________________________________
>>>> Motion-user mailing list
>>>> Motion-user@lists.sourceforge.net 
>>>> <mailto:Motion-user@lists.sourceforge.net>
>>>> https://lists.sourceforge.net/lists/listinfo/motion-user 
>>>> <https://lists.sourceforge.net/lists/listinfo/motion-user>
>>>> https://motion-project.github.io/ <https://motion-project.github.io/>
>>>> 
>>>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user 
>>>> <https://lists.sourceforge.net/lists/options/motion-user>
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Motion-user mailing list
>>> Motion-user@lists.sourceforge.net <mailto:Motion-user@lists.sourceforge.net>
>>> https://lists.sourceforge.net/lists/listinfo/motion-user 
>>> <https://lists.sourceforge.net/lists/listinfo/motion-user>
>>> https://motion-project.github.io/ <https://motion-project.github.io/>
>>> 
>>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user 
>>> <https://lists.sourceforge.net/lists/options/motion-user>
>> 
>> 
>> _______________________________________________
>> Motion-user mailing list
>> Motion-user@lists.sourceforge.net <mailto:Motion-user@lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/motion-user 
>> <https://lists.sourceforge.net/lists/listinfo/motion-user>
>> https://motion-project.github.io/ <https://motion-project.github.io/>
>> 
>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user 
>> <https://lists.sourceforge.net/lists/options/motion-user>
> -- 
> Adam Goryachev Website Managers www.websitemanagers.com.au 
> <http://www.websitemanagers.com.au/>
> 
> -- The information in this e-mail is confidential and may be legally 
> privileged. It is intended solely for the addressee. Access to this e-mail by 
> anyone else is unauthorised. If you are not the intended recipient, any 
> disclosure, copying, distribution or any action taken or omitted to be taken 
> in reliance on it, is prohibited and may be unlawful. If you have received 
> this message in error, please notify us immediately. Please also destroy and 
> delete the message from your computer. Viruses - Any loss/damage incurred by 
> receiving this email is not the sender's responsibility.
> _______________________________________________
> Motion-user mailing list
> Motion-user@lists.sourceforge.net <mailto:Motion-user@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/motion-user 
> <https://lists.sourceforge.net/lists/listinfo/motion-user>
> https://motion-project.github.io/ <https://motion-project.github.io/>
> 
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user 
> <https://lists.sourceforge.net/lists/options/motion-user>
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------



------------------------------

Subject: Digest Footer

_______________________________________________
Motion-user mailing list
Motion-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/motion-user


------------------------------

End of Motion-user Digest, Vol 157, Issue 18
********************************************

Reply via email to