LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Home folder loads slowly due to images autosaved there by Motion webcam security (https://www.linuxquestions.org/questions/linux-newbie-8/home-folder-loads-slowly-due-to-images-autosaved-there-by-motion-webcam-security-4175563510/)

hcl1 01-09-2016 03:03 PM

Home folder loads slowly due to images autosaved there by Motion webcam security
 
I am really liking Ubuntu but have one problem. Ages ago I installed Motion, a program that automatically takes pictures with the webcam when it senses motion. (My landlord tends to come into my flat when I'm away & I need evidence for arbitration.)

Motion used to do this cool thing where it saved all the images into a separate folder, and made a little extra file for each image series that gave me the option of playing those images as a video in vlc player. But that stopped some time ago. (I must have been running it by copy-pasting some great command into the terminal which I've forgotten, or something.)

Now all the images save to the home folder. I can open any other folder and the computer is fast and efficient, but I can no longer open the home folder. It tries to take forever to load and either spins its wheels or crashes.

1. Is there some way I can back up the home folder to a flash drive or anything so I can access those images for an upcoming arbitration? (Drag and drop doesn't work.)

2. Short of reinstalling the whole system, how can I delete the home folder and start fresh?

3. Bonus question: Also, could anyone consider how I could do a workaround on getting Motion to save images to somewhere else as it was before (by default, not as a command I would need to remember every time)? I need to keep using it.

There is a user guide and a tutorial, but I'm not up to the (pretty basic, I admit) standard you need to operate it. For instance:
"all you have to do is configure it. Press Ctrl+C to stop it. Then create a .motion directory in your home directory, copy the default configuration file into it...", and my reaction: "So, I make an empty folder named .motion in the home folder? Could I put it somewhere else instead? Where would I find the default configuration file in order to make a copy?" And so on.

http://www.lavrsen.dk/foswiki/bin/vi...on/MotionGuide
http://www.linux.com/learn/tutorials...ms-with-motion

Thank you!

hcl1 01-09-2016 04:56 PM

Why can't I see the text I wrote to clarify the title? I wrote a chunk of text describing the problem, and I can see a popup with the first bit of it when I hover over the title in the list in the Newbie forum. But when I click on the title, there's a blue bar with dropdown menus at right of "Thread Tools", "Search this thread", and "Rate thread", and below that a stupid, stupid graphic advertisement. I know from clicking on others' threads that above the stupid, stupid advertisement there should be a blue box with the text that I wrote.

Now I have to type it all out again. Linux is cool until it stops working, and if you don't know how to fix it, it's soooooo time consuming and demoralising. This is a new low: even technical issues with posting on support groups makes me feel dumb.

hcl1 01-09-2016 05:03 PM

OK, my earlier text is in the system obviously, but isn't showing up, so here goes more of my day into a frustrating activity.

I installed a motion activated webcam called Motion some time ago.

It used to save into a nice temporary folder and had some other cool features I liked. Then the coolness stopped. It only saves jpegs, not jpegs with a cool little adjunct file that let me see a series of jpegs as a video in VLC player. Boo. More importantly, it began default saving into the Home folder.

Still useful, even if not actually cool. The problem? The Home folder won't load anymore. Any folder except the Home folder loads promptly and rapidly. The Home folder just spins its wheels forever or crashes.

I need to 1) access those images for an arbitration ASAP, and 2) get the thing working again so I can actually open and display the Home folder. Or smash the computer if that will take more than two more hours.

1) Anyone know how to copy what is on the home folder onto a flash drive besides drag-and-drop, which it doesn't know how to do? Command in terminal? Anything?

2) Do I need to wipe and reinstall the OS that computer? Or is there another way to get the home folder going?

I can open any window besides the home folder, but I cannot open any folder which displays the home folder inside it, so I can't drag and drop or delete it.

I have no technical knowledge. I can follow instructions, but can't generate a single line in the terminal that the computer would understand.

Thanks.


This is happening on a computer with Ubuntu and also on one with Kubuntu.

BioticRock 01-09-2016 05:25 PM

The reason you can't access the home folder is because the Motion camera is constantly writing to it. Think of it as trying to read the beginning of a book, while continuously writing to it at the same time.

Best way to solve it is to change the location where it saves its files by default first, maybe an external hard drive or a separate folder which you barely want to access.

to move the files already in the home folder, open a terminal (with any version of Ubuntu its Ctrl+Alt+T) and do this:

cp /home/{file1,file2,file3,file4} /home/usr/destination/

the cp stands for copy. The file1, file2, etc. would be the name of your Motion files. The second segment (/home/usr/destination/) is separated from the first segment (cp /home/{file1,file2,file3,file4}) with a space, and its just where your sending the files. The whole command is one line.

Hope I was able to help with what I could.

hcl1 01-09-2016 06:04 PM

Thank you! Is there any way of doing the file transfer such that "file1,file2,file3,file4" is replaced with an identifier for "all files"? I don't know the names of the files that Motion saves (it automatically names them based on timestamp).

(Unfortunately, even quitting Motion doesn't allow me to load the Home folder.)

yancek 01-09-2016 06:33 PM

If you have all the motion files in /home/user/motion directory and want to copy to /mnt/motion: cp /home/user/motion/* /mnt/motion/

Change the directory names above to whatever you are using. You could also use the mv command rather than cp.

astrogeek 01-09-2016 06:37 PM

When you say "load the home folder", what exactly do you mean?

If you mean opening a listing of the home directory in some sort of file manager, then it may be that it is being written, or it may be that it just has a bzillion files in it and it is taking a long time to get the file data and render it.

To answer your last question, how to copy or move all files... since you seem to know they are jpeg files, try something like this:

Code:

To copy...

cp /path/to/home/*.jpeg /path/to/destnation/

OR to move...

mv /path/to/home/*.jpeg /path/to/destnation/

If you do indeed have a very large number of files you need to make sure that the destination has enough room or it might ultimately fail part way through.

To see how many fles there are try this...

Code:

ls -1 /path/to/home/*.jpeg |wc -l

1 = the number one
l = the letter ell

See what that tells us.


All times are GMT -5. The time now is 03:02 AM.