System Setting/Account details in Cinnamon

In account details, I believe I could in the past take a photo with a webcam and save that photo to my account details as administrator or operator. Now this option no longer functions. I can take a photo with either ‘Cheese’ or ‘Kamoso’ and save that to my adminstrator account in account details. I don’t know why this dropped or no longer functions. . . .any thoughts or idea’s on this?

Rich;)

I believed it once worked in the distant past and now it’s been dropped altogether.


You can’t take a photo with your webcam (cheese or kamoso) and place it into your administrative profile. Maybe this is a bit clearer to understand. . . . .You can drop and drag a photo that is stored in your pictures folder via webcam folder but you can’t take your picture from this app where it says ‘take a photo’. . . .

Rich :slight_smile:

let me check…

Traceback (most recent call last):
  File "/usr/share/cinnamon/cinnamon-settings/modules/cs_user.py", line 141, in _on_face_photo_menuitem_activated
    if 0 != subprocess.call(["streamer", "-j90", "-t8", "-s800x600", "-o", "/tmp/temp-account-pic00.jpeg"]):
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 389, in call
    with Popen(*popenargs, **kwargs) as p:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 1024, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.11/subprocess.py", line 1917, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'streamer'

seems that the tool streamer does not exist… no clue where it should come from…

I can hack the used script to use something else and it does work after installing fswebcam (yay -S fswebcam)
/usr/share/cinnamon/cinnamon-settings/modules/cs_user.py

        # streamer takes -t photos, uses /dev/video0
        if 0 != subprocess.call(["fswebcam", "--skip", "8", "--jpeg", "95", "--resolution=800x600", "--save", "/tmp/temp-account-pic00.jpeg"]):
            print("Error: Webcam not available")
            return

        # Use the 8th frame (the webcam takes a few frames to "lighten up")
        path = "/tmp/temp-account-pic00.jpeg"

        # Crop the image to thumbnail size
        image = Image.open(path)
        width, height = image.size

        if width > height:
            new_width = height
            new_height = height
        elif height > width:
            new_width = width
            new_height = width
        else:
            new_width = width
            new_height = height

        left = (width - new_width) / 2
        top = (height - new_height) / 2
        right = (width + new_width) / 2
        bottom = (height + new_height) / 2

        image = image.crop((left, top, right, bottom))


        face_path = os.path.join(self.accountService.get_home_dir(), ".face")

        image.save(face_path, "png")
        self.accountService.set_icon_file(face_path)
        self.face_button.set_picture_from_file(face_path)

it has originally this:

        # streamer takes -t photos, uses /dev/video0
        if 0 != subprocess.call(["streamer", "-j90", "-t8", "-s800x600", "-o", "/tmp/temp-account-pic00.jpeg"]):
            print("Error: Webcam not available")
            return

        # Use the 8th frame (the webcam takes a few frames to "lighten up")
        path = "/tmp/temp-account-pic07.jpeg"

So we could go find out what is stream or what is providing it…

Good detective work. . . . you must be good with python. . . . I’ve got books on python, perl, java but some of them use the worse learning examples and require you to read chapters with the authors examples rather that giving a person quick easy guide to accomplish what you want and need quickly without too much exterraneous stuff to get there. I keep telling myself someday I’ll buckle down and learn a lot of this stuff but I’m getting too old and my attention span isn’t like it use to be.

Rich :wink:

i had some fun with it indeed
but i was really wondering why it uses an application you can not find everywhere… could be i go installing mint to catch it…

looks like it’s part of this xawtv package: https://www.mankier.com/package/xawtv

wau good catch!
https://aur.archlinux.org/packages/xawtv
in AUR only and… still updated… xawtv-3.107.tar.bz2 2020-05-15…

someone could try installing it… me not now… may the next days…

Sure, I did. If you install xawtv from AUR and apply this patch, then it works.

still…the ANTIALIAS thingy … screwed… but yea arch is to fast.

Thank you for this! Installing this package solved this issue on Arch.