ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a problem about using webcam from terminal. I hope, you can help me. My notebook is MSI GE60 2PC Apache, and my OS is Debian 8 Jessie.
When I press FN+F6, my webcam turns on and I can use webcam with cheese application. If I press FN+F6 again, webcam turns off and I can't use webcam, there is a message "No device found". I want to control webcam with python code or bash code, I don't want to press FN+F6. How can I do? Syslog has "udev", "evdev", "mtp-probe" .., I guess I will use these but which? Or I can use keypress function in python but how?
That's my syslog output, when I press FN+F6:
Code:
Apr 16 01:24:28 debian kernel: [34628.327642] usb 1-1.4: new high-speed USB device number 8 using ehci-pci
Apr 16 01:24:28 debian kernel: [34628.462468] usb 1-1.4: New USB device found, idVendor=5986, idProduct=0248
Apr 16 01:24:28 debian kernel: [34628.462471] usb 1-1.4: New USB device strings: Mfr=6, Product=2, SerialNumber=0
Apr 16 01:24:28 debian kernel: [34628.462472] usb 1-1.4: Product: BisonCam, NB Pro
Apr 16 01:24:28 debian kernel: [34628.464910] uvcvideo: Found UVC 1.00 device BisonCam, NB Pro (5986:0248)
Apr 16 01:24:28 debian mtp-probe: checking bus 1, device 8: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4"
Apr 16 01:24:28 debian mtp-probe: bus: 1, device: 8 was not an MTP device
Apr 16 01:24:28 debian kernel: [34628.468993] input: BisonCam, NB Pro as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/input/input24
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (II) config/udev: Adding input device BisonCam, NB Pro (/dev/input/event17)
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (**) BisonCam, NB Pro: Applying InputClpass "evdev keyboard catchall"
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (II) Using input driver 'evdev' for 'BisonCam, NB Pro'
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (**) BisonCam, NB Pro: always reports core events
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (**) evdev: BisonCam, NB Pro: Device: "/dev/input/event17"
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (--) evdev: BisonCam, NB Pro: Vendor 0x5986 Product 0x248
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (--) evdev: BisonCam, NB Pro: Found keys
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (II) evdev: BisonCam, NB Pro: Configuring as keyboard
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/input/input24/event17"
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (II) XINPUT: Adding extended input device "BisonCam, NB Pro" (type: KEYBOARD, id 15)
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (**) Option "xkb_rules" "evdev"
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (**) Option "xkb_model" "pc105"
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: (**) Option "xkb_layout" "tr"
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: The XKEYBOARD keymap compiler (xkbcomp) reports:
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: > Warning: Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: > Ignoring extra symbols
Apr 16 01:24:28 debian gdm-Xorg-:0[1092]: Errors from xkbcomp are not fatal to the X server
I can't compile this code. Because of '#include "../libc/libc-tui.c"' line. If I remove this line, there is a message "collect2: error: ld returned 1 exit status".
you could try to emulate the keypresses with xdotool.
that is surely possible.
with a little additional research, i'm sure there's ways to address the camera (driver) programmatically.
you could try to emulate the keypresses with xdotool.
that is surely possible.
with a little additional research, i'm sure there's ways to address the camera (driver) programmatically.
When I run
Code:
xdotool key XF86AudioPause
, there is a notifaction
But, when I run
Code:
xdotool key XF86WebCam
, there isn't a notifaction and WebCam isn't working.
Can I call
Code:
state 0x10, keycode 220 (keysym 0x1008ff8f, XF86WebCam)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.