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: Using Motion to wake Screensaver (manu.kemppai...@yahoo.com) 2. Re: Using Motion to wake Screensaver (Mike Mironov) 3. Re: motion_user / group (Henk Demper) ---------------------------------------------------------------------- Message: 1 Date: Tue, 02 Feb 2021 20:05:19 +0200 From: manu.kemppai...@yahoo.com To: Motion discussion list <motion-user@lists.sourceforge.net> Subject: Re: [Motion-user] Using Motion to wake Screensaver Message-ID: <532ed97e-b595-4da6-86ab-d2a3b976f...@email.android.com> Content-Type: text/plain; charset="us-ascii" An HTML attachment was scrubbed... ------------------------------ Message: 2 Date: Tue, 2 Feb 2021 21:45:25 +0300 From: Mike Mironov <m...@darkmike.ru> To: motion-user@lists.sourceforge.net Subject: Re: [Motion-user] Using Motion to wake Screensaver Message-ID: <34c1530b-9b66-1fd3-f655-9e9943001...@darkmike.ru> Content-Type: text/plain; charset="utf-8"; Format="flowed" I? think your problem is X server security - xauth. When your run command from pi user your use credentials from /home/pi/.Xauthority file. In this file exist cookie for connect to Xserver. When your run script from motion user your don't have this cookie. Simplest solution: run command "xhost +" from pi user. It's disable X security 02.02.2021 19:26, Kc Hundere wrote: > > 'm working on using a pi/official 7" touch screen with > chromium-browser in kiosk mode to run screens to control my Home > Automation system. I am trying to configure the pi camera with motion > to wake the screen saver instead of touching the screen but am having > no luck making it happen. > > From the command line via ssh , I can issue the command /DISPLAY=:0.0 > xset dpms force on/?to wake the screensaver, but it does not work > issuing the command from either the on_event_start?trigger or the or > the on_motion_detected?trigger. I have tried the command directly from > motion.conf as well as including it in a bash script. Both methods > work from the command line, but not from motion. > > It is not a permissions issue. I have a directory with the the > ownership motion:motion?that house the scripts, and if I change the > value of the trigger to />/motion/trigger/?it will dutifully create an > empty file in that directory. > > Can anyone shed any new light to this issue? > > > -- > > > _______________________________________________ > Motion-user mailing list > Motion-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/motion-user > https://motion-project.github.io/ > > Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ Message: 3 Date: Tue, 2 Feb 2021 21:12:24 +0100 From: Henk Demper <henk_dem...@hotmail.com> To: Motion discussion list <motion-user@lists.sourceforge.net> Subject: Re: [Motion-user] motion_user / group Message-ID: <as8pr10mb4373c2d1fcb11c542940723693...@as8pr10mb4373.eurprd10.prod.outlook.com> Content-Type: text/plain; charset="us-ascii" Hello Rainer, Not sure if this covers your problem (understood issues about permissions, deleting clips etc): - Motion creates directories and files, both are created with owner=motion and group=motion - Files are currently created by the motion application with 'default' access rights -rw-rw-rw- (666) and then 'outside' motion umask (Google for umask) is applied (default 022), by default resulting in -rw-r--r-- (644) (group+user can't delete) - Directories are created by the motion application with application-fixed access rights drwxr-xr-x (755) and then umask is applied (default 022), by default keeping drwxr-xr-x (755) (group+user can't delete) - As typically motion runs as a daemon, you can change the umask setting for motion in this case (thanks to Damian in earlier mail) like: "Triggered by your reply to change umask for the daemon only (not per user or all non-privileged logins) I stumbled over https://serverfault.com/questions/166176/ways-to-set-umask-on-ubuntu-for-daemon-processes <https://serverfault.com/questions/166176/ways-to-set-umask-on-ubuntu-for-daemon-processes> in which the last reply ads the --umask option to /etc/init.d/motion as follows: if start-stop-daemon --start --oknodo --exec $DAEMON -b --chuid motion --umask 002 ; then in the start) case. After making this change and restarting motion, starting with an empty directory (no Log.txt, sub-directories or video files), this does solve the issue for files: they are now created with 664 instead of 644 permission." - But any created directory still has the 755 instead irrespective of umask 002, because we 'begin' with 755. I made a feature request to change the directory access permissions to 777 in https://github.com/Motion-Project/motion/issues/1297 <https://github.com/Motion-Project/motion/issues/1297> - You can simply add yourself (the user viewing the recording files) to the motion group with (example user linaro on Asus Tinkerboard) sudo usermod -a -G motion linaro Result of all above: directories are (currently) first-time created like: drwxr-xr-x 2 motion motion 45056 Feb 1 01:06 LivingRoom but you can 1-time change their group permission after creation (and don't delete them) with sudo chmod g+w * Resulting in drwxrwxr-x 2 motion motion 45056 Feb 1 01:06 LivingRoom Then all files (.jpg, .mkv, .mpg, ...) inside these directories after the umask change in /etc/init.d/motion look like: -rw-rw-r-- 1 motion motion 214220 Jan 29 22:43 Still_LivingRoom_Event-28_29-01-2021_22-42-55-00.jpg Assuming you added yourself to the motion group, then you can now delete/move any files without any sudo permission. I have used this setup to run a cron non-superuser script, that regularly backs up, then deletes files from a Micro-SD card on an Asus Tinkerboard SBC (12 hour storage) to my NAS (few weeks storage). Henk Demper > On 29 Jan 2021, at 14:25, Rainer <feyerpictu...@gmail.com> wrote: > > Hi all, > > hoping this is the right area to ask general questions about motion, which I > believe is an awesome surveillance program, once it is understood. > > I have read online that motion 4.3.1 plus gives the ability to change users > with motion_user and change groups with motion_group. > > However, I can not find these in documentation. > > I am new to motion and Linux itself. I have installed motion 4.2.2 from the > repository and, after a couple of weeks of trial and error, have made it work > quite nicely. > > The only problem still is the user: with motion being a user, and it > assigning itself privileges, I am having a difficult time with it using a > second internal HDD, as well as other aspects (such as deleting triggered > clips). > > I would be willing to uninstall 4.2.2 and go through a new installation if I > knew user / group could be changed/ assigned. > > > Also, is there a user group anywhere? This is a GREAT program which should > have an area of discussion to make it easier to install and set up for > beginner beginners like me. I am sure I could have done it within a couple of > hours, rather than weeks, if I knew a couple of the basics right away. > > TY in advance, > Rainer > > > > _______________________________________________ > Motion-user mailing list > Motion-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/motion-user > https://motion-project.github.io/ > > Unsubscribe: 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 176, Issue 8 *******************************************