FedoraForum.org - Fedora Support Forums and Community
Results 1 to 5 of 5
  1. #1
    azredwing Guest

    Webcam detected only as root?

    Hi all,

    I own a Sony VGN-SZ110 and after a long while got the integrated webcam (VGP-VCC2) to work. However, it only works when I'm root! For instance, it works perfectly in Skype 2.0 when I run it as root (or if I call it with sudo) but says that no device exists when I try it as a regular user.

    So, how do I get this thing working as non-superuser? (camera is detected as /dev/video0)

    Thanks for all the help.

    EDIT: lsmod | grep r5u870 /*the r5u870 is the name of the driver*/ yields the following:

    Code:
    r5u870                 61508  0 
    video_buf              22469  1 r5u870
    videodev               28097  1 r5u870
    v4l2_common            18625  2 r5u870,videodev
    v4l1_compat            15941  2 r5u870,videodev
    EDIT2: I installed xawtv and used the webcam program. Here are the outputs:

    As root:
    Code:
    # webcam
    reading config file: /root/.webcamrc
    video4linux webcam v1.5 - (c) 1998-2002 Gerd Knorr
    grabber config:
      size 320x240 [16 bit YUV 4:2:2 (packed, YUYV)]
      input (null), norm (null), jpeg quality 75
      rotate=0, top=0, left=0, bottom=240, right=320
    As regular user
    Code:
    $ webcam
    reading config file: /home/cchu/.webcamrc
    v4l2: open /dev/video0: Permission denied
    v4l2: open /dev/video0: Permission denied
    v4l: open /dev/video0: Permission denied
    no grabber device available
    So obviously I need to set some permissions somewhere. But where? I saw this thread (http://fedoraforum.org/forum/showthr...ht=webcam+root) and saw that people resolved their similar problems by editing /etc/udev/rules.d/50-udev.rules :

    Code:
    KERNEL=="video*",		MODE="0660"
    becomes

    Code:
    KERNEL=="video*",		MODE="0666"
    However, I don't have this line in my 50-udev.rules. Even if you take video* as a wildcard, no line containing 'video' has a MODE argument.
    Last edited by azredwing; 10th January 2008 at 08:48 AM.

  2. #2
    azredwing Guest
    SOLVED! (?)

    After searching other forums (and looking into how other distros did it), here's what I did to resolve this problem. Hopefully you can use it.

    First, in order to not give your normal account root access, create a new group "video" or something and add yourself to it.

    Then just amend /etc/udev/rules.d/50-udev.rules:

    Code:
    KERNEL=="video*",                 MODE="0666",           GROUP="video"
    The only issue with this is that 50-udev.rules will rewrite itself after kernel updates, it seems. I will write a script sometime to run at startup to automatically check if the line exists, and if not it will add it to the file, if anyone is interested.

    If anyone knows a better way to do this, please let me know.
    Last edited by azredwing; 10th January 2008 at 07:53 PM.

  3. #3
    Join Date
    Jan 2005
    Posts
    5,057
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    refer to this page - http://ubuntuforums.org/archive/index.php/t-9466.html

    But try this

    mkdir /media/webcam

    mount /dev/video0 -t vfat -o umask=000 /media/webcam

    Are you running automount (autofs)? Seems that this should take care of the mount if you start using the webcam application?

    WARNings: Be sure to
    umount /media/webcam
    before unplugging. (Shouldn't have to do this will automount or the application closing and umount?

    /mnt may also work but /media made more sense to me.

    SJ
    Do the Math

  4. #4
    azredwing Guest
    Code:
    # mount /dev/video0 -t vfat -o umask=000 /media/webcam
    mount: /dev/video0 is not a block device

  5. #5
    Join Date
    Sep 2007
    Location
    Cambodia
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As of Fedora 10, there is NO 50-udev.rules anymore; do this instead:

    http://forums.fedoraforum.org/showpo...63&postcount=2

    Cheers.
    Hamlet - O, from this time forth, my thoughts be bloody, or be nothing worth !
    Shakespeare "Halmet" Act IV, Scene 4
    Registered Linux user number 418565

Similar Threads

  1. webcam not detected on fedora 8
    By mrgrieves in forum Hardware
    Replies: 4
    Last Post: 18th August 2008, 11:36 PM
  2. Integrated WebCam still not detected.
    By rgaelzer in forum Hardware
    Replies: 4
    Last Post: 13th February 2008, 12:09 AM
  3. Webcam not detected
    By kendew in forum Hardware
    Replies: 20
    Last Post: 14th December 2007, 02:26 PM
  4. eyetoy as webcam fc3, detected but doesn't work!
    By tazthecat in forum Hardware
    Replies: 3
    Last Post: 18th August 2005, 10:33 AM
  5. WEBCAM Not Detected
    By karthikravi in forum Hardware
    Replies: 5
    Last Post: 11th September 2004, 07:03 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •