Viewing a V4L2 webcam with mplayer

The great mplayer can be used to view movies, play dvd's, and even to watch the webcam. For my Logitech QuickCam Pro 4000, I use the following command:
mplayer -cache 128 -tv driver=v4l2:width=640:height=480:outfmt=i420 -vc rawi420 -vo xv tv://

If you have multiple v4l2 devices, you can choose which device you want to use by adding 'device=/dev/videoX' to the options:
mplayer -cache 128 -tv driver=v4l:width=640:height=480:outfmt=i420:device=/dev/video1 -vc rawi420 -vo xv tv://

© GeekLabInfo Viewing a V4L2 webcam with mplayer is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 2.50 out of 5)
Loading...

Review: Belkin KVM Omniview 5216K – part 2

After my Belkin 5126K broke down, I tried to get Belkin to fix it. I'm not very pleased with the results so far.

Try #1

Last tuesday, I filled in a RMA form to get my Belkin Omniview 5216K repaired or replaced. It doesn't boot at all, but instead of fixing the device, I got a mail with instructions to reset the device to factory defaults. Belkin probably gets a shitload of dumb customers that can be helped in a minute. But apparently that makes the support team try a lot of standard routines without even reading what the complaint is.

Anyways, I tried to see if the instructions were any good:

52xxK Series 
In order to restore your KVM switch to factory defaults without using the web interface, follow the steps below:
Step 1 Take a USB flash drive (any type will do) and create a new text file in its root.
Step 2 Rename the file to 'default'. This file shouldn’t have any content or extension; it should just be an empty file with the size of zero.
Step 3 Connect the KVM switch to the monitor and connect the USB flash drive to one of the USB ports on the KVM switch.
Step 4 Restart KVM switch. The switch will boot, find the file, restore the factory settings, delete the file, and restart again. All these operations will be performed automatically.
Step 5 Wait for the On-Screen Display (OSD) menu to appear. When it does, the switch has been restored to its factory settings.

Of course that didn't fix anything, because to restore the settings to factory default, the device should at least load the bootloader. So I mailed them the results.

Try #2

This time, I got a mail to update the firmware. Didn't I just tell them that the device doesn't boot? I mailed them back. Again.

Try #3

After not hearing from Belkin, I decided to give them a call. No luck either. The guy I spoke to could do nothing more than write down my complaint for someone else to fix. After the weekend of course. Let's wait and see.

For now the device that cost me about €1590 hasn't been able to save me any trips to the datacenter, but cost me two instead.

© GeekLabInfo Review: Belkin KVM Omniview 5216K - part 2 is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

SELinux: Running samba unconfined

I don't want to disable SELinux, but i'm using samba to access about every file on the system. To run samba unconfined, change its context:
chcon -t unconfined_exec_t /usr/sbin/smbd
service smb restart

This works for other software as well.

Update: Another solution may be to run software in permissive mode. I just changed the mode of one postfix sub-program to permissive mode: semanage permissive -a postfix_pipe_t

© GeekLabInfo SELinux: Running samba unconfined is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

Minimize Google Talk at startup

Google Talk has a function to automatically start on boot. However, it cannot minimalize automatically. To run Google Talk minimized by default, you'll need to use some external software.

CMDOW

I'm using a tool named cmdow to do the hiding for me. Cmdow is an extremely useful tool for showing, hiding, minimizing, resizing and closing windows. Unfortunately, some malware uses this functionality as well. Therefore, your virusscanner may tag cmdow as malware, but it actually isn't.

Scripting

Google Talk starts 'on boot'. Just a few seconds later we need to run the cmdow command. To do this, we create a .bat file in the Startup folder.

@echo off
rem The next line hides the batch file execution
cmdow @ /hid
rem The next line delays the batch exec for 4 seconds.
ping localhost
cmdow "Google Talk" /HID

© GeekLabInfo Minimize Google Talk at startup is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Fedora 15: Nagios errors

Installation of Nagios on Fedora 15 is easy as yum install nagios nagios-plugins* php nrpe. I only found one problem: Error: Could not read object configuration data!

The webserver runs as user apache, which cannot access /etc/nagios/objects by default. Chmod or chown the directory to fix it, or add user apache to the group nagios.

You may also want to check the selinux settings, which can be restored by typing restorecon /etc/nagios

© GeekLabInfo Fedora 15: Nagios errors is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info

1 Star2 Stars3 Stars4 Stars5 Stars (7 votes, average: 5.00 out of 5)
Loading...

OpenVPN: script failed: could not execute external program

I've been using the great VPN software OpenVPN for a long time now. I just love it. Today, I copied the configuration of my old router to my brand new Fedora 15 box, and suddenly it can't start anymore.

In the logs I found this message:
script failed: could not execute external program

What does that mean?
Is the 'up' script not found? It it in the wrong directory? I could not just find it. Until I hooked up my favourite debugger tool: strace. And look what I found there:
[pid 8273] execve("./up", ["./up", "vpn", "1500", "1576", "", "", "init"], [/* 14 vars */]) = -1 ENOEXEC (Exec format error)

Solution

What is the case? In older OpenVPN versions, scripts where run by system(3), which uses the shell to run scripts. Newer versions are more secure, and use execl/execve or something like that. That means that shell scripts must explicitly tell the sytem that they're to be run by the shell.

So, add the following line to the top of the script:
#!/bin/bash
And you're done.

© GeekLabInfo OpenVPN: script failed: could not execute external program is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info

1 Star2 Stars3 Stars4 Stars5 Stars (9 votes, average: 4.11 out of 5)
Loading...

Updating the Dell PERC H200 firmware

My brand new Dell R300 servers contain a PERC H200 SAS/SATA controller that has pretty bad firmware. Luckily, Dell released better firmware, but you'll need to update it yourself.

  • Install and boot RedHat 5.6 or CentOS 5.6
  • Download the file RAID_FRMW_LX_R294620.BIN from the Dell support site
  • run yum install compat-libstdc++-33 to install libstdc++ compatibility functions required for the RAID_FRMW_LX_R294620.BIN file.
  • also run yum install libxml2 to install required xml libs
  • make RAID_FRMW_LX_R294620.BIN executable chmod +x RAID*
  • and run it: ./RAID_FRMW_LX_R294620.BIN

Ubuntu/Debian

I'm running RedHat-based software on all of my machines. Above information may be useful for Ubuntu/Debian users, but it's not tested and I'm not supporting it.

Servers: RedHat Enterprise Linux/CentOS is more suitable for servers, as there's a lot of professional level support available. I think that's important, because if I say, get a car accident, I want the servers to be managable by another professional.

Desktops/Laptops: RPM packages are pretty exchangable between RedHat-based platforms. That's a good reason to run Fedora on the desktop.
© GeekLabInfo Updating the Dell PERC H200 firmware is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...