su ulimit configuration issue on SLES servers

At our company we use SLES as the favored Linux distribution. 

Sudo and su are used to make things on the servers work
a little bit more secure.

We had problems on some dated versions of SuSe with running
the su command in combination with ulimit settings.

Limits were set in the file /etc/security/limits.conf for a particular
user but after a su switch to that user the limits set weren’t
honored.

Problem was that the pam_limit module wasn’t loaded in the /etc/pam.d/su
configuration file. Just added the rule

session required        pam_limits.so

to the file after that limits were handled correctly when using the su command.

In later versions of SLES the whole PAM configuration is set-up
a little bit different. There are common config files which are
included by the different sub parts.

/etc/pam.d/su
session include common-session

/etc/pam.d/common-session
session required pam_limits.so

MythTV edits

I run MythTV 0.23 on my openSuSe 11.2 server. I use this box to serve my
website lotusconnections.org but also as my home-cinema set to watch movies.

Because everything is not pre-configured it takes a lot of time to smooth the
whole system to your needs. From time to time you come up with additions
that make it all work even better.

I use fluxbox as the window manager which always has a toolbar in the bottom
center of the screen, you can enable auto-hide for this thing. But you will
always see of few pixels. And this can be anyoning if your are wathing a movie
with MythMovie and your are still looking a little blue bare a the bottom of the screen.
( MPlayer doesn’t have this problem is just overtakes the whole screen, but you
  want MythMovie to wath DVD’s because it support DVD menus. )

To get rid of this toolbar I decided to compile it again with the parameters –disable-toolbar
and –disable-slit since I couldn’t find out how else I had to disable the bottom screen toolbar.

I was somewhat confused what was the slit and what the toolbar so I took the hard way
and compiled fluxbox agein with these two options.

Later on I found out that there seems to be an option you can use to disable the
toolbar with a option in the init file. ( Didn’t try this one out )

session.screen0.toolbar.visible:        false

Configured a image flubox with fbsetbg ( just a wrapper ) it uses feh as the program

install@hertogjan:~> /opt/fluxbox/bin/fbsetbg -i

feh is a nice wallpapersetter. You won’t have any problems.

Also configured an custom background for GDM. GDM stands for GNOME Display manager,
it’s a graphical login program. In previous releases of GDM there were GUI’s for configuring
custom things like your own background image, but since they started rewritten code
some of the functionality has been dropped. ( don’t pin me down on this, but it’s what I have
read here and there on the internet ).

To get my own background image working I had to install this RPM package

gconf2-branding-openSUSE-2.28-4.4.noarch.

After this RPM install, you can edit the background tag in this XML file

/etc/gconf/gconf.xml.vendor/%gconf-tree.xml

I configured this one as my GDM background

Further more I wanted to get rid of the mouse cursor when MythTV was loading
once X was started up. In Xorg you can’t disable the mouse cursor it will be always there.

I found some hack so that you can configure a mouse cursor which is so small you won’t
be able to see it.

This shows how it can be done, create a file with the following content.

#define nn1_width 16
#define nn1_height 16
static unsigned char nn1_bits[] {
0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00,
0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00,
0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00, 0×00};

In the /home/mythtv/.fluxbox/init file of the user which is running MythTV
configure the rootCommand as follows.

session.screen0.rootCommand:   xsetroot -cursor /home/mythtv/emptycursor /home/mythtv/emptycursor

I still don’t get why I can’t put this option in the startup file just as the other
commands but I found this is the only combination that gets it working.

Further check my startup file of the mythtv user below with some more adjustments I made.

/home/mythtv/.fluxbox/startup

xset -b                           # disable the bell
xset -dpms s off              # disable the -dpms option disables DPMS (Energy Star) features and the screensaver.
xsetroot -solid black        #Background of the root window to black
xsetroot -bg black           #Background color to black
xvattr -a XV_COLORKEY -v 66048        # NVIDIA fix blue bars
#xsetroot -cursor /home/mythtv/emptycursor /home/mythtv/emptycursor
/opt/fluxbox/bin/fbsetbg -c /home/mythtv/mythtvbackground.png   #set a custom wallpaper

