Linux stuff
install rpm outside root
alias rpmlocal="rpm --dbpath /space/takohvak/local/lib/rpm --relocate /opt=/space/takohvak/local/opt --nodeps" rpm --initdb --root /home/username/local --dbpath /home/username/local/lib/rpm # rpmlocal --initdb # check depencies rpm -ivh package.rpm # install without root rpmlocal -ivh *.rpm
ext3 on usb
mke2fs -j /dev/sda1 -L 'arkisto' -m 0 -O sparse_super,large_file -j
usb problems
usb 1-1: device not accepting address 13, error -84 usb 1-1: reset full speed USB device using uhci_hcd and address 13 usb 1-1: device descriptor read/64, error -84
cable?
unplug everything else?
/etc/modprobe.conf: options scsi_mod inq_timeout=20 echo Y | sudo tee /sys/module/usbcore/parameters/old_scheme_first /etc/modprobe.conf: (disable hi-speed) blacklist ehci_hcd
dvd copy
mplayer dvd:// # sid == subtitle id # dvd://8 == title number # aid == audio id # copy mencoder dvd://8 -o original.avi -oac copy -ovc copy -vobsubout subfi -vobsuboutid fi -aid 128 -vf harddup -sid 6 # theora nice ffmpeg2theora -V 3000 -A 448 -c 6 --croptop 80 --cropbottom 72 --aspect 720:301 -o theora.ogv original.avi # matroska nice mkvmerge --title "Title here" --default-language "en" -o title.mkv --aspect-ratio 1:720/301 --noaudio theora.ogv --novideo original.avi --novideo flac2ch.ogv --novideo --language "1:hi" original-hi.avi --language "0:fi" subfi.idx suben.idx ## ac3->flac->vorbis sound nice mencoder -o flac2ch.avi original.avi -oac lavc -of avi -ovc lavc -lavcopts acodec=flac -noskip -skiplimit 1 -vf crop=32:16 -force-avi-aspect 16:9 nice ffmpeg2theora -A 256 flac2ch.avi
gnome icons, svg to png
/usr/share/icons/Human ; ~/.icons/Human sudo convert -background None -resize 16x16 scalable/devices/gnome-dev-harddisk-usb.svg 16x16/devices/gnome-dev-harddisk-usb.png
ma-secure (kerberos+samba+cups)
/etc/krb5.conf:
[libdefaults]
default_realm = AD.JYU.FI
[realms]
AD.JYU.FI = {
kdc = ad.jyu.fi:88
admin_server = ad.jyu.fi
default_domain = ad.jyu.fi
}
kinit username@AD.JYU.FI
klist
smbclient -k //ma-print.ad.jyu.fi/MA-Secure
print x.psCUPS: http://www.linuxprinting.org/show_printer.cgi?recnum=Ricoh-Aficio_MP_C3500 (custom PPD)
chown username.root /usr/bin/smbspool chmod u+s /usr/bin/smbspool
garmin 60csx / ubuntu
sudo apt-get install gpsd sudo apt-get install gpsd-clients sudo modprobe garmin_gps sudo vim /etc/udev/rules.d/z60_gpsd.rules sudo mount -t usbfs none /proc/bus/usb gpsd -n -N -D 6 /dev/gps0
# Garmin International GPSmap, various models (tested with Garmin GPS 18 USB)
SYSFS{idVendor}=="091e", SYSFS{idProduct}=="0003", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
compile deb
download * dpkg-source -x *.dsc cd * # stab debian/rules if needed (configure parameters) # export CFLAGS, CXXFLAGS etc if needed (-O2 -march=native) dpkg-buildpackage -rfakeroot -uc -b # halfway finished can be continued with fakeroot debian/rules binary cd .. dpkg -i *.deb
compile rpm
urpmi rpm-build rpmbuild -bb
ubuntu hardy (8.04), ati and xvideo
If stock fglrx, radeon, radeonhd doesn't work, use xserver 1.5.3 and radeonhd 1.2.4 from (use apt, READ NOTES FOR HARDY)
https://bugs.launchpad.net/~xorg-edgers/+archive/ppa
It works with kernel 2.4.24, newer drm needs to be installed from http://xorg.freedesktop.org/wiki/radeonhd:DRI
git clone git://anongit.freedesktop.org/git/mesa/drm cd $SRC/drm ./autogen.sh --prefix=/usr make make install (as root) cd linux-core make DRM_MODULES="radeon" make install (as root) # modify /etc/depmod.d/ubuntu.conf: search extra updates ubuntu built-in depmod -a (as root) xorg.conf: Driver "radeonhd" Option "DRI" "on" Option "accelmethod" "exa" # reboot
dpt 2044w/2044uw/Adaptec (formerly DPT) SmartCache/Raid I-IV Controller & linux
Works fine on 2.6.29 with "eata" driver, but does not support shared IRQ. Sharing irq will cause driver to crash. See motherboard manual to avoid sharing irq.
garmin and usb permissions
# usb_set_configuration failed
http://www.gpsbabel.org/os/Linux_Hotplug.html
# hardy
Create /etc/udev/rules.d/51-garmin.rules with
SYSFS{idVendor}=="091e", SYSFS{idProduct}=="0003", MODE="666"
and do a
sudo udevcontrol reload_rules.
chance dependency in deb file
dpkg -e x.deb cd DEBIAN vim control tar czvf ../control.tar.gz * cd .. ar r x.deb control.tar.gz dpkg -i x.deb
imagemagic
# resize for i in *.jpg ; do convert -resize 1280x1024 $i 1280/$i ; done # resize/padding for i in *.jpg ; do convert -background white -gravity center -resize '1280x1024>' -extent 1280x1024 $i 5:4/$i ; done
gnome-ppp/saunalahti
N900: pc-suite mode.
gksudo gnome-ppp user: rlnet pass: rlnet number: *99***1# (detect->) /dev/ttyACM0 usb modem init 2: AT+CGDCONT=1,"IP","internet.saunalahti"
crypt
apt-get install cryptmount cryptsetup
hardy: compile from http://packages.ubuntu.com/jaunty/cryptmount (3.1)
hardy: /etc/modprobe.d/aliases:
alias sha256 sha256_generic
alias aes aes_generic
modprobe sha256 aes dm_crypt
dd if=/dev/urandom of=docs.crypt bs=1M count=2048
sudo losetup /dev/loop2 docs.crypt
sudo cryptsetup luksFormat --key-size 256 --cipher aes-cbc-essiv:sha256 /dev/loop2
# sudo cryptsetup luksOpen /dev/loop2 docs
/etc/cryptmount/cmtab:
docs {
keyformat=luks
dev=/home/jesh/.crypt/docs.crypt
keyfile=/home/jesh/.crypt/docs.crypt
fstype=ext3
dir=/home/jesh/.crypt/docs
}
# format
cryptmount -p docs # --release
# -m reserved_blocks
mke2fs -j -m 0 -L label -O sparse_super /dev/mapper/docs
# mount
cryptmount docs # -u
gnome-screensaver unlock doesn't work/password problem
chown root.shadow /sbin/unix_chkpwd chmod 2755 /sbin/unix_chkpwd # -rwxr-sr-x 1 root shadow 19584 2008-08-22 23:03 /sbin/unix_chkpwd
md0 rescue mkinitrd
# live-cd boot sudo -i apt-get install --no-install-recommends mdadm mdadm -As mkdir a ; mount /dev/md0 a ; cd a mount --bind /sys sys chroot . mount proc ; mount boot cd boot; mkinitrd ..... lilo reboot
scanned jpg2pdf
convert -resize 1000x1500 -modulate 100,100,100 -adaptive-sharpen 5x0.3 -contrast-stretch 3%x30% *.jpg scanned.pdf
