Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I was interested in setting up a home security network. I installed Motion in Ubuntu 12.04 and it worked fine. Then the next day I went to play around with it some more but the images are not being saved to /tmp/motion as the configuration file states, but to the home directory:

[1] File of type 1 saved to: ./01-20121126211634-12.jpg

Any idea if there is another setting that has more priority than the motion config file?

share|improve this question
    
So I installed motion on a fresh computer and it saves the image files to the home folder by default. –  Kevin Nov 27 '12 at 6:48
    
I think I might have found the original problem. When updating the config file, it is necessary to modify /etc/default/motion so that the daemon will run. Otherwise, it will not refresh. –  Kevin Nov 27 '12 at 7:02

1 Answer 1

up vote 0 down vote accepted

By default Motion use home directory with path /home/motion ...
So, to change this open your terminal and run it:

for Gedit:

gksudo gedit /etc/motion/motion.conf

for vim:

sudo vim /etc/motion/motion.conf

Find string started with: target_dir

Change value to your own some like a:

target_dir /tmp/motion

For using Motion through web interface you need to find or add this string in your config:

control_authentication USERNAME:PASSWORD

Then save the file, and add this USERNAME to the group motion:

adduser USERNAME motion

After this you can use Motion (if daemon is started) from web interface:

http://localhost:8080

From Precise Motion package manpages:

-c
Full path and filename of config file.
E.g. /home/kurt/motion.conf
Default is /usr/local/etc unless specified differently when building Motion.
Many RPMs and debian packages will most likely use /etc or /etc/motion as default.

Also I suggest you to refer with Motion Guides:

So if you can start your Motion with -c option but without pathname (check your simlink option):

motion -c      
// then Motion will use motion.conf  

OR if you start Motion with point to your PATHNAME value:

motion -c <YOUR/PATHNAME>
// then Motion will use your custom config which will OVERRIDE the defaults.
share|improve this answer
    
In the configuration file at /etc/motion/motion.conf the default settings are already set to target_dir /tmp/motion. When I changed the settings in /etc/default/motion to allow the daemon to run then it started to save the files in /tmp/motion. –  Kevin Nov 28 '12 at 17:59
    
updated ... enjoy your Motion :) –  swift Nov 29 '12 at 8:21
    
You should add that the daemon must be allowed to run from the config file at /etc/default/motion, otherwise it will save to the local home directory. –  Kevin Dec 1 '12 at 0:20
    
also look this dated Jun,2010: Debian / Ubuntu problems ... and default for Motion daemon mode is OFF. Check option daemon in motion.conf. Daemon mode most often is in use on the server, with more strong and reliable configuration. –  swift Dec 1 '12 at 1:07
    
Config Option target_dir ... if filename option already contain relative syntax like a "./..." then perhaps it can override your preference in target_dir option. Also a ton of other options can affect this behavior. From big Motion doc: Some configuration options are only used if Motion is built on a system that has the matching software libraries installed (MySQL, PostgreSQL and FFMPEG). –  swift Dec 1 '12 at 1:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.