Lotus Notes 8.5 Ubuntu 10.04 external link issue

Getting to run Lotus Notes 8.5 on your Ubuntu install isn’t that
easy as you would like it to be. There are a lot of guides which
describe extra steps you have to take to get it running smoothly
depending on the release you are using.

After I upgraded my Ubuntu to version 10.04 I again had the problem
that opening attachments and URL links with FireFox
weren’t working.  With earliers releases of Ubuntu I found the guide
printed below to be helpful but for this release it was a no go.

http://ubuntuforums.org/showthread.php?p=4268844

“Issue #9: Open, Edit, or View attachment dialog disappears
“When a customer clicks an attachment within the Lotus
Notes® client for Linux®, the Open Attachment dialog box
provides the customer with options to Open, Edit, or View the
attachment.  When any of these three options are opened
the dialog box disappears and no action is taken.
Generally, this problem is seen with attachments that are
not of a common file type in Linux. However, this problem
can also occur for common Linux file types such as odt
and pdf.” -Harmony Pirate Blog

Do the following:
Code:

     sudo mv /opt/ibm/lotus/notes/openwith /opt/ibm/lotus/notes/openwith.old
    sudo ln -s $(which gnome-open) /opt/ibm/lotus/notes/openwith

Because the tip above wasn’t working anymore I gave up the struggle
I couldn’t find any helpful links on Google as well. Which didn’t make it
less annoying, copy paste URL between Notes and Firefox, because I
really prefer to work with Firefox instead of the internal browser of Notes.

This weekend I decided to give the search to the fix one more try. I saw
that Fixpack 3 of Lotus Notes 8.5 was released so I installed this one.
All with the hope that it maybe would resolve my issue.

No luck, after the update the issue was still there. But because I started
my Notes client in a terminal screen I saw all the startup code scrolling
by including a few errors.

(:10049): Gtk-WARNING **: GModule (/usr/lib/gtk-2.0/2.10.0/engines/libclearlooks.so) initialization check failed: Gtk+ version too old (micro mismatch)

Also when I clicked on external link or tried to open a JPEG attachment
I saw the following error printed in the terminal.

/usr/lib/firefox-3.6.3/firefox-bin: symbol lookup error: /usr/lib/firefox-3.6.3/libxul.so: undefined symbol: gdk_x11_window_get_drawable_impl

After some searching I found out that this was related to this
Technote of Lotus Notes on Ubuntu. I probaly also took this
step when installing Lotus Notes 8.5 for the first time
because I saw that the files were there :-p.

http://www-01.ibm.com/support/docview.wss?rs=899&uid=swg21409777

$ cp /usr/lib/libgdk_pixbuf-2.0.so.0.1800.3
/opt/ibm/lotus/notes/libgdk_pixbuf-2.0.so.0

$ cp /usr/lib/libgdk_pixbuf_xlib-2.0.so.1800.3
/opt/ibm/lotus/notes/libgdk_pixbuf_xlib-2.0.so.0

$ cp /usr/lib/libgdk-x11-2.0.so.0.1800.3
/opt/ibm/lotus/notes/libgdk-x11-2.0.so.0

$ cp /usr/lib/libgtk-x11-2.0.so.0.1800.3
/opt/ibm/lotus/notes/libgtk-x11-2.0.so.0

To give it a try I moved the four files to a tempdir an started
up Lotus Notes. It gave me no more Gtk+ version too old warnings
and external URL’s were working again as well as JPEG attachments.

For now I don’t know what is the cause that it is working, just
deleting these four files and the fact that I’m running Ubuntu 10.04.
Or that it that I deleted all the fours files and that I upgraded my
Lotus Notes 8.5 client to Fixpack 3?

Nevertheless I hope somebody will profit from this information.

Technote SPR included in Fixpack3 maybe related?

http://www-01.ibm.com/support/docview.wss?uid=swg21418210

Linux Fake-RAID vs. Software RAID

While my server suffered some (serious) downtime behind the scenes
I dove into the concept of RAID setups on Linux. I al ready had configured
a Software RAID used to save my precious data but had no clue
there were differences in RAID setups.

