суббота, 19 декабря 2009 г.

Animated background Kubuntu 9.10

http://swik.net/xwinwrap
http://tech.shantanugoel.com/projects/linux/shantz-xwinwrap
#!/bin/bash

if [ "$1" == "-s" ]; then
xwinwrap -o 0.5 -ni -fs -s -st -sp -b -nf -- /usr/lib/xscreensaver/xmatrix -root -window-id WID
fi;

if [ "$1" == "-v" ]; then
xwinwrap -o 1 -ni -fs -s -st -sp -b -nf -- mplayer -wid WID -nosound -quiet -loop 0  "/media/data/clips/anime/ghost/Ghost in the Shell - Making of a Cyborg.flv"
fi;

четверг, 3 декабря 2009 г.

make *.img file

#assume it is on /mnt/hda1,

dd if=/dev/zero of=/mnt/hda1/new_home bs=1M count=50
#this create a new 50M file
# or dd if=/dev/zero of=debian.img seek=3.5G bs=1 count=1

mke2fs -j /mnt/hda1/new_home

#this create a new ext3(or you can choose other fs) on new_home
# or use mkfs.vfat -F 32

mount /mnt/hda1/new_home /mnt/test -o loop
mount it to a mount point at /mnt/test
cp -dRp /home/* /mnt/test/*

#copy everything over

mv /mnt/hda1/knoppix.img old_home; mv /mnt/hda1/new_home knoppix.img

#replace it. when everything is cofirmed work, you can delete the old one.