X11 over SSH

CentOS 5's and Fedora 15's base installations are pretty good prepared to use X11 over SSH. You just need to install one more package on the server you're connecting to: xorg-x11-xauth. According to yum info, the purpose of this package is:
xauth is used to edit and display the authorization information used in connecting to an X server.
This editting probably means synchronising X11 authority cookies between SSH peers.

Installing is done using:
yum install xorg-x11-xauth

Then ssh into the box using:
ssh -X [servername]

© GeekLabInfo X11 over SSH 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...

Funny: Change the HP Laserjet ‘ready’ message

To change the 'ready' message of a HP Laserjet, you can use the following script.

#!/usr/bin/perl
use strict;
use warnings;
 
unless (@ARGV) { print "usage: $0 <ip address> \"<message>\"\n" ; exit }
 
my $ip = $ARGV[0];
shift(@ARGV);
chomp $ip;
 
use IO::Socket;
my $socket = IO::Socket::INET->new(
	PeerAddr  => $ip, PeerPort  => "9100",
	Proto     => "tcp", Type      => SOCK_STREAM
	) or die "Could not create socket: $!";
 
print $socket "\e%-12345X\@PJL JOB\n\@PJL RDYMSG DISPLAY=\"@ARGV\"\n\@PJL EOJ\n\e%-12345X\n";

I've used this at the office, with a lot of hilarious reactions from my colleagues. Messages like:

  • Please insert kitten in tray 1
  • Please insert [name of colleague] in tray 1
  • Virus detected
© GeekLabInfo Funny: Change the HP Laserjet 'ready' message 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...

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...