“That explained my config of this RAID, I configured my
onboard VIA VT6420 SATA RAID Controller with it’s menu to be a
RAID 1 controller and in Linux I configured this setup with Yast
to be a Software Raid 1 config.???? Yeah you know just do, don’t read.

I took this dive because my root disk was at the end of it’s life.
Smarctl -H didn’t gave me a pretty sight. just a failing hard disk.

Luckily I was able to rescue the most of my files that were
on the root disk only an openSUSE 11.2 installation and some config
files of apps. But I decided that I wanted my root disk
to be a RAID 1 setup as well.

I ordered two SATA disks and a SATA RAID 0/1 controller. Then my
mission started to get this setup working as a root disk.

Searching my way through Google about how to do this I discovered
that there are multiple options to create a RAID config on Linux.

The two relevant for my were:

Software RAID (Operating system based)

You can create a Software RAID you don’t need a RAID controller for
this config, so there I was looking good with my just bought RAID controller :-) .

Fake-Raid (Firmware/driver-based RAID)

You can create a Fake-Raid setup by utilizing a Fake-Raid controller capabilities.

You can got loose on the whole RAID thing at wikipedia

http://en.wikipedia.org/wiki/Fakeraid

“Hardware RAID controllers are expensive and proprietary. To fill this
gap, cheap Fake-Raid controllers were introduced.”

I decided to go with the Fake-Raid solution, didn’t want my just-bought
RAID controller to be a waste of money, all though it only cost me 20 EURO
but it’s all about the principle :-) .

Below a summary of all the things I had to do to let me 20 EURO
be a worthy investment.

Create a RAID 1 setup with the menu tool on the RAID controller.

Then create a file-system on the RAID 1 config.

To find out the device name of your RAID device use this command

# dmraid -ay
# ls -la /dev/mapper/

Then use cfdisk or fdisk or whatever partition program to create a file-system.

In my situation it was

# cfdisk /dev/mapper/sil_bgadaecebiea

To be able to boot from a Fake-Raid device you have to have
a initrd file which contains a driver which supports this.

From the man of mkinitrd

dmraid =Include support for Software-Raid over device mapper
              (known as Fake-Raid)
dm      = Include support for device mapper in general
md      = Include support for Software RAID (md)
kpartx = Include support for kpartx partitioning. Always use this
              if you have device mapper devices.

What was important for me, and something that I found out later
is that you can’t boot from a FakeRaid config and use a Sofware based
RAID device at the same time.

http://www.brandonchecketts.com/archives/disabling-dmraid-fakeraid-on-centos-5

“Both of the drivers will attach themselves to all the drives with
any partitions sets as type fd (Linux raid autodetect).”

Later on the road when I was able to boot from my FakeRaid root disk I
converted my Software RAID setup to a Fake-Raid as well.

Found out that creating a Fake-Raid capable initrd file on openSUSE
is a mission own it own.

http://en.opensuse.org/P35_With_SATA_Raid/

“Next we have to edit another file: /lib/mkinitrd/scripts/boot-dmraid.sh
(Note, that I don’t know the state, it was originally in)

you have to change the line that reads

/sbin/dmraid -a y -p

to

/sbin/dmraid -ay”

With all the trip/tricks/hints in mind my final mkinitrd commando looked liked this.

#mkinitrd -f “dm dmraid kpartx”

In order to be able to boot from a FakeRaid device I had to add the
following two parameters to my GRUB menu.lst and set root to my new
partition created.

root = /dev/mapper/sil_bgadaecebieap1
root_dm = 1
root_dmraid=1

kernel (hd0,0)/boot/vmlinuz-2.6.31.5-0.1-default root=/dev/mapper/sil_bgadaecebieap1 root_dm=1 root_dmraid=1 splash=silent agp=off clocksource=hpet 001 showopts

To install the GRUB bootloader on my RAID setup I had to create the following
device.map.

hertogjan:/boot/grub # cat device.map
(fd0)  /dev/fd0
(hd0) /dev/mapper/sil_bgadaecebiea

Then install GRUB

grub> root (hd0,0)
grub> setup (hd0)
grub> quit

