Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

May 16 2012

Gimp 16bit and more (UFRaw integration limited)

Gimp 2.9.1 (current git HEAD) supports 16bit per color channel ;-)

UFRaw integration (open *.raw/*.arw from within gimp) is still limited to 8bit, but  you can work around with `ufraw --out-depth=16 --out-type=png <file>.arw` and open the exported .png with Gimp.
Tags: linux

April 21 2012


Modified Lenovo Thinkpad t61/x61/r61 bios files w/o wlan whitelist, w/ sata2 and (optional) switched Fn-Ctrl-buttons -- works for my X61 7673-CTO
Tags: linux

April 14 2012

2376 1223 500
CDROM - Prepare, MTBF is coming!
pandora ~ # cat /usr/local/sbin/mwpcd-playback.sh

echo 0 > /proc/sys/dev/cdrom/autoclose
echo 1 > /proc/sys/dev/cdrom/autoeject

setopt -e -x

[ -e $DRIVE ]
[ -e $DEST ]
eject -t $DRIVE
sleep 12
mount $DRIVE
ID=$(< $1/mwpcd_id)
[ ! -e $DEST/$ID ]
echo reading $ID
rsync -av --progress $DRIVE/ $DEST/$ID
umount $DRIVE
echo finished $ID
pandora ~ # while zenity --question --text="Insert next CD?"; do
    time mwpcd-playback.sh /mnt/cdrom1 /home/images/mwpcd ; done
Tags: own linux
Reposted byjv6 jv6

April 03 2012

5031 385b
Recycle Kirrio BR-306 (aka GlobalSat BR-305, PalmOne Zire 31 GPS bundle) with PL2303 (RS232-USB) and gpsd as GPS Mouse.
On the PS/2 MDIN Connector Red=5V, Black=GND, White=TX, Green=RX).
Tags: linux own

March 30 2012

4083 88eb 500
naked X61 dual wlan fail
Tags: linux own
3886 cc39 500
redundant is redundant is redundant
2x250GB 2x1.5TB 2x2TB
Tags: own linux

January 13 2012

5255 f08b 500
happy new buildbox, Xserve G4.
Tags: own linux

December 27 2011

December 13 2011

Linux netfilter packet flow
Tags: linux
Reposted bymendel mendel

October 10 2011

linux suspend and hibernation made simple

groupadd --system power
usermod -a -G power michael
echo "#\!/bin/sh
chgrp power /sys/power/state
chmod g+w /sys/power/state" \
chmod +x /etc/local.d/00sys-power.start

emerge -C sys-power/pm-utils

diff --git a/.xbindkeysrc b/.xbindkeysrc
index e1c32fe..f1c08af 100644
--- a/.xbindkeysrc
+++ b/.xbindkeysrc
@@ -13,9 +13,9 @@
   Control+Alt + l
 "xscreensaver-command --lock"
-"xscreensaver-command --lock; sudo /usr/sbin/pm-suspend"
+"xscreensaver-command --lock; echo mem >/sys/power/state"
-"xscreensaver-command --lock; sudo /usr/sbin/pm-hibernate"
+"xscreensaver-command --lock; echo disk >/sys/power/state"
 "xrandr --output LVDS1 --auto --output VGA1 --auto --right-of LVDS1"
Tags: own linux

August 03 2011

Restricting Skype on Gentoo

# /etc/portage/env/net-im/skype by Michael Weber Aug 3rd 2011
# Hotfix to restrict skype outbound to tcp/80 and tcp/443
# to avoid penalties inside cooperate/campus networks
# inspired by/ripped of Erich Schuberts
# http://www.vitavonni.de/blog/201107/2011072601-restricting-skype-via-iptables.html

post_src_install() {
        fowners :skype /opt/${PN}/${PN} || die
        fperms g+s /opt/${PN}/${PN} || die
        dodir /etc/local.d
        cat > ${D}/etc/local.d/skype.start <<EOF
einfo restricting group skype to outbound tcp/80 and tcp/443
iptables -I OUTPUT -p tcp -m owner --gid-owner skype \\
        -m multiport ! --dports 80,443 -j REJECT
iptables -I OUTPUT -p udp -m owner --gid-owner skype -j REJECT
        cat > ${D}/etc/local.d/skype.stop <<EOF
iptables -D OUTPUT -p tcp -m owner --gid-owner skype \\
        -m multiport ! --dports 80,443 -j REJECT
iptables -D OUTPUT -p udp -m owner --gid-owner skype -j REJECT
        elog "Take a look at /etc/local.d/skype.{start,stop} and incooperate"
        elog "the rules with your iptables/firewall setup, mind the exit."
        fperms +x /etc/local.d/skype.{start,stop}

post_pkg_setup() {
        enewgroup skype
Tags: linux own

June 02 2011

Test shadowLastChange (LDAP) with pam_script.so

# copyright 2011 Michael Weber (michael at xmw dot de )
# /etc/pam.d/sshd
# auth required pam_script.so onerr=fail expose=1

import ldap, os, re, sys, syslog

syslog.openlog('pam-gaf', 0, syslog.LOG_AUTH)
def log(s):

user = os.getenv('PAM_USER', '').replace('\n', '')
if not re.match('^[a-zA-Z0-9\-]+$', user):
    log('PAM_USER is zero-length or contains invalid chars')

if user == 'root':

passwd = os.getenv('PAM_AUTHTOK')
if not passwd:
    log('PAM_AUTHOK is not set')

conn = ldap.open('ldap.XXX')

res = conn.search_st('dc=XXX',
    filterstr='(&(uid=%s)(objectClass=posixAccount))' % user)
if len(res) != 1:
    log('ldap search returned more or less than 1 uids')
uid = res[0][0]

conn.simple_bind(uid, passwd)
res = conn.search_st(uid, ldap.SCOPE_BASE, attrlist=('shadowLastChange', ) )
if len(res) != 1 or res[0][0] != uid:
    log('internal error')
last = int(res[0][1].get('shadowLastChange', ('0', ))[0])

if last < 15127:
    log('user %s rejected, password last changed %i' % (user, last))
Tags: own linux

sort words line-by-line


import sys

print("\n".join(map(lambda line: " ".join(sorted(line.rstrip().split())), sys.stdin.readlines())))
Tags: own linux

April 14 2011

HOWTO recompile Debian packages (zsh update)

#We wanted out zsh to understand PS1=%F{}, something like 4.3.10.
#Debian/lenny ships 4.3.6, distupgrade is out of question and
#zsh from Debian/sid would pull lots of Debian/sid deps, don't mix releases!

# /etc/apt/sources.list: add deb-src lines for sid source packages
apt-get update
# get binary packages (lenny) needed to rebuild zsh (lenny)
apt-get build-dep zsh
# download source package for zsh (sid), and compile
apt-get source --compile zsh
# install compiled package
dpkg -i ./zsh_4.3.10-14_i386.deb
# clean up
rm -r zsh-4.3.10
Tags: linux

March 07 2011

2862 168c 500
USS DockStar (there, I fixed it!)
Tags: own linux

March 05 2011

Linux masquerade eth0 on wlan0 in 3 lines

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE
iptables --append FORWARD --in-interface eth0 -j ACCEPT
Tags: linux
Reposted byfadenb fadenb

February 27 2011

Backup as binpkg before emerge --depclean

`emerge --pretend --depclean | sed -n -e '/All selected packages:/{s/ / =/g;s/^.*:/quickpkg --include-config=y/;p}'`
Tags: linux

February 11 2011

--- /var/tmp/portage/x11-misc/xscreensaver-5.12/work/xscreensaver-5.12/hacks/xjack.c    2010-09-15 10:47:36.000000000 +0200
+++ xjack.c     2011-02-11 18:11:26.759381677 +0100
@@ -20,7 +20,7 @@
 #include <ctype.h>
 #include "screenhack.h"

-static const char *source = "All work and no play makes Jack a dull boy.  ";
+static const char *source = "Dull work and no sex makes xmw a sad boy.  ";
 /* If you're here because you're thinking about making the above string be
    customizable, then you don't get the joke.  You loser. */
Tags: linux

January 08 2011

3620 5d1b 500
2.6.37's response after crossing the flat
Tags: linux

January 07 2011

How to solve 4GB limitation on VFAT

dd if=/dev/zero of=<vfat mount>/part1 bs=1M count=4095
dd if=/dev/zero of=<vfat mount>/part2 bs=1M count=4095
dd if=/dev/zero of=<vfat mount>/part3 bs=1M count=4095
dd if=/dev/zero of=<vfat mount>/part4 bs=1M count=4095

losetup /dev/loop1 <vfat mount>/part1
losetup /dev/loop2 <vfat mount>/part2
losetup /dev/loop3 <vfat mount>/part3
losetup /dev/loop4 <vfat mount>/part4

# see CONFIG_MD_LINEAR is missing
cd /usr/src/linux
make menuconfig
make modules
make modules_install
modprobe raid0

mdadm --create --level=linear --raid-devices=4 /dev/md0 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop
mkfs.xfs /dev/md0
mount /dev/md0 <big mount>

Tags: linux
Reposted byjv6 jv6
Older posts are this way If this message doesn't go away, click anywhere on the page to continue loading posts.
Could not load more posts
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...
Just a second, loading more posts...
You've reached the end.

Don't be the product, buy the product!