And there you go if everything is working out for you you
should be able to boot from your Fake-RAID root disk.

Extra note:

It’s seems booting from a “broken” Fake-Raid on Linux is not supported
as can be read on this website at the bottom.

http://wiki.archlinux.org/index.php/Installing_with_Fake_RAID

“Booting with degraded array

One drawback of the fake RAID approach on GNU/Linux is that
dmraid is currently unable to handle degraded arrays, and will
refuse to activate.

In this scenario, one must resolve the problem from within another
OS (e.g. Windows) or via the BIOS/chipset RAID utility.

Alternatively, if using a mirrored (RAID 1) array, users may temporarily
bypass dmraid during the boot process and boot from a single drive:

 1. Edit the kernel line from the GRUB menu
 2. Remove references to dmraid devices
     (e.g. change /dev/mapper/raidSet1 to /dev/sda1)
 3. Append disablehooks=dmraid to prevent a kernel panic
     when dmraid discovers the degraded array
 4. Boot the system “

Sites already mentioned in the above story that were very
helpful in my attempt fixing this one.

http//www.brandonchecketts.com/archives/disabling-dmraid-fakeraid-on-centos-5
http://wiki.archlinux.org/index.php/Installing_with_Fake_RAID
http://www.texsoft.it/index.php?c=hardwareamp;m=hw.storage.grubraid1amp;l=it
http://en.opensuse.org/P35_With_SATA_Raid

IBM AT&T VPN client on Linux (Ubuntu)

A couple of months ago AT&T release a beta version of their VPN Client for linux.

Unfortunately they released the client as a RPM ( RedHat package ) and not
as an Ubuntu DEB package.

But help was nearby, on this website I found how to convert the RPM
package to an Ubuntu DEB package.

http://blog.afmacedo.com/?p=11

And here you can download the latest IBM AT&T VPN Client
for Linux (@ 07/01/09 )

ftp://ftp.attglobal.net/pub/client/linux/agnclient-1.0-2.0.1.3000.i386.rpm

After converting and installing I could find the app here :

Internet -> AT&T Global Network Client

And check it out AT&T VPN client on Linux

Mini-commander in Ubuntu 8.0.4 Hardy Heron

When I got my new Thinkpad W500 I decided to change my OS from
SLED 10 SP1 to Ubuntu 8.0.4. The packet management on Ubuntu is
many times better than the one from Suse.

One of the things that I was missing on my desktop with Ubuntu was
the mini-commander applet. Searching on Google I found out that it
was discarded and was replaced by Deskbar.

But Deskbar wasn’t the thing I was looking for, to many options.
No history-based auto completion :-) .

After some Googling I found this post on a forum.

____________________________________________________

http://www.nunx.org/stage/ubuntu/mini-commander_2.13.90-0nunx0_i386.deb

As the official gnome-applets/gnome-applets-data packages still contain some parts of mini-commander you’ll have to use the –force-overwrite option to dpkg to install this package. Like this:

you@your_box$ wget http://www.nunx.org/stage/ubuntu/mini-commander_2.13.90-0nunx0_i386.deb
you@your_box$ sudo dpkg –force-overwrite -i mini-commander_2.13.90-0nunx0_i386.deb
(Reading database … 152203 files and directories currently installed.)
Unpacking mini-commander (from mini-commander_2.13.90-0nunx0_i386.deb) …
dpkg – warning, overriding problem because –force enabled:
trying to overwrite `/usr/lib/bonobo/servers/GNOME_MiniCommanderApplet.server’, which is also in package gnome-applets-data
Setting up mini-commander (2.13.90-0nunx0) …

Oh, and the package is not signed by anyone you know and trust. If you are wary of installing unsigned binary packages from $deity-knows-where on the internet you are a) right and b) sadly out of luck.  Should you not trust my package you can make one yourself from the mentioned versions of the official package files (look for them in your /var/cache/apt/archives directory)

____________________________________________________

So now I got my mini-commander applet back.


Cinelerra – a video editor and compositor for linux

Check it out here > http://cinelerra.org/

Linux driver voor Microsoft NX-6000 Webcam

Check it out op deze site http://linux-uvc.berlios.de/