Linux-Tipps (Rainer Dorsch, contact@bokomoko.de) Ispell auf deutsche Texte ansetzen ---------------------------------- Debian 3.0: ispell -T latin1 -d ngerman abstract von vorher: Plain Text: ispell -C -d german -T latin1 -w "ÂŽdÂŽvÂŽ|ÂŽDÂŽVÂŽ\ÂŽ_" filename Exmh: On Wed, 18 Nov 1998 18:06:22 +0100 Rainer Dorsch writes > > Does anybody know how to use ispell with texts containing umlauts? > > ispell -C -d german -T latin1 -w "ÂŽdÂŽvÂŽ|ÂŽDÂŽVÂŽ\ÂŽ_" filename > > works on plain text but not with exmh. > > Any ideas? In Preferecnes->I-Spell->Other Invocations, add "-T .latin1" after "deutsch", so that full like reads something like this: French { ispell -a -d french } German { ispell -a -d deutsch -T .latin1} English { ispell -a -d english } efax in Telefonanlage: ---------------------- Kein Waehltonproblem fax MANINIT=-jX3 send oder export MANINIT=-jX3; fax send 288 test.ps efax unter squeeze: =================== rd@blackbox:/tmp$ faxsend 032121215874 Aenderung_Zahlungsweise_20110402.ps.001 nice: kann Priorität nicht setzen: Keine Berechtigung efax: Sat Apr 2 22:23:20 2011 efax v 0.9a-001114 Copyright 1999 Ed Casas efax: 23:20 Error: can't read multi-strip TIFF files efax: 23:20 Error: missing offset to TIFF data efax: 23:20 done, returning 2 (unrecoverable error) Fix is rd@blackbox:/usr/bin$ diff fax.orig fax 798c798 < $GS -q -sDEVICE=tiffg3 -r$RES -dNOPAUSE -dSAFER \ --- > $GS -q -sDEVICE=tiffg3 -r$RES -dNOPAUSE -dMaxStripSize=0 -dSAFER \ rd@blackbox:/usr/bin$ Tape: ===== tar tvf /dev/st0 User loeschen (Debian): ======================= userdel Configure an RX300 mouse with konqueror page forward/backward: ============================================================== make mouse working with xorg: ----------------------------- rd@blackbox:~$ cat /proc/bus/input/devices [...] I: Bus=0003 Vendor=046d Product=c040 Version=0110 N: Name="Logitech USB-PS/2 Optical Mouse" P: Phys=usb-0000:00:1a.0-2/input0 S: Sysfs=/class/input/input2 U: Uniq= H: Handlers=mouse0 event1 ts0 B: EV=7 B: KEY=ff0000 0 0 0 0 0 0 0 0 B: REL=143 Section "InputDevice" Identifier "Configured Mouse" Driver "evdev" Option "CorePointer" Option "Name" "Logitech USB-PS/2 Optical Mouse" Option "Buttons" "11" Option "ZAxisMapping" "4 5 6 7" Option "Device" "/dev/input/event1" EndSection map in konqueror to page forward/backward: ------------------------------------------ xev helps to find out which events are mapped to which buttons. change forward and backward buttons in ~/.Xmodmap: ! page forward/backward in konqui keycode 234 = XF86Back keycode 233 = XF86Forward !keycode 233 = Delete !keycode 174 = XF86AudioLowerVolume !keycode 176 = XF86AudioRaiseVolume !keycode 162 = XF86AudioPlay !keycode 144 = XF86AudioPrev !keycode 153 = XF86AudioNext !keycode 168 = XF86AudioMedia ! change forward and backward pointer = 1 2 3 4 5 7 6 9 8 10 11 map the buttons to Alt-Left and Alt-Right in xbindkey in rd@blackbox:~$ cat /home/rd/.xbindkeysrc "/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]"" m:0x0 + b:6 "/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Right]"" m:0x0 + b:7 rd@blackbox:~$ Mouse works with gpm, but not with X: ===================================== gpm repeats the mouse activity (see man gpm, flag -R) optionally. In this example ms3 is the repeated protocoll: Current configuration: -m /dev/psaux -t ps2 -R ms3 -l "a-zA-Z0-9_.:~/\300-\326\330-\366\370-\377" Device: /dev/psaux Type: ps2 Repeat_Type: ms3 Append: -l "a-zA-Z0-9_.:~/\300-\326\330-\366\370-\377" Do you want to change anything (Y/n)? n Starting mouse interface server: gpm. It seems, that this prevents X from working with the configuration [/etc/X11/XF86Config] [...] Section "Pointer" Protocol "PS/2" Device "/dev/psaux" [...] correctly. To solve the problem, either change the repeat type of gpm to none or use the gpm repeat channel [/etc/X11/XF86Config] [...] Section "Pointer" Protocol "IntelliMouse" Device "/dev/gpmdata" [...] independent of the acutal protocol of the physical mouse. The advantage is, that whenever mouse needs to be re-configured, running gpmconfig is sufficient. The X configuration remains unchanged. Tastatur konfigurieren (Konsole): --------------------------------- loadkeys us loadkeys de-latin1 Using Knoppix for installing a new lilo bootblock: -------------------------------------------------- Knoppix has the mount option nodev in its fstab. For this reason the root file system must be mounted with explicit options, e.g. mount -o defaults /dev/hda2 /mnt/hda2 chroot /mnt/hda2 lilo Using Knoppix/LiveCd to repair a non-booting system: ---------------------------------------------------- boot liveCD mount root partition chroot if there is a permission problem on /dev/.. devices mount -o remount,dev see also http://www.knoppix.net/wiki/Dev_null_permission_denied Remote ueber xdm einloggen: --------------------------- /etc/X11/xdm/Xaccess regelt den Zugriff For KDM: in /etc/kde3/kdm/Xaccess den * einkommentieren ind /etc/kde3/kdm/kdmrc im abschnitt [XDMCP] Enable=true setzen rsync Beispiel: =============== rsync ftp.fsn.hu::cdimages/debian-unofficial/potato-powerpc-1.raw . oder auch über ssh export RSYNC_RSH=ssh useful options: --password-file close a debian bug report: ========================== send mail to control@bugs.debian.org content close Uninstalling tasks: =================== Re: De-installing 'tasks' (Score: 1) by Integral on Tuesday, November 28 @ 20:55:30 EST (User Info) Aptitude can list the dependencies of a package and let you choose to remove them in the same screen. Very handy, IMBO[1]. [1] In My Biased Opinion holding packages at the installed version: ========================================== using aptitude: --------------- aptitude hold flashplyer-mozilla aptitude unhold flashplayer-mozilla paddy:~# aptitude search flashplayer-mozilla ih flashplayer-mozilla - Macromedia Flash Player paddy:~# using dpkg: ----------- echo "wine hold" | dpkg --set-selections That should do it in a clean way so that apt-get update will still work for other packages. Regular "apt-get install wine" will override the hold status when wine works again. Leave automatically installed packages installed: ================================================= aptitude unmarkauto openoffice.org vim Using RT via email Interface: ============================= > 3. We have noticed that you can't resolve a ticket with %RT e-mail > commands in a reply message -- you have to do it in a separate "action" > e-mail. For example, say I'm a member of a list and I get an e-mail with > a new request. I reply right away, and put in it: > > "Hi user, here's the solution to your problem.... yadda, yadda, yadda. > %RT user myusername > %RT pass mypassword > %RT take number > %RT resolve number" Mailheader rewriting/from lines/exim: ===================================== Bei eximconfig, maschine als outgoing eintragen und in /etc/email-addresses das rewriting eintragen. Quote vor rekursiver aliasexpandierung erfolgt mit \, rainer: \rainer, rainer.dorsch@informatik.uni-stuttgart.de Running X-Applications after su: ================================ Become root, then: cd ln -s /home/branden/.Xauthority .Xauthority oder XAUTHORITY=/home/branden/.Xauthority xeyes slylcr for on multi-user systems: --------------------------------- Add the full path to the exec line in: rd@grieve:~$ grep Exec ~/.kde/Autostart/slyLCR.desktop Exec='/home/rd/.slylcr/slylcr' rd@grieve:~$ Automatically start cmd line app in KDE: ======================================== $ cat /home/kwerner/.kde/Autostart/nvidia #!/bin/sh while (true) do sleep 120; nvidia-settings -a PixmapCache=0 > /dev/null; nvidia-settings -a PixmapCache=1 > /dev/null; done & X and Backspace: ================ See /usr/share/doc/xfree86-common/FAQ Set permissions of mounted device: ================================== $ mount -o umask=077 /zip/ owner is allowed to do everything, rest nothing. Files per mail mit Kommandozeile verschicken: ============================================= uuenview -m muster@muster.de -s test Attestat.jpg Single user access, whe PAM fails ================================= You can gain single user access to your Debian system even with a broken PAM by booting it with the init=/bin/sh argument. This should allow you to mount the root filesystem read/write, bring up the network, download a new package and install it. Find effizient nutzen: ====================== Kommandos ausfÂŽ|hren: find -name bla* -exec gzip -9 {} \; find /tmp -type f -mtime +5 -print0 | xargs -0 rm -f ruft rm mit der maximalen Anzahl von Argumenten auf (damit wird eine minimale Anzahl von Unixprozessen gestartet). Formatierte Ausgabe find -name main.lyx -printf "%f %u %t" Ausgaben in Datei find / -type f -fprint Dateien \ -o -type d -fprint Verzeichnisse \ -o -type l -fprint Symlinks \ -o -print exclude files: -------------- find . -type l -not -regex '.*out.*' -printf "%f\n" use grep efficiently: ===================== grep only certain columns: grep -E "^.{25}.$AID.*" Dereference symlinks: ===================== readlink Add packages from unstable: =========================== + Add "unstable" lines to your /etc/apt/sources.list + Create a /etc/apt/preferences file that favours "testing", e.g. Package: * Pin: release a=testing Pin-Priority: 777 Package: * Pin: release a=unstable Pin-Priority: 333 + "apt-get -t unstable install kde" Add a specific version: ======================= apt-get install libqt3-mt-dev=3:3.1.2-0woody1 Creating Debian repositories: ============================= using http://www.debian-administration.org/articles/286 /var/www/apt is base directory repository is described here /var/www/apt/conf/distributions Incorporating a file: reprepro --ignore=wrongdistribution -Vb /var/www/apt include lenny /home/rd/build/libset-intspan-perl*changes Or if only a deb is available: reprepro --ignore=wrongdistribution -Vb /var/www/apt includedeb lenny /home/rd/build/libset-intspan-perl*deb Building Pentium Packages: ========================== Package: pentium-builder 0.9 force pentium optimized compilation Replaces gcc, cc, and g++ with scripts that build with pentium optimizations, using egcc. By default, after installing this package, the compilers will behave normally. However, if the environment variable DEBIAN_BUILDARCH=pentium is set, they will enter pentium optimized compile mode. Setting German environment: =========================== OK, I found it: /etc/environment. And to set keyboard leyout: dkkg-reconfigure console-setup HOSTID setzen: ============== #include int main(void) { long value=0x80817edb; sethostid(value); return 0; } X11-Treiber mit Xv-Support fÂŽ|r VAIO-Laptop: =========================================== http://www.linuxvideo.org/ GATOS-Link folgen: http://www.linuxvideo.org/gatos/ Download the driver an extract it... kcontrol plugins debuggen: ========================== start them in kcmshell, e.g. kcmshell screensaver Enable public_html for apache2: =============================== Goto /etc/apache2/mods-enabled and create symbolic link as follow ln -s ../mods-available/userdir.load ln -s ../mods-available/userdir.conf KDE Applets debuggen: ===================== z.B. kcd: rainer@rai16:~/public_html/pages/studies/ss01$ appletproxy /usr/share/apps/kicker/applets/kcd.desktop ERROR: Error accessing CD-Rom device(/dev/cdrom). Correct permissions ? rainer@rai16:~/public_html/pages/studies/ss01$ User Limits: ============ see /etc/pam.d/[login|su] # Sets up user limits, please uncomment and read /etc/security/limits.conf # to enable this functionality. # (Replaces the use of /etc/limits in old login) # session required pam_limits.so and adjust limits in /etc/security/limits.conf cdrecord tut unter Debian nicht: ================================ chgrp cdrom `which cdrecord` chmod 4710 `which cdrecord` Clean RW CDs: ============= RT2: ==== RT2 is successfully installed on rai16. If you are ready to migrate to it, just comment out the rt1 stuff and uncomment the rt2 in /etc/aliases (you will know of you see the file). I have tested it already, things seem to work fine.. http://rai16.informatik.uni-stuttgart.de:8000/rt2/ Due date is also added as suggested in the FAQ. Note: This is apache-perl package, the old apache still run at port 80 as usual. The apache-perl is configured (/etc/apache-perl/) to have no other content except this rt2. mailqueue leeren: ================= mailqueue ansehen: mailq mailqueue leeren: sendmail -q empty mailqueue and enforce delivery of each message in queue: sendmail -qff messages loeschen: sendmail -Mrm Zweiter X-server: ================= startx -- :1 Linux als X-Terminal: ===================== startx -- -indirect ras45 :3 DMA unter Linux: ================ hdparm -d 1 /dev/hda evtl. in richtigen DMA mode schalten: graven:~# hdparm -i /dev/hda /dev/hda: Model=ST310212A, FwRev=3.02, SerialNo=5EG0QS24 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% } RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4 BuffType=unknown, BuffSize=512kB, MaxMultSect=32, MultSect=off CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=20005650 IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120} PIO modes: pio0 pio1 pio2 pio3 pio4 DMA modes: mdma0 mdma1 mdma2 udma0 udma1 *udma2 udma ist -X(64+mode), auf graven z.B. hdparm -X66 -d1 /dev/hda Performance Messung: graven:~# hdparm -t /dev/hda /dev/hda: Timing buffered disk reads: 64 MB in 3.15 seconds = 20.32 MB/sec graven:~# hdparm ====== Most systems can benefit from improved performance using a command sequence similar to this: #!/bin/sh for d in /proc/ide/hd* ; do if [ `cat $d/media` = 'disk' ]; then hdparm -qm8 -qu1 -qc1 -qd1 -qW1 /dev/${d##*/} elif [ `cat $d/media` = 'cdrom' ]; then hdparm -qu1 -qd1 /dev/${d##*/} fi done Mail direkt ueber Port 25 ========================= telnet machine 25 helo rainer mail from: mister.bean@universe.com rcpt to: rainer.dorsch@informatik.uni-stuttgart.de data This is a test message . Switch off print control in xpdf: ================================= Load file xpdf/PDFDoc.h Search for "okTo" Change all return values to true. Encrypt a pdf file: =================== pdftk ex-s600.pdf output 1.128.pdf owner_pw foo user_pw baz allow printing Uncompress a pdf file for manual editing: ========================================= pdftk KKA-DKB.pdf output uncompressed.pdf uncompress Extract pages from multiple pdf documents: ========================================== Add Select Pages from Multiple PDFs into a New Document pdftk A=one.pdf B=two.pdf cat A1-7 B1-5 A8 output combined.pdf Concatenate two pdf files: pdftk A=in2.pdf B=in2.pdf cat A B output combined.pdf My solution based on that is: pdftk A=test.pdf cat A32-86 output new.pdf pine ==== Folder List Mail Inbox ;A a fuer apply b fuer bounce xhost connections zulassen: =========================== /etc/kde2/kdm/Xservers -nolisten tcp aus Aufruf entfernen. Debian Live USB Stick: ====================== Manual: http://live.debian.net/manual/de/html/the-basics.html#using-iso-hybrid Iso: For the impatient: 1. Download image from http://cdimage.debian.org/cdimage/release/current-live/i386/usb-hdd/ 2. Do dd if=/home/rd/tmp.nobackup/debian-live-6.0.1-i386-kde-desktop.img of=/dev/disk/by-id/usb-USBest_Technology_USB_Mass_Storage_Device_081229519096c0-0:0 3. Make partition bootable using cfdisk /dev/disk/by-id/usb-USBest_Technology_USB_Mass_Storage_Device_081229519096c0-0:0 4. Optionally, you may want to add another partition since space might be left on stick cfdisk /dev/disk/by-id/usb-USBest_Technology_USB_Mass_Storage_Device_081229519096c0-0:0 Knoppix installieren: ===================== 1. Press CTRL-ALT-F1, to get a root console. You should see a shell prompt 2.Type: knx-hdinstall (von http://www.freenet.org.nz/misc/knoppix-install.html) Force the installation of a module in PGI: ========================================== Pass the syslinux "boot:" prompt the "debug" option, and when you get the following shell prompt: Preparing to run /live/share/installer/stage1.sh; launching shell. Try the command "modprobe pcnet32". gimp: ===== indizierte Ebenen erlauben keine Schwellwert Transformation: -> Im Menu: Bild->Modus->RGB oder Graustufen wählen Zeitzonen: ========== Zeit in UTC, CET, CEST, (EST=POK) export TZ=UTC date x11 cookies =========== xauth list $DISPLAY xauth add goofy.disney.gb:11 MIT-MAGIC-COOKIE-1 6eee1bb5fad833bdd2b4191302a9be33 scanimage umax1220 ================== scanimage -L scanimage --help -d umax1220u:/dev/usb/scanner0 Scannen: scanimage --device-name=umax1220u:/dev/usb/scanner0 --format=tiff --resolution=300 -l 9.3 -t 0.5 -x 210 -y 297 > scan.tiff (noch zu testen mit tiff...) Local modifications: in /etc/hotplug/usb/libusbscanner add if [ "$ACTION" = "add" -a "$TYPE" = "usb" ]; then chown root:scanner "$DEVICE" chmod 0660 "$DEVICE" /usr/local/bin/umax1220u start fi silverboxy:~# cat /usr/local/bin/umax1220u #!/bin/sh #echo umax1220u $DEVICE $1 >> /tmp/usb.log ACTION=$1 case $ACTION in start) echo "UMAX 1220u scanner added" DEV=`scanimage -L|cut -f 2 -d \\\`|cut -f1 -d \'` /usr/bin/scanimage --lamp-off --device=$DEV ;; stop) echo "UMAX 1220u scanner removed" ;; esac silverboxy:~# CUPS: ===== Printer sharing: ---------------- (see http://www.cups.org/documentation.php/doc-1.4/sharing.html for details) on server: cupsctl --share-printers cupsctl 'BrowseLocalProtocols="cups smb"' # or whatever protocols need to be supported. Clients detect printer automatically. Older variant: -------------- Auf server: /etc/cups/cupsd.conf: # Answer requests which arrive at the port 631 at IP 192.168.1.10 (and not only on the loopback interface Listen 192.168.1.10:631 # Restrict access to the server... Order allow,deny Allow localhost Allow @LOCAL # rd, 20080101 Allow 192.168.1.* Auf client: /etc/cups/client.conf ServerName 192.168.1.10 Adding pppds with CUPS: ======================= Just add a printer with the KDE printer tool (become root within it first). Instead of selecting a printer model use the "Others" button to select a ppd directly. Typically the manually added ppds go to /opt/ppd on my system. When CUPS is started up it reads /etc/cups/ppds.dat for new CUPS ppds. Margin alignment with CUPS: =========================== Go in your .ppd file and set Margins and HWMargins at the end to zero (if there): *OpenUI *Margins/Page Margins/Offsets: PickOne *DefaultMargins: Custom *Margins Default/Driver Default: "" *Margins Custom/Custom (set with 'alignmargins'): "<>setpagedevice" *CloseUI: *Margins Then download align.ps and alignmargins from http://www.linuxprinting.org/download/printing/alignmargins Run alignmargins (an check that in the printout Margins and HWMargins are zero, if not alignmargins will append the custom lines and they may be handedited in the next run. Rerun alignmargin: calculate x and y => Margins calculate ml, mb, mr, and mt => HWMargins Debugging CUPS: =============== /etc/cups/cupsd.conf: LogLevel debug Running cups filters on the command line: ========================================= This might be useful for debugging: foomatic-rip -v --ppd /etc/cups/ppd/hplj6p.ppd KKA-DKB.pdf Checking the connectivity to a HP Laserjet: =========================================== # hp-probe video editing: ============== avidemux For the n900: sound might be too fast. Apply "Audio->Build VBR Time Map" before saving the video Canon printer: ============== Download cnijfilter-mp550series-3.20-1-i386-deb.tar.gz and run ./install.sh (adds cups printer, rpm must not be installed): rdorsch@paddy:~/SW.nobackup/Canon/cnijfilter-mp550series-3.20-1-i386-deb$ ls install.sh packages rdorsch@paddy:~/SW.nobackup/Canon/cnijfilter-mp550series-3.20-1-i386-deb$ cd .. rdorsch@paddy:~/SW.nobackup/Canon$ ls cnijfilter-mp550series-3.20-1-i386-deb rdorsch@paddy:~/SW.nobackup/Canon$ apcalc: ======= $ calc > config("mode","bin") "binary" > 1+10 0b1011 > 0b1+0b10 0b11 Openoffice: =========== file which contains recovery documents: ~/.openoffice.org2/user/registry/data/org/openoffice/Office/Recovery.xcu openoffice wants to recover a file at every start and fails: ============================================================ rm ./user/registry/data/org/openoffice/Office/Recovery.xcu Openoffice Operations: ====================== See array functions. When editing array cells, leave the cell with Crtl-Shift-Enter Clipart for Openoffice: ======================= aptitude install openclipart-openoffice.org Spellchecking in Openoffice: ============================ blackbox:~# aptitude install hunspell-de-de hunspell-en-us LyX: ==== Pixelfonts: Waehle Times New Roman statt Times (in Debian: ttf-commercial) tex2pdf integrieren: You can add it to the converters section. Add a format pdf3 with name "PDF (tex2pdf)" to preferences->formats and a converter "latex->PDF (tex2pdf)" with converter "tex2pdf $$i" and extra flag "latex" to the converters section. eps-Grafiken werden nicht dargestellt: imagemagick installieren Character styles in LyX: ======================== Character styles are used for similar things as paragraph styles in LyX, except that they refer to a number of characters and not to a whole paragraph. There are two examples for how to define character styles distributed with lyx in .../layouts/: db_stdcharstyles.inc and agu_stdtitle.inc To format text accroding to character styles in a document insert a new charstyle inset. X-Terminals: ============ On the server allow access in /etc/kde3/kdm/Xaccess by adding a line with a wildcard * Open UDP port: In /etc/kde3/kdm/kdmrc: [Xdmcp] # Whether KDM should listen to XDMCP requests. Default is true. #Enable=false Auf dem Client Xnest :1 -query oder X :8 -query Kernel-package: =============== Do a specific kernel (see README.Modules): export APPEND_TO_VERSION=-686 IMAP Server Setup: ================== http://talk.trekweb.com/~jasonb/articles/exim_maildir_imap.shtml Without (SPAM) filtering: ------------------------- /etc/exim/exim.conf: Deliver mail in the maildir format to users home directory instead of /var/spool local_delivery: driver = appendfile group = mail mode = 0660 mode_fail_narrower = false envelope_to_add = true return_path_add = true directory=${home}/Maildir maildir_format = true prefix = "" Install the Debian courier-imap packages, that's it. With filtering: --------------- Add maildirformat to the transport address_directory: driver = appendfile no_from_hack prefix = "" suffix = "" maildir_format The director needs to look like this (not sure if I changed something) userforward: driver = forwardfile file_transport = address_file pipe_transport = address_pipe reply_transport = address_reply directory_transport = address_directory no_verify check_ancestor check_local_user file = .forward modemask = 002 filter For SPAM filtering using spamassassin: -------------------------------------- NOTE: Does not work with standard woody package. Compiled 2.60 from source and added full path to /opt/spamassassin in /etc/init.d/spamassassin Add a transport spamcheck: driver = pipe command = /usr/sbin/exim -oMr spam-scanned -bS transport_filter = /usr/bin/spamc bsmtp = all home_directory = "/tmp" current_directory = "/tmp" # must use a privileged user to set $received_protocol # in the second exim process! user = mail group = mail return_path_add = false log_output = true return_fail_output = true prefix = suffix = Add a director (only directors not filtered by spamassassin should be before this one): spamcheck_director: # do not use this director when verifying a local-part at SMTP-time # no_verify # When to scan a message : # - it isn't already flagged as spam # - it isn't already scanned # - it didn't originate locally (as long as I don't harbor spammers :-)) # condition = "${if and { {!def:h_X-Spam-Flag:} {!eq {$received_protocol}{spa m-scanned}} {!eq {$received_protocol}{local}} } {1}{0}}" condition = "${if and { {!def:h_X-Spam-Flag:} {!eq {$received_protocol}{spam -scanned}} } {1}{0}}" driver = smartuser transport = spamcheck Start spamd in by enabling it in /etc/default/spamassassin Doublecheck that spamd really runs... Spamassassin config: -------------------- Bayes database: - - - - - - - - see http://wiki.apache.org/spamassassin/BayesNotWorking Bayes doesn't seem to be working for me! show current config rules spamassassin -D --lint $ sa-learn --dump magic 0.000 0 3 0 non-token data: bayes db version 0.000 0 7812 0 non-token data: nspam 0.000 0 8204 0 non-token data: nham 0.000 0 730417 0 non-token data: ntokens 0.000 0 1020113049 0 non-token data: oldest atime 0.000 0 1165958982 0 non-token data: newest atime 0.000 0 1165959207 0 non-token data: last journal sync atime 0.000 0 1165959420 0 non-token data: last expiry atime 0.000 0 0 0 non-token data: last expire atime delta 0.000 0 0 0 non-token data: last expire reduction count when spamassissin runs a spamd within the MTA, site wide spamfiltering has to be applied. This implies in /etc/spamassassin/local.cf bayes_path /home/rd/.spamassassin/bayes Accessing the bayes database: - - - - - - - - - - - - - - - when >200 hamm and spam tokens are there, the database should be ok. When bayes is not running, it seems like a permission problem for the Debian-exim user. Make sure that Debian-exim can read /home/rd/.spamassassin/bayes* and write chgrp Debian-exim /home/rd/.spamassassin/bayes_journal chmod g+w /home/rd/.spamassassin/bayes_journal and (for creating a lock) chgrp Debian-exim /home/rd/.spamassassin chmod g+w /home/rd/.spamassassin spamassassin --lint -D (run this as Debian-exim user) show often debug hints. Bayes still not working: The MTA might be overrun with mails, check /var/log/mail.log Mar 26 18:20:36 bokomoko spamd[27247]: prefork: server reached --max-children setting, consider raising it see /etc/default/spamassassin in this case and adapt --max-children Using razor, pyzor, and SpamCop: -------------------------------- Add to /etc/spamassassin/local.cf # SpamCop config (rd, 2008-03-27) spamcop_from_address rdorsch@web.de # this requires a separate confirmation per spam report #spamcop_to_address submit.noEX2DClNxCtqIxd@spam.spamcop.net For Razor: rd@bokomoko:~$ razor-admin -discover rd@bokomoko:~$ razor-admin --create rd@bokomoko:~$ razor-admin -register -user rdorsch@web.de Register successful. Identity stored in /home/rd/.razor/identity-rdorsch@web.de rd@bokomoko:~$ seems that razor-admin -discover needs to be regularly # razor needs to discover its servers regularly 16 00,06,12,18 * * * razor-admin -discover For pyzor: - run pyzor discover to update servers Reporting spam automatically when it arrives in the SPAM-learned imap folder: ----------------------------------------------------------------------------- rd@bokomoko:~$ grep report /etc/rc.local su -c /home/rd/bin/reportspam rd 2>&1 >> /var/log/reportspam & rd@bokomoko:~$ cat /home/rd/bin/reportspam #!/bin/bash # monitor spam-learn directory and report # stderr is lost when redirected only in rc.local inotifywait --monitor --quiet --event moved_to,create --format '%f' /home/rd/Maildir/.SPAM-learned/cur/ | /home/rd/bin/reportspam-execline 2>&1 rd@bokomoko:~$ cat /home/rd/bin/reportspam-execline #!/usr/bin/perl use strict; use warnings; my @args; my $now; $now=localtime; print "$now reportspam-execline restarted...\n"; while (){ print "Reporting $_ "; chomp; # remove carrige return @args = ("spamassassin","-rD","<","/home/rd/Maildir/.SPAM-learned/cur/$_"); system(@args) == 0 or die "reportspam failed"; } rd@bokomoko:~$ Remove spamassassin logs from syslog: ------------------------------------- http://wiki.apache.org/spamassassin/SeparateLogFile Spamassassin fails suddenly: ---------------------------- 2008-05-14 10:55:09 1JwChx-0001GJ-Sx SA: Action: SA didn't successfully run against message, accepting (time: 215/215 secs | Message-Id: 01c8b5eb_256e8080_befd783a@radioed). From (host=NULL [58.120.253.190]) for rdorsch@alzental-castle.de -> restart spamassassin: /etc/init.d/spamassassin restart -> if that does not help restarting exim4 might help SSL certificate for courier-imap-ssl: ------------------------------------- # cd /etc/courier # rm imapd.pem edit imapd.cnf if necessary # mkimapdcert (see also http://trekweb.com/~jasonb/articles/exim4_courier/courierimap.html) Dovecot: ======== ssl certificates: /etc/dovecot/dovecot.conf see #ssl_cert_file = /etc/ssl/certs/dovecot.pem #ssl_key_file = /etc/ssl/private/dovecot.pem Calculate fingerprint: bokomoko:/etc/dovecot# openssl x509 -noout -in /etc/ssl/certs/dovecot.pem -fingerprint SHA1 Fingerprint=7D:7A:45:FB:EE:ED:31:C8:78:66:E8:80:0E:6E:F2:C1:5D:52:A8:0B bokomoko:/etc/dovecot# x509 Management für X.509-Zertifikate -text Textuelle Details anzeigen -subject Organisation und Rechnername anzeigen -dates Gültigkeitszeitraum anzeigen -fingerprint Fingerprint zum Zertifikat anzeigen -md5 Wenn Fingerprint, dann MD5-Fingerprint anzeigen -sha1 Wenn Fingerprint, dann SHA1-Fingerprint anzeigen -noout Zertifikat selbst nicht anzeigen -hash Hashwert des Zertifikats berechnen -in suucp.pem »suucp.pem« als Zertifikat einlesen for more see http://www.infodrom.org/~joey/Writing/freeX/suucp/#cert Exim4+Spamassassin ================== http://koivi.com/exim4-config/ Installing and configuring Exim 4 on Debian apt-get install clamav-daemon \ clamav-freshclam exim4-daemon-heavy exim4 \ courier-base courier-authdaemon courier-imap \ courier-imap-ssl spamassassin wget spamc sa-exim -> Follow the setup steps there Check a local address: exim4 -bt local_user@example.com Check sending mail: alzental-castle:~# exim4 -v rdorsch@web.de From: user@your.domain To: mailbox_you_can_check@dom.ain Subject: Testing exim Testing exim . SMTP auth: ---------- Client side (exim4): edit /etc/exim4/passwd.client (note: the reverse DNS lookup needs to work for the SERVER address, this file will be indexed with the result of a reverse DNS lookup!) Server side: http://www.debian-administration.org/articles/280 HowTo Setup Basic SMTP AUTH in Exim4 In addition to the setup described there: 1.) Be sure that rng-tools - Daemon to use a Hardware TRNG is installed. 2.) Be sure to read the This comment: If you are using split file configuration: * the plain_server entry can be found in /etc/exim4/conf.d/auth/30_exim4-config_examples * add the "MAIN_TLS_ENABLE = true" line to the file /etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs There might be a problem on hosts with little entropy # sysctl -n kernel/random/entropy_avail 63 A detailed discussion is here: http://www.mail-archive.com/debian-bugs-rc%40lists.debian.org/msg21083.html Debug SMTPAUTH: --------------- From a client: swaks --tls --auth --to rdorsch@web.de --server alzental-castle.de Test for an open relay: ----------------------- From the server which should be tested: telnet relay-test.mail-abuse.org spamassassin: ------------- /usr/bin/sa-learn: skips large messages reduces memory consumption (should be fixed in spamassassin 3.1) # 'opt_all' => 1, 'opt_all' => 0, control what large message means in /usr/share/perl5/Mail/SpamAssassin/ArchiveIterator.pm < #use constant BIG_BYTES => 256*1024; # 256k is a big email < use constant BIG_BYTES => 128*1024; # 128k is a big email /etc/default/spamassassin: reduces number of spamd running, reduces memory consumption # OPTIONS="--create-prefs --max-children 5 --helper-home-dir" OPTIONS="--create-prefs --max-children 1 --helper-home-dir" spamassassin upgrade fails: --------------------------- I got Starting SpamAssassin Mail Filter Daemon: [30293] warn: server socket setup failed, retry 1: spamd: could not create INET socket on 127.0.0.1:783: Address already in use [30293] warn: server socket setup failed, retry 2: spamd: could not create INET socket on 127.0.0.1:783: Address already in use [30293] error: spamd: could not create INET socket on 127.0.0.1:783: Address already in use spamd: could not create INET socket on 127.0.0.1:783: Address already in use netstat shows bokomoko:~# netstat -ltnpv|grep 783 tcp 0 0 127.0.0.1:783 0.0.0.0:* LISTEN 17947/spamd child bokomoko:~# Cannot stop spamassassin bokomoko:~# /etc/init.d/spamassassin stop Stopping SpamAssassin Mail Filter Daemon: No /usr/bin/perl found running; none killed. spamd. bokomoko:~# check for all spamd processes (ps uaxwww|grep spamd) and kill them. Then the upgrade works. Performance tuning: =================== memory: ------- vmstat free -m processes: ---------- pstree Debian-Installer: ================= Get a debug-shell: Boot: linux BOOT_DEBUG=3 Bootup scripts: for bootfloppies, e.g. debian-installer/rootskel/src/sbin/init.bootfloppy For a JFS partition, remove -c in /lib/partman/commit.d/makefs_jfs lyx und tex2pdf: ---------------- You can add it to the converters section. Add a format pdf3 with name "PDF (tex2pdf)" to preferences->formats and a converter "latex->PDF (tex2pdf)" with converter "tex2pdf $$i" and extra flag "latex" to the converters section. Trennhilfe in LaTeX: -------------------- Trenn\-hilfe (zumindest in dinbrief). Compromise checks: ------------------ Run chkrootkit and debsums see also http://www.wiggy.net/debian/developer-securing/ Convert krec data: ================== sox -r 44100 -c 2 -s -w 123.raw 123.wav (see krec manual) Important: first select with context menu in krec, if play or record, then start in menu play or record. ./configure does not have an option for a library path: ======================================================= set the environment variables LIBRARY_PATH und C_INCLUDE_PATH Module fuer neu installierten Kernel nach-compilieren: ====================================================== - Module sourcen installieren und nach /usr/src/modules entpacken - Kernel + Sourcen installieren und in kernel source Verzeichnis wechseln cd /usr/src/linux - Config kopieren, z.B. cp /boot/config-2.4.18-1-386 .config - Versionsumgebungsvariable setzen, z.B. export APPEND_TO_VERSION="-1-386" - Module compilieren make-kpkg modules_image custom start-up / shutdown scripts: =================================== Here is an example: blackbox:/etc/init.d# cat wclientfix #!/bin/sh -e ### BEGIN INIT INFO # Provides: fixresolvconf # Required-Start: $local_fs # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Clean up wclient's resolvconf handling # Description: Used to clean up wclient's troublesome resolvconf handling ### END INIT INFO case "$1" in start) ;; stop|restart|force-reload) exit 0 ;; *) echo "Usage: $0 {start|stop|restart|force-reload}" >&2; exit 1 ;; esac [ ! -L /etc/resolv.conf ] \ && /usr/local/sbin/fixresolvconf blackbox:/etc/init.d# update-rc.d wclientfix defaults Further information, see blackbox:/etc/init.d# man insserv ppp_on_boot with DSL FritzCard: =============================== - Make sure that isdnactivecards is started before ppp rd@silverboxy:/etc/rc2.d$ ls S13isdnactivecards S14ppp S13isdnactivecards S14ppp - Make sure to give the isdnactivecards time before ppp fires up a connection. Prepend to /etc/ppp/ppp_on_boot # http://lists.suse.com/archive/suse-isdn/2002-Aug/0018.html, rd 4.7.2003 sleep 60 - Avoid additonal startup latency by sending ppp_on_boot into background rd@silverboxy:/etc/rc2.d$ diff /etc/init.d/ppp* 17c17 < /etc/ppp/ppp_on_boot & --- > /etc/ppp/ppp_on_boot 19c19 < pppd call provider --- > pppd call provider & rd@silverboxy:/etc/rc2.d$ Using an iomega zip drive: ========================== paddy:~# modprobe ppa paddy:~# cfdisk /dev/sda paddy:~# mount /dev/sda1 /mnt Moving root filesystem: ======================= - boot Debian Live - copy data - adapt /etc/fstab - if running from Debian Live assuming new root is in /mnt/root # mount -o bind /dev /mnt/root/dev # mount -o bind /sys /mnt/sys # mount -t proc /proc /mnt/proc # chroot /mnt/root - Update master boot record # grub-install /dev/sda - Update grub config # update-grub Running system with root filesystem not in bios bootable area: ============================================================== Make a mini partition /boot (approx. 30 MB) in the bios bootable area. The Debian standard configuration then guarantees that the initrd.img, vmlinuz, the map file and the boot file are in /boot. Adding a KDE menu entry: ======================== see ~/.kde/share/applnk/ for examples Reconnecting kopete (KDE3): =========================== see http://wiki.suspend2.net/HibernateScript?action=AttachFile&do=get&target=kopete su $XUSER -c "$DCOP_BIN kopete KopeteIface connectAll" dcop kopete KopeteIface disconnectAll dcop kdesktop KScreensaverIface lock dcop browser: kdcop dbus equivalent for KDE4: ========================= #set messenger status qdbus org.kde.kopete /Kopete org.kde.Kopete.setOnlineStatus Online # set power mode qdbus org.kde.powerdevil /modules/powerdevil setProfile Presentation # Stop kmail network activities qdbus org.kde.kmail /KMail org.kde.kmail.kmail.stopNetworkJobs # resume kmail network activities qdbus org.kde.kmail /KMail org.kde.kmail.kmail.resumeNetworkJobs kpowersave: =========== KDE3 tool, replaced by powerdevil in KDE4 uses pm-utils To restart network with kpowersave add a hook to the pm power management rd@dell:/tmp$ cat /etc/pm/sleep.d/network #!/bin/bash if [ $1 = "suspend" -o $1 = "hibernate" ]; then ifdown wlan0 2> /tmp/pmdown.log else ifup wlan0 2> /tmp/pmup.log fird@dell:/tmp$ for more details see /usr/share/doc/pm-utils/HOWTO.hooks.gz powerdevil: =========== in kdebase-workspace-bin kdebase-workspace-bin: /usr/share/kde4/services/kded/powerdevil.desktop kdebase-workspace-bin: /usr/share/kde4/services/plasma-runner-powerdevil.desktop kdebase-workspace-bin: /usr/share/kde4/services/powerdevilconfig.desktop Interface through "System Settings -> Advanced -> Power Management" plasmoids: ========== Managing plasmoids: rd@blackbox:~$ plasmapkg --help Verwendung: plasmapkg [Qt-Optionen] [KDE-Optionen] [Optionen] Installieren, Auflisten und Entfernen von Plasma-Paketen Allgemeine Optionen: --help Hilfe zu verfügbaren Optionen anzeigen --help-qt Spezielle Optionen zu Qt anzeigen --help-kde Spezielle Optionen zu KDE anzeigen --help-all Alle Optionen anzeigen --author Autoren-Information anzeigen -v, --version Versionsinformation anzeigen --license Lizenz-Informationen anzeigen -- Ende der Optionen Optionen: -g, --global Zum Installieren oder Entfernen, beeinflusst Plasma-Pakete für alle Benutzer. -t, --type Der Pakettyp, z. B. Design, Hintergrundbild, Plasmoid, Datenquelle, Starter usw. [plasmoid] -i, --install Paket von installieren -u, --upgrade Paket von aktualisieren -l, --list Installierte Pakete anzeigen -r, --remove Paket namens entfernen -p, --packageroot Absoluter Pfad zum Paket. Falls nicht angegeben, werden die Standard-Datenpfade dieser KDE-Sitzung durchsucht. rd@blackbox:~$ Local plasmoids get installed in /home/rd/.kde/share/apps/plasma/plasmoids/ testing a single plasmoid: -------------------------- plasmoidviewer sipgate-plasmoid acpi: ===== http://www.thinkwiki.org/wiki/How_to_configure_acpid suspend: ======== kpowersave does a good job. User needs to be in powerdev group. Previous information: apt-get install uswsusp enable ususpend for hibernating: -> /etc/hibernate/hibernate.conf: #TryMethod suspend2.conf TryMethod ususpend-both.conf -> Make hotkey to acpi events by creating paddy:/etc/acpi/events# cat /etc/modprobe.d/ibm-acpi options ibm_acpi experimental=1 hotkey=enable,0xffef paddy:/etc/acpi/events# (see http://www.kai-hildebrandt.de/linux/thinkpad/tp_acpi.html) -> Add events for hibernate and sleep paddy:/etc/acpi/events# cat hibernate event=(button/power|ibm/hotkey HKEY 00000080 0000100c) action=/usr/sbin/hibernate -F /etc/hibernate/hibernate.conf paddy:/etc/acpi/events# cat sleep # button/lid reflects closing the laptop monitor event=(button/lid|button/sleep|ibm/hotkey HKEY 00000080 00001004) action=/usr/sbin/hibernate -F /etc/hibernate/sleep.conf paddy:/etc/acpi/events# -> restart acpid paddy:/etc/acpi/events# /etc/init.d/acpid restart Optionally: disk only hibernate on Fn-F11: paddy:~# cat /etc/hibernate/hibernate-disk-only.conf # hibernate.conf is split into separate configuration files. # # Each file is tried in the order below, until an available suspend # method is found. # # Options specific to a particular suspend method should be placed in the # appropriate configuration file (suspend2.conf, ususpend.conf, disk.conf # or ram.conf). # Options common to all suspend methods should be placed in common.conf. # # See hibernate.conf(5) for help on the configuration items. #TryMethod suspend2.conf #TryMethod ususpend-both.conf TryMethod ususpend-disk.conf TryMethod disk.conf TryMethod ram.conf paddy:~# cat /etc/acpi/events/hibernate-disk-only event=(button/power|ibm/hotkey HKEY 00000080 0000100b) action=/usr/sbin/hibernate -F /etc/hibernate/hibernate-disk-only.conf paddy:~# For resuming from hibernate-to-disk through initramfs: ====================================================== Add swap partition to resume file blackbox:~# cat /etc/initramfs-tools/conf.d/resume # RESUME=/dev/sdb2 RESUME=/dev/disk/by-uuid/cfac727c-78d3-4c20-8e08-1a599d42a117 blackbox:~# and blackbox:~# cat /etc/uswsusp.conf # /etc/uswsusp.conf(8) -- Configuration file for s2disk/s2both resume device = /dev/disk/by-uuid/cfac727c-78d3-4c20-8e08-1a599d42a117 compress = y early writeout = y image size = 974180433 RSA key file = /etc/uswsusp.key shutdown method = platform blackbox:~# After making changes run # update-initramfs -u Running bash instead of init: ============================= give kernel option init=/bin/bash. Will end up in a shell with the root filesystem mounted Transfering apt-proxy data: =========================== Make sure that the proxy data (/var/cache/apt-proxy) are owned by aptproxy:nogroup. Note: chown -R does not follow symbolic links. Sims with Linux: ================ Sims uses a safedisc copy protection. Thus the game can't be started with the winex from CVS. It is rumored that the commercial winex has a circumvention for this copy protection. Apache2: ======== Log reverse dns lookup hostnames: --------------------------------- bokomoko:~# grep HostnameLookups /etc/apache2/apache2.conf # HostnameLookups: Log the names of clients or just their IP addresses HostnameLookups On bokomoko:~# Apache: ======= Make sure to have in /etc/apache/httpd.conf the servername set to the FQDN Make sure to set the hostname Make sure to have in /etc/hosts the IP address with the hostname and the FQDN Setting up access control: -------------------------- 1. Set the AllowOverride correct for the permission controlled directory tree: Options SymLinksIfOwnerMatch AllowOverride All 2. Create a .htpasswd file htpasswd -c /vaw/www/ruth-und-markus/.htpasswd rd Add users without the -c (create) option !!! 3. Create a .htaccess file in the directory to protect: AuthUserFile /var/www/ruth-und-markus/.htpasswd AuthType Basic AuthName "Benutzerkennung des Redakteurs" require valid-user Apache2: ======== Add a site: /etc/apache2/sites-available/ e.g. km21811-02:/var/lib/wiki# cat /etc/apache2/sites-available/moinwiki ServerName wiki.bokonew.homelinux.org DocumentRoot /var/www/wiki/ Alias /moin_static171/ "/usr/share/moin/htdocs/" ScriptAlias /Wiki "/var/www/wiki/moin.cgi" km21811-02:/var/lib/wiki# make site available: a2ensite moinwiki (creates link in /etc/apache2/sites-enabled) Burning CD from MP3s or oggs: ============================= see ~/bin/mp32cdrdao Before finally burning, the cdrdao command may be called with the command show-toc instead of write to check the length of CD to be written. Another useful command is certainly simulate instead of write. It is somewhat confusing that cdrao reports a length of e.g. 77 min and a data volume of 782 MB. How does that match with the CD specification 700MB/80min? Linux MP3 CD Burning mini-HOWTO Greg Wierzchowski http://www.freenix.fr/unix/linux/HOWTO-vo/mini/MP3-CD-Burning Hints on ripping and burning data, audio and special (like PSX) CDs http://reviewed.homelinux.org/howtos/cdrecording/ Ripping Audio CDs: ================== grip is a good tool for that. To get it working I did chgrp cdrom /dev/sg; chmod g+rw /dev/sg0 (try sg1 on silverboxy for normal CD. groups on google say that sg is the generic interface to scsi cdroms which is rarely used, but grip cdparanoia uses it) For some reason I had to put the audio CD into my cdburner (which is /dev/sr0). Generating ogg files: ===================== - install grip - %t is the sound track number on cd. Needs to be changed for .wav and .ogg files - Check bit rate - run rip and encode - on silverboxy: use /dev/cdrw Copying audio CDs: ================== From "man cdrecord" To copy an audio CD in the most accurate way, first run cdda2wav dev=ATA:1,1,0 -vall cddb=0 -B -Owav and then run cdrecord dev=ATA:1,0,0 -v -dao -useinfo -text *.wav To copy an audio CD from a pipe (without intermediate files), first run cdda2wav dev=ATA:1,1,0 -vall cddb=0 -info-only and then run cdda2wav dev=ATA:1,1,0 -no-infofile -B -Oraw - | \ cdrecord dev=ATA:1,0,0 -v -dao -audio -useinfo -text *.inf CDDA2WAV DID NOT WORK SO FAR. USE GRIP TO GENERATE WAVS INSTEAD. Having Umlauts on an US-Keyboard: ================================= With xmodmap rd@blackbox:~/.kde/Autostart$ cat xsetup #!/bin/sh xmodmap ~/.Xmodmap xbindkeys rd@blackbox:~/.kde/Autostart$ cat /home/rd/.Xmodmap ! The first four keysyms are reached as follows: ! 1. The decision between keysym1 or keysym2 (and keysym3 or keysym4) ! is done by the key with the keysym Shift_[LR] (or maybe by the key ! with the modifier bit keysym ! 2. The decision between the keysym1/keysym2 and keysym3/keysym4 group is ! done by the key with generates the Mode_switch keysym (which is in this ! case the left Alt key). keycode 30 = u U udiaeresis keycode 32 = o O odiaeresis keycode 38 = a A adiaeresis keycode 39 = s S ssharp keycode 0x1A = e E EuroSign cent keycode 108 = Mode_switch ! page forward/backward in konqui keycode 234 = XF86Back keycode 233 = XF86Forward !keycode 233 = Delete !keycode 174 = XF86AudioLowerVolume !keycode 176 = XF86AudioRaiseVolume !keycode 162 = XF86AudioPlay !keycode 144 = XF86AudioPrev !keycode 153 = XF86AudioNext !keycode 168 = XF86AudioMedia ! change forward and backward - with squeeze not required anymore !pointer = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 rd@blackbox:~/.kde/Autostart$ With xkb: For a basic description of xkb see http://www.charvolant.org/~doug/xkb/html/index.html "An Unreliable Guide to XKB Configuration Doug Palmer" $ cat /etc/X11/xkb/symbols/us_rainer partial default hidden alphanumeric_keys modifier_keys // definition of Euro-style, Right "logo" key == [Mode_switch, Multi_key] xkb_symbols "pc104eurorainer" { include "us(pc104)" key { [ Mode_switch ] }; key { [ Multi_key ] }; key { [ u, U ], [ udiaeresis, Udiaeresis ] }; key { [ o, O ], [ odiaeresis, Odiaeresis ] }; key { [ a, A ], [ adiaeresis, Adiaeresis ] }; key { [ s, S ], [ ssharp ] }; key { [ e, E ], [ EuroSign, cent ] }; }; First brackets of a key give the first group, second bracket the second group. The switch between first and second group is defined in the compat section: group 2 = AltGr; group 3 = AltGr; group 4 = AltGr; Loading the keymap $ setxkbmap -symbols us_rainer Adding fonts to X: ================== Copy the fonts in a directory, then cd /opt/fonts/ttf ttmkfdir > fonts.scale mkfontdir edit the file /etc/X11/fs/config (or /etc/X11/xfs/config), find the line which starts with "catalog=", and add your directory at the end of the list, separated by a comma. Reload the fonts into the fontserver /etc/init.d/xfs reload xlsfonts should list the new fonts. For details see: Installing Truetype Fonts in Linux One of the nice features of Windows is that there are many high-quality fonts available for it. This article explains how to use these Truetype fonts under Linux. Author: Ramon Casha Connection to a host behind a firewall via an ssh tunnel: ========================================================= On the host behind the firewall ssh -A -R 8642:localhost:22 -l kristina -N host.before.the.firewall.com On the host before the firewall, then do ssh -p 8642 localhost Start a remote vnc server behind a firewall: ============================================ remote server (tightvncserver does not work with notes!): rdorsch@paddy:/opt/ibm/lotus/notes$ vnc4server New 'paddy:1 (rdorsch)' desktop is paddy:1 Starting applications specified in /home/rdorsch/.vnc/xstartup Log file is /home/rdorsch/.vnc/paddy:1.log rdorsch@paddy:/opt/ibm/lotus/notes$ rdorsch@paddy:~$ ssh -A -R 5951:localhost:5901 -l rd -N 9.167.218.48 local machine: xtightvncviewer localhost:51 Encrypt vnc session via ssh to a remote server: =============================================== ssh -A -C -L 5951:localhost:5901 -N bokomoko.de xtightvncviewer :51 Find out uuid: ============== (see also http://debian-user.blogspot.com/2007/05/uuid-instead-of-devsda1.html) /sbin/blkid function to get information /bin/blkid /dev/sda1 or /lib/udev/vol_id /dev/sda2 or ls -l /dev/disk/by-uuid/ or udevinfo -q all -n /dev/nameX Use uuid: ========= in /etc/fstab: replace /dev/.. by UUID=.. , e.g. UUID=471d84b1-eb6c-47d7-9ad3-1b137828ece9 / ext3 errors=remount-ro 0 in /boot/grub/menu.lst: replace root=/dev/.. by root=UUID=.. kopt=root=UUID=471d84b1-eb6c-47d7-9ad3-1b137828ece9 ro quiet then update-grub to update entires per kernel for swap it is important to create a label during mkswap, this also creates a UUID which can then be queried with blkid: blackbox:~# mkswap -L SWAP /dev/sda2 Setting up swapspace version 1, size = 4096184 kB LABEL=SWAP, UUID=cfac727c-78d3-4c20-8e08-1a599d42a117 blackbox:~# For grub2 /boot/grub/menu.lst became -> /boot/grub/grub.cfg Use /etc/grub.d/40_custom to customize the boot process Changing screen resolution: =========================== xrandr -q shows available resolutions xrandr -s switches resolution Eclipse: ======== Run with non-standard jvm: Configure in /etc/eclipse/java_home Install java 1.6 ---------------- aptitude -t etch-backports install sun-java6-jdk Backports: ========== Updated iceweasel: http://mozilla.debian.net/ $ wget -O- -q http://mozilla.debian.net/archive.asc | gpg --import $ gpg --export -a 06C4AE2A | sudo apt-key add - Exporting a directory with a knoppix CD: ======================================== remove /etc/hosts.allow and /etc/hosts.deny Make /etc/exports /mnt/abc 9.152.251.77(rw,async) /etc/init.d/portmap stop /etc/init.d/networking restart /etc/init.d/portmap start /etc/init.d/nfs-common start /etc/init.d/nfs-kernel-server start Creating GnuCash Reports: ========================= It is possible to write reports if the current ones are not suitable. To do this you will need to know Scheme (a LISP-like programming language), and it is an excellent idea to have a copy of the GnuCash source code available. The reporting interface is documented in the source code file src/report/report-system/doc/report-html.txt. The file src/scm/report/hello-world.scm in the GnuCash source distribution provides a good example of how reports are developed. It is also necessary to access data from the engine to get information for your report. This is performed by a set of Scheme wrapper functions that are documented in the file src/g-wrap/gnc.html. Examine some of the other reports in src/scm/report for an indication of how they are used. At present, reports are produced by calling a HTML-generation API, which outputs a dialect of HTML and rendering this with a HTML widget. This has limitations, particularly when trying to align objects precisely, as might be necessary for printing onto pre-printed invoices for example. Open an X Window after su: ========================== aamer$ su - Password: root# export DISPLAY=:0 XAUTHORITY=~aamer/.Xauthority root# emacs & # Like this, emacs? I don't use it. [2532] root# Auerswald COMpact 2104 and Linux: ================================= For the management Software, install jdk1.1 and rd@silverboxy:~/Auerswald$ cat JavaVersion1.1.rc # Festlegen von JAVA_HOME auf Java Version 1.1.8 JAVA_HOME=/usr/lib/jdk1.1/ rd@silverboxy:~/Auerswald$ In order to run SoftLcr, group ownership of /var/lock needs to be changed j2re1.3 and lib-rxtx-java needs to be installed. # chgrp uucp /var/lock (this is a bug in lib-rxtx-java). for sarge: before starting: export LD_ASSUME_KERNEL=2.4.1 Kernel 2.6: =========== For usbmouse: load usbcore, uhci-hcd, usbmouse (discover should load uhci-hcd sooner or later automatically, check with 'discover --modules all') For PS/2 mouse: load psmouse, mousedev (?) modprobe mousedev psaux=1 does still create the /dev/psaux device LCD screen has unreadable console: ================================== Add vga=ask to lilo.conf and check which resolutions are offered. Adding a second internet connection: ==================================== The intention is to use a free low bandwidth internet connection for long downloads. 1. Setup a new provider connection (e.g. using pppconfig) 2. Dialin (pppd call , e.g. pppd call isdn/freenetXXL) 3. Now the route looks like this silverboxy:/var/cache/apt-proxy/debian# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 217.5.98.157 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0 62.104.220.33 0.0.0.0 255.255.255.255 UH 0 0 0 ppp1 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 217.5.98.157 0.0.0.0 UG 0 0 0 ppp0 silverboxy:/var/cache/apt-proxy/debian# (note: an address is forwarded through an interface if the ip address masked with the netmask, here Genmask, matches the Destination IP. 0.0.0.0 means there is no gateway.) There are two internet connections with ppp0 and ppp1. By default routing is done over ppp0. 4. Add destinations routed over ppp1 route add -net ftp.uk.debian.org netmask 255.255.255.255 gw 62.104.220.33 dev ppp1 route add -net ftp.de.debian.org netmask 255.255.255.255 gw 62.104.220.33 dev ppp1 route add -net ftp2.de.debian.org netmask 255.255.255.255 gw 62.104.220.33 dev ppp1 5. Adapt shorewall by adding the interface into /etc/shorewall/interfaces: #ZONE INTERFACE BROADCAST OPTIONS net ppp0 detect dhcp net ppp1 detect dhcp and setup masquerading /etc/shorewall/masq #INTERFACE SUBNET ADDRESS ppp0 eth0 ppp1 eth0 6. To be sure that everying works check with tcpdump -i ppp1 if the desired traffic goes over ppp1. smtp-auth using exim3: ====================== Kapitel 3 im Debian Howto: 3. SMTP-Auth unter Exim http://www.debianhowto.de/howtos/de/exim3/c_exim3.html#exim_auth Wichtig: nicht die default Konfiguration im exim serverseitg verwenden, die ist fehlerhaft. Example configuration: Server: atc2 Client: atc For tls authentication (all the communication is encrypted), I added to the main config settings: # begin rd additon # from http://jeremy.zawodny.com/blog/archives/000453.html # Anyone can relay if they auth first. And auth must happen over SSL. #host_auth_accept_relay = * # SSL/TLS cert and key tls_certificate = /usr/local/cert/exim.cert tls_privatekey = /usr/local/cert/exim.key # Advertise TLS to anyone tls_advertise_hosts = * # Require auth over SSL only. auth_over_tls_hosts = * #end rd additon To enable plain, login and cram-md5 authentification, I added plain: driver = plaintext public_name = PLAIN server_condition = "\ ${if and {{!eq{$2}{}}{!eq{$3}{}} \ {crypteq{$3}{${extract{1}{:} \ {${lookup{$2}lsearch{/etc/exim/passwd}{$value}{*:*}}}}}}}{1}{0}}" server_set_id = $2 login: driver = plaintext public_name = LOGIN server_prompts = User Name : Password server_condition = "\ ${if and {{!eq{$1}{}}{!eq{$2}{}} \ {crypteq{$2}{${extract{1}{:} \ {${lookup{$1}lsearch{/etc/exim/passwd}{$value}{*:*}}}}}}}{1}{0}}" server_set_id = $1 crammd5: driver = cram_md5 public_name = CRAM-MD5 server_secret = ${if !eq{$1}{}{${extract{1}{:} \ {${lookup{$1}lsearch{/etc/exim/passwd-cram-md5}{$value}{*:*}}}}}fail} server_set_id = $1 cram-md5 avoids transfering passwords by -> server sends challenge -> client adds password to challenge and calc md5sum -> client sends username and md5sum back -> server takes username and looks up password -> server adds password to challenge and calc md5sum -> server compares calculated and received md5sum cram-md5 is not strictly required, since the connection is encrypted itself. login and plain just differ in the protocol the username and passwort is transfered. exim allows to store the password in an encrypted form and encrypted passwords are compared. Details in http://jeremy.zawodny.com/blog/archives/000453.html http://www.us.exim.org/exim-html-3.30/doc/html/spec_toc.html (Section 35 to 38) Exim4 and smtp-auth =================== for the client side: use a reverse DNS domainname for smarthost *and* in passwd.client mail on unanswered calls: ========================= According to callerid.conf(5), you can pass the duration of the connection as \$5 to your script. It should be 0 at hangup in case of an unanswered call. iee.tv Broadcasts anschauen: ============================ Open Synopsis in separate window and check for presentation http://iee.datmedia.co.uk/datpresenter/player/archive_.php?admin=&presentation=179&category=DATE04 Open http://iee.datmedia.co.uk/datpresenter/player/ex_.php?presentation=179&bw=&media=real Show source of this (empty) page and get the rtsp://213.129.94.251:554/newiee/paris/intel/video.rm and the jpg slides. May be downloaded using mencoder -oac mp3lame -ovc xvid rtsp://213.129.94.251:554/newiee/paris/eda/rhines/video.rm -o cadence.divx xine may also be used, but it dumps a format which may only be read by xine itself: gxine rtsp://213.129.94.251:554/newiee/paris/intel/video.rm#save:foo.rm Add in .gxine/config # Pfad zum Sichen von Datenstroemen # string, default: misc.save_dir:/home/rd/ #define SAVING_ALWAYS_PERMIT might be added xine-lib/src/xine-engine/input_rip.c Playing ISOs of DVDs: ===================== kaffeine dvd://home/rdorsch/SW.nobackup/ISOs/swing_stick.iso Copying DVDs and Creating ISOs of DVDs: ======================================= k9copy Use fullscreen mode in xine with XVideo: ======================================== (g)xine -V Xv Compiling xine/gxine: ===================== xine: ----- ./configure --prefix=/opt/xine-1.1.1 make make install gxine: ------ ./configure --prefix=/opt/gxine-0.5.4 --with-xine-prefix=/opt/xine-lib-1.1.1 make make install Taxman: ======= /opt/tax/2004/wine muss auf das richtige Wine-Verzeichnis zeigen In ~/.tax2004env NOTESVERSION=wine-20040408 export PATH=/opt/$NOTESVERSION/bin:$PATH export LD_LIBRARY_PATH=/opt/$NOTESVERSION/lib:$LD_LIBRARY_PATH hinzufÂŽ|gen, dann /opt/tax/2004/c/steuer2003.sh oder direkt aus KDE Menu. Internetupdates sind in /opt/tax/2004/c/programme/tax2004/Updates/ Mail for unanswered (ISDN) calls: ================================= devfs and udev might interfere with isdnutils by not creating /dev/isdn/isdninfo Setup /etc/isdn/isdnlog.isdnctrl0. Explicitly enable external programs in /etc/isdn/isdnlog.isdnctrl0: start=yes # enable program start on events Setup a /etc/isdn/callerid.conf (see also man callerid.conf) [MSN] NUMBER = 07032xxx ALIAS = R&K Telefon # ZONE = 1 # SI = 1 START = { [FLAG] FLAGS = I|C|U USER = rd GROUP = rd # \$1 flags that caused execution, e.g. "IR", # "OC". There are always exactly two characters # \$2 Caller number (complete with area code). # \$4 Time the connection started. Example: # "Wed May 28 23:07:44 1997". # Contains "?" if there is no connection yet # (e.g. still at RING phase). # \$5 Duration of connection up to now (in sec # onds). # \$17 Caller town (derived from area code). # \$19 Caller alias. PROGRAM = /usr/local/bin/unanswered_calls \$1 \$2 \$5 \$17 \$19 connect [FLAG] FLAGS = I|H USER = rd GROUP = rd PROGRAM = /usr/local/bin/unanswered_calls \$1 \$2 \$5 \$17 \$19 } [NUMBER] NUMBER = 0179xxx ALIAS = Rainers Handy Finding unused libraries in Debian: =================================== Run deborphan Creating Debian Packages: ========================= If you are the sort of person who often installs stuff from source, then you might like checkinstall. Basically instead of: make install you run: sudo checkinstall -D make install It asks you a couple of simple questions and it generates a debian package. I'm a Perl hacker so I've been using it to create packages of cutting-edge modules from CPAN. Hope this proves as useful to others on this list as it has to me. Emacs: ====== Box operations: --------------- kill-rectangle yank-rectangle string-rectangle open-rectangle the ve all operation: --------------------- M-x occur insert date: ------------ ;; insert date on f3 (defun insert-date () "Insert the current date according to the variable \"insert-date-format\"." (interactive "*") (insert (format-time-string insert-date-format (current-time)))) (global-set-key [f3] 'insert-date) set default font: ----------------- X11 users can also use X resources by adding a line of the form Emacs.Font: fixed to their .Xdefaults file, and running xrdb -merge ~/.Xdefaults another valid font choice is e.g. 10x20 In sed Zeichen durch Zeilenumbruch ersetzen: ============================================ Author: Florian Diesch sed -e's/./\ /' Ersetzt jedes beliebige Zeichen durch einen Zeilenumbruch ;-) Ist in der Kommandoyeile schwierig anzugeben (wie sag ich der Shell, dass sie Newline nicht interpretieren, sondern an das Kommando uebergeben soll?), im Skript geht das aber, sieht aber recht haesslich aus... Geht in der tcsh natuerlich mit Ctrl-V Return (RD: Bedingt!) sed arbeitet line basiert, d.h. kann mit sed nie durch was anderes ersetzt werden. Aber mit perl... Zeilen mit sed entfernen: ------------------------- sed -e '/^123/d' Replace newline by another character: ===================================== tr "\n" "g" where g is the other character (could be also a space character). or \ with another string or remove it cat Test.alias | perl -pi -e "s/\\\\\n//" lower and upper case: ===================== rd@silverboxy:~/Managed/LinuxInst$ echo "1fab" | tr [:lower:] [:upper:] 1FAB rd@silverboxy:~/Managed/LinuxInst$ bcm43xx ======== apt-get install bcm43xx-fwcutter wpasupplicant iface eth1 inet dhcp wpa-driver wext wpa-ssid Herbert # plaintext passphrase wpa-psk DahwooB2weew6cho teTeX configuration =================== To solve the "capacity exceeded problem" as root on debian (woody): edit /etc/texmf/texmf.d/95NonPath, set pool_size = 1250000 hash_extra = 50000 run # update-texmf Run X application as root: ========================== gksu "/path/to/applcation" Running vbox: ============= devfs and udev might interfere with isdnutils by not creating /dev/isdn/isdninfo References: ISDN Answering Machine http://www.linuxnetmag.com/en/issue2/m2vbox1.html (use this as start) Setting up vbox 3 step by step howto ... or how to setup vbox (3.0B1) step by step on debian http://mars.f4.fhtw-berlin.de/~s0507007/vbox-howto.html vbox must be started in /etc/isdn/vboxgetty.con e.g. # Settings for port ttyI6 port /dev/ttyI6 modeminit ATZ&B512&E919495 user vboxdaemonuser group users spooldir /var/spool/vbox/vboxdaemonuser vboxconfig /home/vboxdaemonuser/.vbox.conf The .vbox.conf file contains basic configurations for when to answer a call, which message to play, etc.. /var/spool/vbox/vboxdaemonuser/standard.tcl in spooldir is called for each incoming call. standard.tcl then also defines the programs to be called (which might send emails or convert the sound files to be loaded to an web server). Recording an audio file: (in woody need to edit /usr/bin/rec: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=143262&repeatmerged=yes) rec -v 3 -s b -r 8000 .wav For playing [artsdsp] play .au Converting to something vbox understands: $ sox .wav -b -U -c 1 -r 8000 .au Parameters stand for 1 Kanal, Byte, mu-Law, 8 kHz (kann der arme Sox ja nicht raten) Von AU nach VBOX geht es dann mit autovbox -n rainer -4 < .au > .msg On silverboxy: - Messages in /var/spool/vbox/ttyI6/messages - Configuration in /home/vboxdaemonuser/.vbox.conf - ~vboxdaemonuser/bin/vboxmail.local is called for each call - ~vboxdaemonuser/vbox2ogg generates ogg files on web page Set the default output device: ============================== /etc/libao.conf Can be used to set the default output device for all libao programs. e.g. default_driver=arts Reduce the timeout retries for getting an DHCP Address: ======================================================= Add e.g. to /etc/dhclient.conf timeout 10; Knoppix, fonts, laptop: ======================= if knoppix fonts look bad on a laptop use a framebuffer (e.g. boot option fb1280x24 without knoppix) Perl as sed replacement: ======================== echo "bla.123" | perl -p -e 's/[a-z]+/123/g' or perl -pi.bak -e "s/Old text/New text/g" file1 file2 file3 -p tells perl to assume a simple loop around the code we give it to run. -i.bak tells perl that we wish to create backups of the files we modify with the suffix .bak. -e "..." tells perl that we wish to execute the code inside the quotes. And finally the file list is the list of files that we wish to operate upon. alternative: rpl package: rpl "Old String" "New String" file1 file2 ... fileN You can run it recursively with the "-R" option, as well as limiting it to working recursively upon only files of a given suffix. For example the following command will recursively make changes only to files which are named *.html: rpl -R -x .html "Steve" "Steve Kemp" * Old debian packages: ==================== snapshot.debian.net Please use the registry key HKEY_CURRENT_CONFIG\Software\Fonts\LogPixels to set the screen resolution and remove the "Resolution" entry in the config file export WINEPREFIX=${HOME}/notes6client wine regedit notes.ini: Display_font_adjustment=2 TOP50: ====== /dvd must be installed as drive E: Running sensors: ================ apt-get install lm-sensors run sensors-detect # senors gives the result of the sensors hwclock problems: ================= Setting system clock. select() to /dev/rtc to wait for clock tick timed out * unable to set system clock to .... Solution: rd@blackbox:/etc/init.d$ diff hwclockfirst.sh.orig hwclockfirst.sh 31c31 < HWCLOCKPARS= --- > HWCLOCKPARS=--directisa rd@blackbox:/etc/init.d$ diff hwclock.sh.orig hwclock.sh 31c31 < HWCLOCKPARS= --- > HWCLOCKPARS=--directisa rd@blackbox:/etc/init.d$ Running cpufreq: ================ Load modules: # cpu frequency control cpufreq_userspace freq_table cpufreq_powersave p4-clockmod (for P4) install and run powernowd # cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq 299992 Monitoring javascript requests: =============================== Use Mozilla or Netscape 7 and install an extension http://livehttpheaders.mozdev.org/ which monitors the HTTP traffic. e.g. http://www20.germanwings.com/skylights/cgi-bin/skylights.cgi POST /skylights/cgi-bin/skylights.cgi HTTP/1.1 Host: www20.germanwings.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040823 Firefox/0.9.3 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://www20.germanwings.com/skylights/cgi-bin/skylights.cgi?travel_type=0§or1_o=STR§or1_d=BCN§or_1_d=16§or_1_m=092004§or_2_d=19§or_2_m=092004&language=EN&module=SB&mode=FEUR&ADULT=02&CHILD=00&INFANT=00 Cookie: Apache=80.138.147.69.356981093783520545 Content-Type: application/x-www-form-urlencoded Content-Length: 327 travel_type=on§or1_o=aSTR§or1_d=BCN§or_1_d=16§or_1_m=092004§or_1_range=0000§or_2_d=00§or_2_m=000000§or_2_range=0&ADULT=02&CHILD=00&INFANT=00&m1DO=00&m2DO=&m1DP=00&rP=&m2DP=0&language=EN&pT=02ADULT00CHILD&mode=FEUR&module=SB&tc=1&nom=1&openjaw_flag=true&page=SELECT&pM=0&m1=20040916STRBCN&oP=&m2= HTTP/1.x 200 OK Date: Sun, 29 Aug 2004 13:08:03 GMT Server: Apache/1.3.27 (Unix) Vary: * Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html Content-Encoding: gzip Content-Length: 5853 would evaluate to http://www20.germanwings.com/skylights/cgi-bin/skylights.cgi?travel_type=on§or1_o=aSTR§or1_d=BCN§or_1_d=16§or_1_m=092004§or_1_range=0000§or_2_d=00§or_2_m=000000§or_2_range=0&ADULT=02&CHILD=00&INFANT=00&m1DO=00&m2DO=&m1DP=00&rP=&m2DP=0&language=EN&pT=02ADULT00CHILD&mode=FEUR&module=SB&tc=1&nom=1&openjaw_flag=true&page=SELECT&pM=0&m1=20040916STRBCN&oP=&m2= (to get the right request, going to the bottom of the httphead and search backwards for "Content-Type: text/html" worked well so far) Multiple session within KDE: ============================ "start new session" button in kscreensaver Enable them in /etc/kde3/kdm/Xservers Unique names of usb devices: ============================ (i.e. a specific usb storage device should always get the same device identifier) see also "USB Flash Memory HOWTO" http://www.tldp.org/HOWTO/Flash-Memory-HOWTO/linux-2.6.html section 12.4 Install sysfsutils-0.4.0 or later hotplug-2004_01_05 or later udev-016 or later find out what to add in /etc/udev/rules.d/10-local.rules systool -vb scsi | grep vendor e.g. # Additions for silverboxy ## USB disk BUS="scsi", SYSFS_vendor="USB 2.0*", NAME="usbdisk%n" ## Pentax Optio 33S disk BUS="scsi", SYSFS_vendor="Pentax", NAME="optio%n" Then add in /etc/fstab /dev/optio1 /mnt/digicam vfat user,noauto 0 0 /dev/usbdisk1 /mnt/usbdisk ext2 user,noauto 0 0 Download CD/DVD images : ======================== jigdo-lite file.jigdo may be found on ftp://ftp.de.debian.org/debian-cd/ Checking the files manually (done by jigdo-lite by default): leo:/tmp$ zgrep MD5sum sarge-i386-1.jigdo # Template Hex MD5sum 7136fb14fd158b7e8fe69cade9f539cf leo:/tmp$ md5sum sarge-i386-1.template 7136fb14fd158b7e8fe69cade9f539cf sarge-i386-1.template Find out Monitor Data for XF86Config-4: ======================================= get-edid|parse-edid autoconfigure X in Debian: ========================== have discover, read-edid, and mdetect installed dexconf might be additonally useful Bluetooth Basics: ================= local adapter: hciconfig scan net: hcitool scan browse the channels of a device: sdptool browse pair with a device: /usr/share/doc/bluez-utils/README.Debian.gz details: http://oerks.de/tech/blueZ pair with mobile: ,-------- | invalid:/etc/bluetooth# sdptool search DUN | Inquiring ... | Searching for DUN on 00:0D:93:03:63:9D ... | Searching for DUN on 00:0E:6D:3D:96:82 ... | Service Name: Dial-up networking | Service RecHandle: 0x10023 | Service Class ID List: | "Dialup Networking" (0x1103) | "Generic Networking" (0x1201) | Protocol Descriptor List: | "L2CAP" (0x0100) | "RFCOMM" (0x0003) | Channel: 1 | Language Base Attr List: | code_ISO639: 0x656e | encoding: 0x6a | base_offset: 0x100 | Profile Descriptor List: | "Dialup Networking" (0x1103) | Version: 0x0100 | `-------- ,-------- | invalid:~# rfcomm bind 0 00:0E:6D:3D:96:82 1 | invalid:~# rfcomm show /dev/rfcomm0 | rfcomm0: 00:0E:6D:3D:96:82 channel 1 clean `-------- ,-------- | invalid:~# cat < /dev/rfcomm0 `-------- now the pin is queried on the mobile and the desktop. Recently, I used Note to the tech-savvy: If you are stuck in console and absolutely need to pair with your bluetooth device have a look at /var/lib/bluetooth//pincodes. Please note that this mode of operation is _not_ _supported_. The format is (one per line): Don't mess with files in /var/lib/bluetooth/ unless you know what you are doing. I repeat: manually adding a pincode for a remote device is NOT SUPPORTED. from /usr/share/doc/bluez-utils/README.Debian.gz After that the document /var/lib/bluetooth//linkkeys should contain the BT address of the mobile. How to quickfix bluetooth pairing in Debian linux -------------------------------------------------- http://www.sange.fi/~atehwa/cgi-bin/piki.cgi/how to quickfix bluetooth pairing in Debian linux This page was written on July 20, 2008. The actual system tested is an eeepc; those run a hacked version of Xandros, which in turn is a derivative of Debian. This information (mostly) resides in /usr/share/doc/bluetooth/README.Debian.gz too (see the section for PIN codes), but as there seems to be a lot of outdated information on the net, I decided to add to the confusion by writing this page. README.Debian.gz states that this is not supported, but I find this by far the easiest way to get pairing to work. At least for me, hcid seems to want to use a passkey agent even if /etc/bluetooth/hcid.conf has "security auto" and a passkey stanza. A message of hcid, "call_passkey_agent(): no agent registered" is a symptom of this problem, and is logged with facility daemon, errorlevel debug, which usually ends in /var/log/daemon.log but on Xandros in /var/log/daemon/daemon.debug. One way to fix this is to compile the passkey agent, but you can also just supply the PIN in /var/lib/bluetooth//pincodes. Insert a line with the remote device id (you can obtain this by hcitool scan), a space, and the PIN code, for instance like this (as root): $ echo " " > /var/lib/bluetooth//pincodes If you don't know the local device id, just do a ls -l /var/lib/bluetooth. Usually there is only one subdirectory there. Bluetooth Tethering (N900): =========================== blackbox:~# hcitool scan Scanning ... 11:22:33:44:55:66 Nokia N900 blackbox:~# sdptool browse 11:22:33:44:55:66 Browsing 11:22:33:44:55:66 ... Service Name: Headset Audio Gateway Service RecHandle: 0x10000 Service Class ID List: "Headset Audio Gateway" (0x1112) "Generic Audio" (0x1203) Protocol Descriptor List: "L2CAP" (0x0100) "RFCOMM" (0x0003) Channel: 12 Profile Descriptor List: "Headset" (0x1108) Version: 0x0102 Service Name: Hands-Free Audio Gateway Service RecHandle: 0x10001 Service Class ID List: "Handsfree Audio Gateway" (0x111f) "Generic Audio" (0x1203) Protocol Descriptor List: "L2CAP" (0x0100) "RFCOMM" (0x0003) Channel: 13 Profile Descriptor List: "Handsfree" (0x111e) Version: 0x0105 Service Name: Audio Source Service RecHandle: 0x10002 Service Class ID List: "Audio Source" (0x110a) Protocol Descriptor List: "L2CAP" (0x0100) PSM: 25 "AVDTP" (0x0019) uint16: 0x102 Profile Descriptor List: "Advanced Audio" (0x110d) Version: 0x0102 Service Name: AVRCP TG Service RecHandle: 0x10003 Service Class ID List: "AV Remote Target" (0x110c) Protocol Descriptor List: "L2CAP" (0x0100) PSM: 23 "AVCTP" (0x0017) uint16: 0x103 Profile Descriptor List: "AV Remote" (0x110e) Version: 0x0100 Service Name: AVRCP CT Service RecHandle: 0x10004 Service Class ID List: "AV Remote" (0x110e) Protocol Descriptor List: "L2CAP" (0x0100) PSM: 23 "AVCTP" (0x0017) uint16: 0x103 Profile Descriptor List: "AV Remote" (0x110e) Version: 0x0100 Service Name: Dial-Up Networking Service RecHandle: 0x10005 Service Class ID List: "Dialup Networking" (0x1103) "Generic Networking" (0x1201) Protocol Descriptor List: "L2CAP" (0x0100) "RFCOMM" (0x0003) Channel: 1 Profile Descriptor List: "Dialup Networking" (0x1103) Version: 0x0100 Service Name: Object Push server Service RecHandle: 0x10006 Service Class ID List: "OBEX Object Push" (0x1105) Protocol Descriptor List: "L2CAP" (0x0100) "RFCOMM" (0x0003) Channel: 9 "OBEX" (0x0008) Profile Descriptor List: "OBEX Object Push" (0x1105) Version: 0x0100 Service Name: File Transfer server Service RecHandle: 0x10007 Service Class ID List: "OBEX File Transfer" (0x1106) Protocol Descriptor List: "L2CAP" (0x0100) "RFCOMM" (0x0003) Channel: 10 "OBEX" (0x0008) Profile Descriptor List: "OBEX File Transfer" (0x1106) Version: 0x0100 Service Name: Nokia OBEX PC Suite Services Service RecHandle: 0x10008 Service Class ID List: UUID 128: 00005005-0000-1000-8000-0002ee000001 Protocol Descriptor List: "L2CAP" (0x0100) "RFCOMM" (0x0003) Channel: 24 "OBEX" (0x0008) Profile Descriptor List: "" (0x00005005-0000-1000-8000-0002ee000001) Version: 0x0100 Service Name: SyncML Client Service RecHandle: 0x10009 Service Class ID List: UUID 128: 00000002-0000-1000-8000-0002ee000002 Protocol Descriptor List: "L2CAP" (0x0100) "RFCOMM" (0x0003) Channel: 25 "OBEX" (0x0008) Profile Descriptor List: "" (0x00000002-0000-1000-8000-0002ee000002) Version: 0x0100 Service Name: Nokia SyncML Server Service RecHandle: 0x1000a Service Class ID List: UUID 128: 00005601-0000-1000-8000-0002ee000001 Protocol Descriptor List: "L2CAP" (0x0100) "RFCOMM" (0x0003) Channel: 26 "OBEX" (0x0008) Profile Descriptor List: "" (0x00005601-0000-1000-8000-0002ee000001) Version: 0x0100 blackbox:~# /etc/bluetooth/rfcomm.conf rfcomm0 { # # Automatically bind the device at startup bind yes; # # # Bluetooth address of the device device 11:22:33:44:55:66; # # # RFCOMM channel for the connection channel 1; # # # Description of the connection comment "N900"; } Run pppconfig and use /dev/rfcomm0 as modem interface: essentially use defaults manual changes in chatscript (klarmobil): OK at+cgdcont=1,"IP","internet.t-mobile","",0,0 OK AT+CREG=2 OK-AT-OK "ATDT*99#" manual change in peer: #speed 921600 added a connection for fonic: blackbox:/etc/ppp/peers# diff klarmobil fonic 6c6 < connect "/usr/sbin/chat -v -f /etc/chatscripts/klarmobil" --- > connect "/usr/sbin/chat -v -f /etc/chatscripts/fonic" 13,15c13,15 < user "tm" < remotename klarmobil < ipparam klarmobil --- > user "" > #remotename klarmobil > #ipparam klarmobil blackbox:/etc/ppp/peers# blackbox:/etc/ppp/peers# cat fonic # This optionfile was generated by pppconfig 2.3.18. # # hide-password noauth connect "/usr/sbin/chat -v -f /etc/chatscripts/fonic" debug /dev/rfcomm0 #460800 921600 defaultroute noipdefault user "" #remotename klarmobil #ipparam klarmobil usepeerdnsblackbox:/etc/ppp/peers# blackbox:/etc/chatscripts# diff klarmobil fonic 10c10 < OK at+cgdcont=1,"IP","internet.t-mobile","",0,0 --- > OK at+cgdcont=1,"IP","internet","",0,0 blackbox:/etc/chatscripts# blackbox:/etc/chatscripts# cat fonic # This chatfile was generated by pppconfig 2.3.18. # Please do not delete any of the comments. Pppconfig needs them. # # ispauth PAP # abortstring ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED # modeminit '' ATZ # ispnumber OK at+cgdcont=1,"IP","internet","",0,0 OK AT+CREG=2 OK-AT-OK "ATDT*99#" # ispconnect CONNECT \d\c # prelogin # ispname # isppassword # postlogin # end of pppconfig stuff blackbox:/etc/chatscripts# blackbox:/etc/ppp# tail -5 pap-secrets # * password "tm" klarmobil "tm" "" fonic "" blackbox:/etc/ppp# Bluetooth Network: ================== on each machine: # modprobe bnep on the network access point (NAP): # pand --master --listen --role NAP on the PAN user machine: (note, the connectin pin might be in /etc/bluetooth/pin) # pand --connect on the NAP: # ifconfig eth0 down # ifconfig bnep0 192.168.1.1 on the PANU machine # dhclient bnep0 Adding a hotplug script for an usb device: ========================================== Add a file /etc/hotplug/usb/libbt.usermap The file contains a line epoxbt 0x0003 0x0a12 0x0001 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 with the vendor ID (here 0x0a12) and the product ID (here 0x0001). The add the script epoxbt to the same directory: echo "Load epox bluetooth dongle..." modprobe bnep pand --master --listen --role NAP silverboxy:/etc/hotplug/usb# If the same is done on the PANU with rd@topsi:~$ cat /etc/hotplug/usb/epoxbt #!/bin/bash echo "Load epox bluetooth dongle..." modprobe bnep pand --role PANU --connect 00:04:61:81:10:DA #dhclient bnep0 rd@topsi:~$ The connection establishment requires and # ifconfig 192.168.2.1 on the NAP and # dhclient on the PANU Automatic connection setup: --------------------------- See also BlueTooth 100m USB http://quozl.netrek.org/bluetooth/ On server: Run pand by default: In /etc/default/bluez-utils # Run pand -- ethernet: creates new network interfaces bnep # that can be configured in /etc/network/interfaces # set to 1 for enabled, 0 for disabled PAND_ENABLED=1 # Act as a network access point: routes to other networks PAND_OPTIONS="--listen --persist --role NAP --pidfile /var/run/pand.pid" rd@silverboxy:~$ Add networking interface: rd@silverboxy:~$ cat /etc/network/interfaces # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) # The loopback interface auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.1 network 192.168.1.0 netmask 255.255.255.0 broadcast 192.168.1.255 iface bnep0 inet static address 192.168.2.1 netmask 255.255.255.0 rd@silverboxy:~$ Add an ifup script: silverboxy:~# cat /etc/bluetooth/pan/dev-up #!/bin/sh ifup bnep0 # Hack to serve DHCP to Bluetooth clients # see http://www.triptico.com/software/bluetooth.html # # DHCP leases are useful from a sysadmin point of view: you can forget # about maintaining boring lists of IPs and make interfaces configure # themselves. Bluetooth networks aren't different, so you can set your # dhcpd to serve IPs for your bnep clients (if authorization is # active, they are served only to PIN-authenticated clients, so you # can feel relatively safe). One caveat; bnep0 does not exist until a # connection is established, and dhcpd refuses to monitor interfaces # that don't exist. Even more, if the interface disappears because of # a connection loss, dhcpd surrenders and stop listening to it. So, I # had to add this hack to /etc/bluetooth/pan/dev-up in my access point # server, that also serves as DHCP server: /etc/init.d/dhcp restart 2>&1 > /dev/null silverboxy:~# Add masquerading tables to shorewall: silverboxy:~# grep 192.168.2 /etc/shorewall/masq ppp0 192.168.2.0/24 silverboxy:~# grep bnep0 /etc/shorewall/interfaces bt bnep0 detect silverboxy:~# grep bt /etc/shorewall/policy bt ibm REJECT info bt fw ACCEPT bt net ACCEPT fw bt ACCEPT silverboxy:~# (The files in "Adding a hotplug script for an usb device" are still active for hotplug, though that should be better implemented similar to the client side) Setting up a dhcp server: silverboxy:/etc/shorewall# cat /etc/dhcpd.conf # dhcpd.conf # # Sample configuration file for ISC dhcpd # # option definitions common to all supported networks... #option domain-name "kathrinundrainer.de"; option domain-name-servers 192.168.1.1; #option subnet-mask 255.255.255.224; default-lease-time 600; max-lease-time 7200; # Ethernet subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.100 192.168.1.150; # option broadcast-address 204.254.239.31; option routers 192.168.1.1; } # Bluetooth bnep0 subnet 192.168.2.0 netmask 255.255.255.0 { range 192.168.2.100 192.168.2.150; # option broadcast-address 204.254.239.31; option domain-name "vix.com"; option domain-name-servers 192.168.2.1; option broadcast-address 192.168.2.255; option routers 192.168.2.1; } # Bluetooth bnep1 subnet 192.168.3.0 netmask 255.255.255.0 { range 192.168.3.100 192.168.3.150; # option broadcast-address 204.254.239.31; option domain-name "vix.com"; option domain-name-servers 192.168.3.1; option broadcast-address 192.168.3.255; option routers 192.168.3.1; } On the client: Enable pand rd@topsi:~$ tail -28 /etc/default/bluez-utils ############ PAND # # Run pand -- ethernet: creates new network interfaces bnep # that can be configured in /etc/network/interfaces # set to 1 for enabled, 0 for disabled PAND_ENABLED=1 # Arguments to pand # Read the PAN howto for ways to set this up # http://bluez.sourceforge.net/contrib/HOWTO-PAN #PAND_OPTIONS="" PAND_OPTIONS="--nodetach --role PANU --search --encrypt" # example pand lines # # Act as the controller of an ad-hoc network # PAND_OPTIONS="--listen --role GN" # # Act as a network access point: routes to other networks # PAND_OPTIONS="--listen --role NAP" # # Act as a client of an ad-hoc controller with number 00:11:22:33:44:55 # PAND_OPTIONS="--role PANU --connect 00:11:22:33:44:55" # # Connect to any nearby network controller (access point or ad-hoc) # PAND_OPTIONS="--role PANU --search" rd@topsi:~$ Add a hotplug script: rd@topsi:~$ cat /etc/hotplug.d/usb/epox-bluetooth.hotplug #!/bin/sh # Hotplug script for the Epox BT-DG02A bluetooth dongle for Debian Linux 3.1 # # The dongle reports several attachments. Therefore we filter for the VERSION. # pand is started with /etc/init.d/bluez-utils, we restart bluez-utils when a # dongle is plugged in. On a coldplug (usb dongle is in the system on boot), # this hotplug script fails (called by rcS.d/S40hotplug), but the regular # bluez-utils start script rc2.d/S25bluez-utils starts pand in this case # The direct start-stop-daemon calls are legacy code and should be # removed if this setup is solid. pidfile=/var/run/pand.pid DAEMON=/usr/bin/pand CHARS=`echo $DEVPATH| wc -c` VERSION=`echo $DEVPATH|cut -c $((CHARS-3))-$CHARS` (date echo $DEVPATH echo $PRODUCT echo $TYPE echo $ACTION echo $CHARS echo $VERSION) >> /tmp/epox.log case `echo $PRODUCT|cut -d / -f 1-2` in # a12/1/525 and a12/1/828 have been seen for the Epox BT DB02A a12/1) break ;; *) exit ;; esac case $TYPE in 224/1/1) break ;; *) exit ;; esac case $ACTION in add) if [ ! -z VERSION ]; then if [ $VERSION = 1.0 ]; then # restart bluez-utils because it might not started up correctly sleep 2 # required for some reason echo Restart bluez-utils >> /tmp/epox.log /etc/init.d/bluez-utils restart >> /tmp/epox.log 2>/tmp/epox.err # start-stop-daemon --start --exec $DAEMON -- --nodetach --role PANU --search --encrypt --pidfile $pidfile >> /tmp/pand.log fi fi ;; remove) ifdown bnep0 # start-stop-daemon --stop --exec $DAEMON --pidfile $pidfile /etc/init.d/bluez-utils stop ;; esac rd@topsi:~$ This filters out one request for the interface (PRODUCT and TYPE empty) and two additional requests for the device itself: Mon Jan 3 11:37:54 CET 2005 /devices/pci0000:00/0000:00:07.2/usb1/1-2 add 42 1-2 Mon Jan 3 11:37:54 CET 2005 /devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2:1.0 a12/1/525 224/1/1 add 50 1.0 Mon Jan 3 11:37:54 CET 2005 /devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2:1.1 a12/1/525 224/1/1 add 50 1.1 Mon Jan 3 11:37:54 CET 2005 /devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2:1.2 a12/1/525 224/1/1 add 50 1.2 Make sure that hotplug brings up the bnep0 interface, by adding into /etc/network/interfaces mapping hotplug script echo map bnep0 and topsi:~# grep NET /etc/default/hotplug|grep hotplug NET_AGENT_POLICY=hotplug topsi:~# [seems that hotplug does not work, but auto does] (see /usr/share/doc/hotplug/README.Debian for details). Currently static ip addresses work out of the box, dhcp requires the hack to restart dhcpd on the server whenever bnep0 goes up (see server configuration above): topsi:~# cat /etc/network/interfaces auto lo iface lo inet loopback # This entry was created during the Debian installation auto eth0 bnep0 iface eth0 inet dhcp #iface bnep0 inet dhcp mapping hotplug script echo map bnep0 iface bnep0 inet static address 192.168.2.2 netmask 255.255.255.0 gateway 192.168.2.1 topsi:~# PIN security for bluetooth: --------------------------- Two devices need to pair (sometimes called bond) before they can talk to each other. This is done by supplying on each end point an identical pin. The pairing itself is persistent over reboots and also unplugging. The link keys are also cached inside the chip and so Authentication Requested must not always result in asking for the link key or pin code. The PIN concept is configured in /etc/bluetooth/hcid.conf security user -> execute pin_helper which prints PIN: on its stdout. Useful for graphical PIN entry security auto -> use /etc/bluetooth/pin as PIN When pairing is done, link keys are stored in /etc/bluetooth/link_keys (starting from bluez 2.16 in "/var/cache/bluetooth//"). When these are deleted a new PIN is requested. the link key don't expires. However using --secure with a recent kernel you can force a change of the link key every time the connection was successful. udev rules (etch) ----------------- (when working on udev rules, don't forget to restart udev and check syslog) udevmonitor shows /sys paths in plug activities The udev attribute of a device are shown by udevinfo -a -p /sys/bus/usb/devices/1-2/ show typical ids /usr/share/doc/udev/examples/udevtest-all may be useful as well. topsi:~# cat /etc/udev/bluez-usb-support.rules # USB adapters SUBSYSTEM=="usb", BUS=="usb", ENV{MANF_ID}="$sysfs{idVendor}", ENV{PROD_ID}="$sysfs{idProduct}" #topsi:/sys/bus/usb/devices/usb1/1-2# cat idProduct #0001 #topsi:/sys/bus/usb/devices/usb1/1-2# cat idVendor #0a12 #topsi:/sys/bus/usb/devices/usb1/1-2# # Epox BT-DG02A BUS=="usb", SYSFS{idProduct}=="0001", SYSFS{idVendor}=="0a12", SYSFS{bInterfaceNumber}=="00", RUN+="bluetooth_usb" topsi:~# Register the udev script: topsi:/etc/udev/rules.d# ls -l z60_bluez-usb-support.rules lrwxrwxrwx 1 root root 26 2006-12-07 09:05 z60_bluez-usb-support.rules -> ../bluez-usb-support.rules topsi:/etc/udev/rules.d# The RUN scripts are in /lib/udev restart udev: /etc/init.d/udev restart topsi:/etc/udev/rules.d# cat /lib/udev/bluetooth_usb #!/bin/sh # # bluetooth_usb # # Bluetooth usb dongle startup # echo $* > /tmp/bluetooth_usb.log echo MANF_ID: $MANF_ID >> /tmp/bluetooth_usb.log echo ACTION: $ACTION >> /tmp/bluetooth_usb.log start_bluetooth() { # if [ ! -x /bin/setserial -o ! -x /usr/sbin/hciattach ]; then # logger "$0: setserial or hciattach not executable, cannot start $DEVNAME" # return 1 # fi # IRQ=`/bin/setserial $DEVNAME | sed -e 's/.*IRQ: //'` # /bin/setserial $DEVNAME irq 0 ; /bin/setserial $DEVNAME irq $IRQ MANF_CARD_ID="${MANF_ID},${CARD_ID}" # I don't have a generic solution, sorry /etc/init.d/bluetooth restart } stop_bluetooth() { # [ -x /bin/fuser ] || return 1 # /bin/fuser -k -HUP $DEVNAME > /dev/null } case "$ACTION" in add) start_bluetooth ;; remove) stop_bluetooth ;; *) logger "Unknown action received $0: $ACTION" ;; esac topsi:/etc/udev/rules.d# Debugging: ---------- Check /var/log/syslog after udev restart and a plugged device when a script call is going wrong: strace -f -p on udevd udev-rules (in lenny): ----------------------- Find out udev attributes to match on: rd@blackbox:~$ udevinfo -q path -n /dev/umax1 /devices/pci0000:00/0000:00:1a.0/usb1/1-1 rd@blackbox:~$ udevinfo -a -p /devices/pci0000:00/0000:00:1a.0/usb1/1-1 Udevinfo starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device. looking at device '/devices/pci0000:00/0000:00:1a.0/usb1/1-1': KERNEL=="1-1" SUBSYSTEM=="usb" DRIVER=="usb" ATTR{quirks}=="0x0" ATTR{maxchild}=="0" ATTR{version}==" 1.00" ATTR{devnum}=="4" ATTR{busnum}=="1" ATTR{speed}=="12" ATTR{bMaxPacketSize0}=="64" ATTR{bNumConfigurations}=="1" ATTR{bDeviceProtocol}=="00" ATTR{bDeviceSubClass}=="00" ATTR{bDeviceClass}=="00" ATTR{bcdDevice}=="0100" ATTR{idProduct}=="0010" ATTR{idVendor}=="1606" ATTR{bMaxPower}=="100mA" ATTR{bmAttributes}=="40" ATTR{bConfigurationValue}=="1" ATTR{bNumInterfaces}==" 1" ATTR{configuration}=="" ATTR{dev}=="189:3" looking at parent device '/devices/pci0000:00/0000:00:1a.0/usb1': KERNELS=="usb1" SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{serial}=="0000:00:1a.0" ATTRS{product}=="UHCI Host Controller" ATTRS{manufacturer}=="Linux 2.6.22-3-686 uhci_hcd" ATTRS{quirks}=="0x0" ATTRS{maxchild}=="2" ATTRS{version}==" 1.10" ATTRS{devnum}=="1" ATTRS{busnum}=="1" ATTRS{speed}=="12" ATTRS{bMaxPacketSize0}=="64" ATTRS{bNumConfigurations}=="1" ATTRS{bDeviceProtocol}=="00" ATTRS{bDeviceSubClass}=="00" ATTRS{bDeviceClass}=="09" ATTRS{bcdDevice}=="0206" ATTRS{idProduct}=="0000" ATTRS{idVendor}=="0000" ATTRS{bMaxPower}==" 0mA" ATTRS{bmAttributes}=="e0" ATTRS{bConfigurationValue}=="1" ATTRS{bNumInterfaces}==" 1" ATTRS{configuration}=="" ATTRS{dev}=="189:0" looking at parent device '/devices/pci0000:00/0000:00:1a.0': KERNELS=="0000:00:1a.0" SUBSYSTEMS=="pci" DRIVERS=="uhci_hcd" ATTRS{msi_bus}=="" ATTRS{broken_parity_status}=="0" ATTRS{modalias}=="pci:v00008086d00002937sv00001043sd00008277bc0Csc03i00" ATTRS{local_cpus}=="ff" ATTRS{irq}=="17" ATTRS{class}=="0x0c0300" ATTRS{subsystem_device}=="0x8277" ATTRS{subsystem_vendor}=="0x1043" ATTRS{device}=="0x2937" ATTRS{vendor}=="0x8086" looking at parent device '/devices/pci0000:00': KERNELS=="pci0000:00" SUBSYSTEMS=="" DRIVERS=="" ATTRS{uevent}=="" rd@blackbox:~$ Then add a rule: rd@blackbox:~$ cat /etc/udev/rules.d/010_local.rules # Additions for blackbox ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1606", ATTRS{idProduct}=="0010", MODE="0664", GROUP="scanner", NAME="umax%n", RUN+="/usr/local/bin/umax1220u start" rd@blackbox:~$ accessing a wintec wbt-201 GPS mouse: ===================================== silverboxy:~# hcitool scan Scanning ... 00:0B:0D:86:FB:FF G-Rays2 silverboxy:~# hcitool cc 00:0B:0D:86:FB:FF silverboxy:~# sdptool browse 00:0B:0D:86:FB:FF Browsing 00:0B:0D:86:FB:FF ... Service Name: SPP slave Service Description: Bluetooth SPP V1.03 Service RecHandle: 0x10000 Service Class ID List: "Serial Port" (0x1101) Protocol Descriptor List: "L2CAP" (0x0100) "RFCOMM" (0x0003) Channel: 1 Language Base Attr List: code_ISO639: 0x656e encoding: 0x6a base_offset: 0x100 silverboxy:~# rfcomm connect 3 00:0B:0D:86:FB:FF Connected /dev/rfcomm3 to 00:0B:0D:86:FB:FF on channel 1 Press CTRL-C for hangup to read log # gpsbabel -t -w -i wbt -f /dev/rfcomm3 -o gpx -F out5.gpx to read and erase log # gpsbabel -t -w -i wbt,erase -f /dev/rfcomm3 -o gpx -F out5.gpx # gpsbabel -t -w -i wbt,erase -f /dev/ttyUSB0 -o gpx -F out5.gpx Höhenprofil zeichnen: --------------------- (for details see: http://gpstools.sourceforge.net/example.html) GPS1.1 needed: gpsbabel -i gpx -f burkhardsmuehle-einsiedel.gpx -o gpx,gpxver=1.1 -F burkhardsmuehle-einsiedel.gpx1.1 run gpsdings: java -jar /opt/gpsdings-0.6.3/gpsdings.jar trackanalyzer --plot "TimeTravelled|Elevation|graph1.svg|Einsiedelrunde" burkhardsmuehle-einsiedel.gpx1.1 java -jar /opt/gpsdings-0.6.3/gpsdings.jar trackanalyzer --plot "DistanceTravelled|Elevation|graph2.svg|Einsiedelrunde" burkhardsmuehle-einsiedel.gpx1.1 java -jar /opt/gpsdings-0.6.3/gpsdings.jar trackanalyzer --smoothing=5 --plot "TimeTravelled|VerticalSpeed|graph3.svg|Guffertrunde" guffertrunde.gpx Generate Map: ------------- java -jar /opt/gpsdings-0.6.3/gpsdings.jar trackanalyzer --kml "Elevation|elevation.kml" eschenau-sulzbach.gpx.1.1 java -jar /opt/gpsdings-0.6.3/gpsdings.jar shrink --numpoints 200 eschenau-sulzbach.gpx.1.1 > eschenau-sulzbach-n200.gpx.1.1 Converting ovl <-> gpx: ======================= java -jar /opt/GPS/gpsdings.jar gpxovl -o grosse_panoramarunde.ovl Correlating photos with a GPS trace: ==================================== gpscorrelate -g ../../GPS/saleMarasino.gpx -z 0:56 *.jpg 0:56: time to add to GPS data to make it match photos gpscorrelate error: ------------------- > terminate called after throwing an instance of 'Exiv2::Error' > what(): DSCN4934.JPG: Failed to open file (w+b): (13) Is the file writable by the user you're running the program as? Full flow to integrate several photo series: -------------------------------------------- Correct time of each flow: $ exiv2 -a -25:04 adjust * Insert GPS information: $ gpscorrelate -g ../../GPS/saleMarasino.gpx * copy all files in one directory and run $ exif-chronological-rename.sh SM to order them. They end up all in the done folder. Merging Panoramaphotos: ======================= hugin http://hugin.sourceforge.net/screenshots/ QLandKarteGT ============ (see http://www.qlandkarte.org/index.php?option=com_content&view=article&id=3&Itemid=4) For the bleeding edge of development you have to use the SVN repository. For initial checkout: svn co https://qlandkartegt.svn.sourceforge.net/svnroot/qlandkartegt/QLandkarteGT/trunk QLandkarteGT To build (out of source build, start one level above source root directory)1: mkdir build_QLandkarteGT cd build_QLandkarteGT ccmake ../QLandkarteGT CCmake can be controlled by keys. Watch out for key hints at the bottom. Especially the"c" and"g" key. Next you do: make The binary will be placed in ./bin. To catch up latest changes (in the source root directory): Config in: ---------- ~/.config/QLandkarteGT Load a map: ----------- Load openmtbmap .tdb then .img file Currently maps are in /home/rd/tmp.nobackup/openmtbmap/mtbgermany-100103 Elevation: ---------- Downloaded hgt data from http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/ you can use gmaptool to create your own tdb http://www.anpo.republika.pl/download.html#gmaptool but this will just add elevation lines as overlay if you want SRTM data for contour shading and 3D in GT you have to pick the raw data from: http://www.viewfinderpanoramas.org/dem3.html in GT's source root there is a python script called srtmconvert.py you can use it to convert several srtm files in a directory into geotiff you can link that geotiff with the map my right click on the map in the left hand list Data at /opt/srtmdata/dds.cr.usgs.gov/srtm/version2_1/SRTM3/Eurasia (there might be SRTM1 data) copy relevant portion to other directory, e.g. cp Eurasia/N50E00[6-9]* Sueddeutschland/ unzip and then then run in the new directory (e.g. cd Sueddeutschland): ~/tmp.nobackup/srtmconvert.py srtm.tif is the data used by qlandkartegt In QLandkarteGT do a "Add DEM" in the context menue of the map. Mini DNS server: ================ dnsmasq When using the dhcp server of dnsmaq in conjunction with shorewall, make sure that you do not have detectnets on the interface served by the dhcp server. firefox printout is too large: ============================== /etc/Xprint/C/print/attributes/document is incorrect, e.g. 600 when it should be 300. java support in iceweasel: ========================== sun-java6-plugin Wrapper scripts in Debian: ========================== > So: dpkg-divert --package dpkg --add --rename --divert \ > /usr/bin/dpkg.real /usr/bin/dpkg did the trick! Uhm, I think you want to carefully read the --package option description in the man page. And then, check --local. Example: Remove annoying /usr/lib/libGL.so.1 diverted by fglrx-driver to: /usr/lib/fglrx/diversions/libGL.so.1 dpkg-divert --remove /usr/lib/libGL.so.1 Changing GNOME configuration from the command line: =================================================== gconftool-2 --set /apps/gnomemeeting/protocols/h323/call_forwarding/forward_host 111.222.333.444 --type=string GNOME applications like gnomemeeting may pick that up during runtime. list of possible directories: gconftool-2 --dump / Reseting an application: gconftool-2 --recursive-unset /apps/maemo/maemo-mapper http://www.internettablettalk.com/forums/showthread.php?t=25122&page=2 kphone mit fwd.pulver.com: ========================== copy (not link) the right kphonerc: cd ~/.qt cp kphonerc.fwd kphonerc free calls to 0800 numbers: *1800... .qt/kphonerc points to the provider ekiga: ====== PCMA: Ist aber dasselbe G.711 A-Law Increase speaker volume: ======================== amixer contents amixer cset numid=28,,iface=MIXER,name='Capture Volume' 15,15 (on silverboxy) System picks up noise from Graphics adapter, mouse etc.: ======================================================== make sure that front mic input, line in, analog CD input are muted Debugging sane: =============== e.g. with an umax 1220u scanner SANE_DEBUG_DLL=255 SANE_DEBUG_UMAX1220U=255 scanimage -L When a dll causes trouble, remove it in /etc/sane.d/dll.conf Wikipedia DVD - Digibux: ======================== apt-get install gnustep-back apt-get install libgnustep-gui0.9 extract /linux/Digibux-1.0.4.tgz, e.g. to /opt run openapp Digibux.app/ Not clear how to "Anderen Band auswaehlen" Invers telephone number search: =============================== yubnub.org: oertlichinvers 07032919495 Animated gifs: ============== http://software.newsforge.com/article.pl?sid=05/07/01/1959251&from=rss To save an animation we use the convert command, supplying a filename with an appropriate extension. Use .gif if you want to use your animation on a Web site, or use .mpeg and .avi if you want these to play on a media player. convert -delay 30 frame1.gif frame2.gif frame3.gif \ > -loop 0 playme.gif Applying a patch: ================= patch -p0 < patchfile Configure Moinmoin: =================== see /usr/share/doc/python-moinmoin/README.Debian.gz Adsense and Moinmoin: ===================== summary for etch on bokomoko: The adsense code is defined in rd@bokomoko:/etc/moin$ diff -u wikimaster.py.orig wikimaster.py --- wikimaster.py.orig 2008-05-03 22:57:35.000000000 +0200 +++ wikimaster.py 2008-05-03 21:59:22.000000000 +0200 @@ -26,6 +26,39 @@ data_dir = '/var/www/wiki/data/' + adverts = ''' + + + ''' + + adverts_Wide_Skyscraper = ''' + + + ''' # The default theme anonymous or new users get theme_default = 'modern' rd@bokomoko:/etc/moin$ Define a css style sheet entry for adverts rd@bokomoko:/usr/share/moin/htdocs/modern/css$ diff -u screen.css.orig screen.css --- screen.css.orig 2008-05-03 12:50:52.000000000 +0200 +++ screen.css 2008-05-03 12:52:26.000000000 +0200 @@ -427,6 +427,10 @@ vertical-align: middle; } +#adverts { + text-align: center; margin-top: 10px; +} + .diff { width:99%; } Define the python advert functions: rd@bokomoko:/usr/share/python-support/python-moinmoin/MoinMoin/theme$ diff -u __init__.py.orig __init__.py --- __init__.py.orig 2008-05-03 12:42:04.000000000 +0200 +++ __init__.py 2008-05-03 14:20:23.000000000 +0200 @@ -1200,6 +1200,20 @@ """ return '
\n\n' + def adverts(self): + """ Return adverts defined in the wiki config """ + if self.request.user.show_adverts: + return '
%s
' % self.request.cfg.adverts + else: + return '' + + def adverts_Wide_Skyscraper(self): + """ Return adverts defined in the wiki config """ + if self.request.user.show_adverts: + return '
%s
' % self.request.cfg.adverts_Wide_Skyscraper + else: + return '' + # Public functions ##################################################### def header(self, d, **kw): rd@bokomoko:/usr/share/python-support/python-moinmoin/MoinMoin/theme$ Add an add to the modern theme: rd@bokomoko:/usr/share/python-support/python-moinmoin/MoinMoin/theme$ diff -u modern.py.orig modern.py --- modern.py.orig 2005-12-11 23:07:30.000000000 +0100 +++ modern.py 2008-05-03 13:57:19.000000000 +0200 @@ -39,6 +39,7 @@ self.msg(d), self.editbar(d), u'', + self.adverts(), # Post header custom html (not recommended) self.emit_custom_html(self.cfg.page_header2), rd@bokomoko:/usr/share/python-support/python-moinmoin/MoinMoin/theme$ Add a configuration option for adverts: rd@bokomoko:/usr/share/python-support/python-moinmoin/MoinMoin$ diff -u multiconfig.py.orig multiconfig.py --- multiconfig.py.orig 2006-04-07 20:22:01.000000000 +0200 +++ multiconfig.py 2008-05-03 14:02:43.000000000 +0200 @@ -378,6 +378,7 @@ ('want_trivial', lambda _: _('Subscribe to trivial changes')), ('disabled', lambda _: _('Disable this account forever')), + ('show_adverts', lambda _: _('Show adverts')), # if an account is disabled, it may be used for looking up # id -> username for page info and recent changes, but it # is not usable for the user any more: @@ -389,6 +390,7 @@ 'show_page_trail': 1, 'show_toolbar': 1, 'show_topbottom': 0, + 'show_adverts': 1, 'show_fancy_diff': 1, 'wikiname_add_spaces': 0, 'remember_me': 1, rd@bokomoko:/usr/share/python-support/python-moinmoin/MoinMoin$ Add an add to the rightsidebar theme: rd@bokomoko:/usr/share/python-support/python-moinmoin/MoinMoin/theme$ diff -u rightsidebar.py.orig rightsidebar.py --- rightsidebar.py.orig 2005-12-12 20:14:38.000000000 +0100 +++ rightsidebar.py 2008-05-03 14:10:45.000000000 +0200 @@ -84,6 +84,7 @@ self.wikipanel(d), self.pagepanel(d), self.userpanel(d), + self.adverts_Wide_Skyscraper(), u'', self.msg(d), rd@bokomoko:/usr/share/python-support/python-moinmoin/MoinMoin/theme$ Note: dpkg-reconfigure python-moinmoin regenerates the .pyc files. That seems not required though, because changes in the .py files take effect before the reconfigure. essentially copied: http://moinmoin.wikiwikiweb.de/AdvertsIntegration (now http://moinmo.in/AdvertsIntegration) but omitted the config option. Upgrading moinmoin: ------------------- /usr/share/doc/python-moinmoin/README.migration.gz Check for master-date of underlay: http://bokonew.homelinux.org/Wiki/TitleIndex?action=raw Terminfo links removed: ======================= http://www.terabyteunlimited.com/kb/article.php?id=454 Starting with the Debian "Squeeze" version of the Debian distribution, as well as some other Debian-based Linux distributions, several symlinks have been removed from the /usr/share/terminfo directory. This causes the affected programs to not be able to find the specific terminfo file they need to open a terminal (such as linux, xterm, Eterm, rxvt, dumb, etc.). This results in the error message shown above, and the affected programs will not be able to run. For error message "Error opening terminal: xterm" mkdir -p /usr/share/terminfo/x cd /usr/share/terminfo/x ln -s /lib/terminfo/x/xterm xterm Python for Kids: ================ Download xturtle from http://xturtle.rg16.at/ Convert the python files with dos2unix into unix format Install python-tk For moorhuhn the winsound module is missing. Not sure if that is related to csound and python-csound rd@dell:~/xturtle0.95_with_demo$ dpkg -S /usr/bin/winsound csound-gui: /usr/bin/winsound rd@dell:~/xturtle0.95_with_demo$ Mounting JFS file system with Knoppix rw fails: =============================================== root@0[~]# mount -t jfs /dev/hda7 /mnt/hda7 mount: wrong fs type, bad option, bad superblock on /dev/hda7, missing codepage or other error In some cases useful info is found in syslog - try dmesg | tail or so root@0[~]# mount -t jfs -o ro /dev/hda7 /mnt/hda7 root@0[~]# umount /mnt/hda7 root@0[~]# jfs_fsck /dev/hda7 jfs_fsck version 1.1.7, 22-Jul-2004 processing started: 8/8/2005 12.37.48 Using default parameter: -p The current device is: /dev/hda7 Block size in bytes: 4096 Filesystem size in blocks: 3419002 **Phase 0 - Replay Journal Log Filesystem is clean. root@0[~]# mount -t jfs /dev/hda7 /mnt/hda7 root@0[~]# syslog-ng does not start on virtualized machine: ================================================ /etc/syslog-ng/syslog-ng.conf # file("/proc/kmsg" log_prefix("kernel: ")); sourceline count: ================= VHDL (ohne Kommentar und Leerzeilen): grep -h -v -E '[ ]*--' *.vhdl |grep -v -E '^[ ]*$' |wc -l Subscribing to a Debian bug: ============================ To subscribe to bug XXXX simply mail a message to "xxxx-subscribe@bugs.debian.org". Unsubscription is handled in a similar manner, just mail "xxxx-unsubscribe@bugs.debian.org". GnuCash and finance-quote: ========================== Finance::Quote is called from gnucash. If the website changed and F::Q does not work any more, test may be done with $ /opt/gnucash-2.2.8/bin/gnc-fq-dump VWD LYX0AG Finance::Quote fields Gnucash uses: symbol: LYX0AG <=== required date: 05/02/2009 <=== required currency: EUR <=== required last: 68.06 <=\ nav: <=== one of these price: 68.06 <=/ timezone: <=== optional $ rd@silverboxy:/usr/share/doc/libfinance-quote-perl/examples$ ./stockdump.pl VWD 847400 $VAR1 = { '847400source' => 'VWD', '847400ask' => '80.50', '847400bid' => '79.30', '847400year_range' => '63.30 - 83.70', '847400last' => '80.00', '847400price' => '80.00', '847400success' => 1, '847400currency' => 'EUR', '847400p_change' => '0.87', '847400errormsg' => '', '847400isodate' => '2005-10-25', '847400time' => '10:58:56', '847400date' => '10/25/2005', '847400symbol' => 'HJUL', '847400exchange' => '79.20', '847400name' => 'DWS INVESTA', '847400net' => '0.69' }; rd@silverboxy:/usr/share/doc/libfinance-quote-perl/examples$ The perl modules called are in /usr/lib/perl5/Finance/Quote/ Adapting VWD.pm: ---------------- HTML::Tree is useful http://search.cpan.org/~jfearn/HTML-Tree-4.0/lib/HTML/Tree/Scanning.pod and debug output from VWD.pl Old(?): Minor changes in the html layout can be adapted by selecting the right rows and columns in VWD.pm silverboxy:/usr/lib/perl5/Finance/Quote# diff VWD.2005-08-19.pm~ VWD.2005-08-19.pm 141c141 < $info{$fund, "price"} = $info{$fund, "last"} = trimtr( $rows[4][1] ); --- > $info{$fund, "price"} = $info{$fund, "last"} = trimtr( $rows[1][1] ); silverboxy:/usr/lib/perl5/Finance/Quote# For a reasonable description of libhtml-tableextract-perl used in many modules, see perldoc HTML::TableExtract or http://www.linux-magazin.de/Artikel/ausgabe/2000/11/Perl/perl.html Stock symbols within gnucash: ----------------------------- Use upper case when data is retrived from yahoo. Compiling GnuCash/ aqhbci: ========================== gwenhywfar: ----------- $ ./configure --prefix=/opt/gwenhywfar-1.18.0 When building from CVS: $ make -f Makefile.cvs aqbanking: ---------- ./configure --prefix=/opt/aqbanking-2.3.3/ --with-gwen-dir=/opt/gwenhywfar-2.6.2/ --with-backends="aqhbci" --with-frontends="cbanking g2banking qbanking" When building for geldkarte, use --with-backends="aqhbci aqgeldkarte" (requires LibChipCard) When building from CVS: $ export ACLOCAL_FLAGS="-I /opt/gwenhywfar-20051008/share/aclocal" $ make -f Makefile.cvs gnucash: -------- $ export PKG_CONFIG_PATH=/opt/aqbanking-2.3.3/lib/pkgconfig/:/opt/gwenhywfar-2.6.2/lib/pkgconfig/ $ ./configure --prefix=/opt/gnucash-2.2.5/ --enable-hbci (GOffice version >= 0.5 requires gtkhtml-3.14) gnucash 2.2 with aqbanking4: ---------------------------- svn co http://svn.gnucash.org/repo/gnucash/branches/2.2/ gnucash-2.2-branch svn merge -c r18037 http://svn.gnucash.org/repo/gnucash/trunk (see https://bugzilla.gnome.org/show_bug.cgi?id=559670 ) svn merge -c r18167 http://svn.gnucash.org/repo/gnucash/trunk (see https://bugzilla.gnome.org/show_bug.cgi?id=582048 ) export PKG_CONFIG_PATH=/opt/aqbanking-4.2.1/lib/pkgconfig/:/opt/gwenhywfar-3.11.2/lib/pkgconfig/ ./autogen.sh ./configure --prefix=/opt/gnucash-2.2.9r18037r18167 --enable-hbci --enable-compile-warnings QBankManager: ------------- cvs -d:pserver:anonymous@cvs.sf.net:/cvsroot/aqbanking co bindings/kde or compiling from tar.gz file ./configure --prefix=/opt/qbankmanager-0.9.50 --with-gwen-dir=/opt/gwenhywfar-3.6.0/ --with-aqbanking-dir=/opt/aqbanking-3.8.1/ aqbanking: ---------- config: ".banking/" -> AqBanking1, 2 ".aqbanking" -> AqBanking3 ".aqbanking/settings" -> AqBanking4 Updating config: aqbanking-cli updateconf Certificates: ------------- ~/.aqbanking/settings/shared/certs.conf subversion: =========== setup repo: ----------- svnadmin create svn-test/ initial import: --------------- $ mkdir tmpdir $ cd tmpdir $ mkdir projectA $ mkdir projectA/trunk $ mkdir projectA/branches $ mkdir projectA/tags $ mkdir projectB $ mkdir projectB/trunk $ mkdir projectB/branches $ mkdir projectB/tags … $ svn import . file:///path/to/repos --message 'Initial repository layout' Adding projectA Adding projectA/trunk Adding projectA/branches Adding projectA/tags Adding projectB Adding projectB/trunk Adding projectB/branches Adding projectB/tags … Committed revision 1. $ cd .. $ rm -rf tmpdir $ verify $ svn list --verbose file:///path/to/repos 1 harry May 08 21:48 projectA/ 1 harry May 08 21:48 projectB/ … $ cherrypicking: -------------- svn diff -c 355 http://svn.example.com/repos/calc/trunk svn merge -c 355 http://svn.example.com/repos/calc/trunk http://svnbook.red-bean.com/en/1.5/svn.branchmerge.advanced.html#svn.branchmerge.cherrypicking patches: -------- in toplevel of one repo svn diff > ~/fix_ugly_bug.diff in toplevel of other repo patch -p0 -i ~/fix_ugly_bug.diff Digibux: ======== openapp /root/Digibux.app/ then select directory which mounted the dvd drive or the iso (used /mnt/tmp to mount the iso) Changing MTU: ============= /sbin/ifconfig ipsec0 mtu 1492 Check for used ports: ===================== e.g. lsof -i :631 to find out about StartListening: Unable to bind socket for address 00000000:631 - Address already in use. in cupsd. Connect to an WLAN Accesspoint: =============================== How to connect to an unencrypted or WEP encrypted accesspoint will be covered here. WPA and 802.1x will be in different sections because they are more complicated. The example interface will be called eth1. To set up the interface, start by: # ifconfig eth1 up If you want, you could scan for an accesspoint first: # iwlist eth1 scanning You will then see the available accesspoints, their ESSID's, the frequency, etc. To associate with an accesspoint (for example "test"), run: # iwconfig eth1 essid test Most drivers will automatically find the right channel in a minute. If the accesspoint uses WEP, you set the encryption like so: # iwconfig eth1 key s:"the_ascii_key" Or you can use a hexadecimal key: # iwconfig eth1 key 00000000000 The bits of encryption is determined by the key length. Note that this command, along with the key, can be seen in "ps aux". If you have associated properly, you should see the accesspoint's mac address in from iwconfig instead of 00:00:00:00:00:00. If the network you have connected to uses dhcp, it is time to obtain an ip address: # dhclient eth1 ASCII art: ========== FIGlet is a command line tool. It?s purpose is to draw nicely formatted big characters. For example "figlet debian" writes debian. Another instruction: glass:~# iwconfig wlan0 mode managed glass:~# iwconfig wlan0 essid glass:~# iwconfig wlan0 key glass:~# iwconfig wlan0 channel glass:~# ifconfig wlan0 up glass:~# iwlist wlan0 scan glass:~# iwconfig wlan0 ap glass:~# dhclient wlan0 Faillog: ======== faillog -a -r resets all login failures Show open internet connections: =============================== netstat -natp (TCP) netstat -naup (UDP) samba mounten: ============== wins server ist "DNS server" fuer netbios name. # WINS Server - Tells the NMBD components of Samba to be a WINS Client # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both wins server = 9.152.120.246 Building a Debian Packet from source: ===================================== (see also http://antbear.org/debpkg-intro.html Debian - Paketerstellung (Eine EinfÂŽührung) create a directory - and run in there dh_make dh_make -e rdorsch@web.de -t /usr/share/doc/dh-make/examples/kde-singlebinary/ (note this contains still kde2 paths...) adapt the debian/control and debian/rules files. All files should be installed in debian/ (previously it was in debian/tmp). This is typically done in the make install step: make install DESTDIR=`pwd`/debian/ For separating multiple packages, installing to debian/tmp and then moving the packages with dh_install and the debian/.install file is the prefered way. Bumb the debian/changelog in the debian directory dch -v 0.4.1-1 or dch -i if it is no new upstream release To get a meaningful .diff.gz file, make sure to have a _.orig.tar.gz file which contains the _ archive. If all is complete, run in - dpkg-buildpackage -rfakeroot Rebuilding a debian package from source with debug information ============================================================== # apt-get install build-essential fakeroot gdb # apt-get build-dep hello $ DEB_BUILD_OPTIONS=nostrip fakeroot apt-get -b source hello # dpkg -i hello_2.1.1-4_i386.deb Running a serial console over a nullmodem cable and seyon ========================================================= Boot the linux system with the boot option "console=ttyS0,9600n8" Connect the terminal (emulation) with a nullmodem cable. Boot the terminal. Make sure that the kernel module serial_cs.ko is loaded check with dmesg|grep tty if the serial interface is enabled Start seyon on the client using seyon -modems /dev/ttyS0 When you want to login on with the terminal and not only get console messages, uncomment in /etc/inittab #T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100 T@x: ==== Start der Installation der Umgebung von "t@x 2005 Linux 6.00" Der Kern von "t@x 2005 Linux 6.00" wird installiert Die Umgebungsdatei "/home/rd/.tax2005env" wird erstellt HTML-Dateien werden nach "/opt/tax/2005/c/html" kopiert. Handbuch-Dateien werden nach "/opt/tax/2005/c/programme/tax2005/hilfe" kopiert. ErsteSchritte-Dateien werden kopiert FÂŽür KDE kÂŽönnen nun MenÂŽüeintrÂŽäge erzeugt werden. Wenn Sie dies nicht wÂŽünschen, oder mit einem anderen Desktop arbeiten, kÂŽönnen Sie jederzeit selbst EintrÂŽäge erstellen. Zu den wichtigsten Scripten unter /opt/tax/2005/c (*.x) finden Sie Icons unter /opt/tax/2005/c/bilder. t@x and menue bar: ================== Das so reich gefÂŽüllte MenÂŽü war ÂŽübrigens das einzige ÂŽÄrgernis bei unserer Arbeit mit Tax: Unter Suse Linux 9.1 und Fedora Core 2 verschwand sporadisch die MenÂŽüleiste. Ein einfacher Trick, sie zurÂŽückzuholen, besteht darin, ÂŽüber Fensterverhalten festlegen aus dem KontextmenÂŽü der Titelleiste [des KDE Fensters] eine andere Fensterdekoration einzustellen. aus http://www.easylinux.de/2005/04/076-tax2005/ KDE envvars =========== # Source scripts found in /env/*.sh and /env/*.sh # (where is $KDEHOME or ~/.kde, and is where KDE is installed) KDEHOME dir (default ~/.kde): ----------------------------- In /usr/bin/startkde I found the following in line 51: # The user's personal KDE directory is usually ~/.kde, but this setting # may be overridden by setting KDEHOME. So I added the following line export KDEHOME=~/.kde-isis To avoid editing startkde with each update: Create /usr/local/bin/startkdealt: #!/bin/sh KDEHOME=$HOME/.kdealt /usr/bin/startkde "$@" #-- End /usr/local/bin/startkdealt And create /usr/share/xsessions/kdealt.desktop: [Desktop Entry] Encoding=UTF-8 Type=XSession Exec=/usr/local/bin/startkdealt TryExec=/usr/local/bin/startkdealt Name=KDE, alternate config Comment=The K Desktop Environment, alternate config. A powerful Open Source graphical desktop environment #-- End /usr/share/xsessions/kdealt.desktop ...and then choose "KDE, alternate config" from kdm (alt-t or the options button). KDE config: =========== kde-config --path e.g. rd@blackbox:~$ kde-config --path config /home/rd/.kde/share/config/:/etc/kde3/:/usr/share/desktop-base/profiles/kde-profile/share/config/ rd@blackbox:~$ application specific data rd@blackbox:~$ kde-config --path data /home/rd/.kde/share/apps/:/usr/share/apps/ rd@blackbox:~$ for details http://developer.kde.org/documentation/other/kde-config.html gpg-key ======= gpg --export --armor > Public-key.asc Import key from server: gpg --keyserver hkp://wwwkeys.eu.pgp.net --recv-keys 1F41B907 gpg --keyserver hkp://wwwkeys.eu.pgp.net --search-keys 'e@mail.de' Alternative key servers: hkp://pgp.mit.edu qemu ==== This is more or less a reminder for me, most of you will probably already know how to do it... Install QEMU: apt-get install qemu Create a (resizable) image which will hold Windows XP. The installer chokes if the image is smaller than 1.2 GB or so, but that's not too much of a problem; the "qcow" image format will only take up as much space as is really needed, so the image will be very small in the beginning (not 1.2 GB big!). qemu-img create -f qcow /path/to/xp.cow 1300M Insert the install CD, and install Windows in the QEMU image: qemu -hda /path/to/xp.cow -boot d -cdrom /dev/cdrom -m 384 -localtime Wait. After the install has finished, shut down the QEMU/Windows; from now on you can boot it (without having to insert the CD anymore) with: qemu -hda /path/to/xp.cow -boot c -m 384 -localtime -k de -usb Type "qemu -h" for more options. further details: http://debaday.debian.net/2007/07/08/qemu-easy-and-fast-processor-emulator/ From Wikipedia: Des Weiteren steht fÂŽür x86-Rechner ein kqemu genanntes Zusatzmodul bereit, welches durch Virtualisierung einen erheblichen Geschwindigkeitszuwachs erreicht. Seit Version 0.8.1 ist die Geschwindigkeit vergleichbar zu kommerziellen Konkurrenten wie VMware, da seit dieser Version auch Ring 0-Code virtualisiert werden kann mount iso image: ================ mount -t iso9660 -o ro,loop=/dev/loop0 /home//test.iso /mnt/iso Kanotix Live-CD on an USB Stick: ================================= http://www.it-academy.cc/article/1530/Linux+auf+USBStick+installieren.html mkfs.vfat /dev/sda should read mkfs.vfat /dev/sda1 (did not allow dma for hard disks in T42p) Create a gparted live-USB ========================= create an ext2 fs on an USB stick (might also work with FAT16, if this is an advantage) mount the usb stick mount the CD iso image mount -t iso9660 -o loop /home/rdorsch/gparted-clonezilla-2.2.iso /mnt/cdimg copy the data cp -ra /mnt/cdimg /mnt/sda1/ (if not yet there) Set a correct device map echo '(hd0) /dev/sda' > /mnt/sda1/boot/grub/device.map install grub in the MSB grub-install --root-directory=/mnt/sda1 /dev/sda Add boot option cdroot=/dev/sda to grub's menu.lst: paddy:~# diff -u /mnt/sda1/boot/grub/menu.lst.orig /mnt/sda1/boot/grub/menu.lst --- /mnt/sda1/boot/grub/menu.lst.orig 2007-11-25 12:55:18.000000000 -0500 +++ /mnt/sda1/boot/grub/menu.lst 2007-11-25 12:57:26.000000000 -0500 @@ -2,51 +2,47 @@ splashimage=/boot/grub/Csplash.xpm.gz title=GParted-liveCD 0.3.4-10 (auto-configuration) - kernel /boot/gparted root=/dev/ram0 init=/linuxrc real_root=/dev/loop0 looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot dodmraid nosound docache + kernel /boot/gparted root=/dev/ram0 init=/linuxrc real_root=/dev/loop0 looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot dodmraid nosound docache cdroot=/dev/sda initrd /boot/gparted.igz title=GParted-liveCD (Do X Configuration = mkxf86config) - kernel /boot/gparted root=/devi/ram0 init=/linuxrc real_root=/dev/loop0 doxdetect looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot dodmraid nosound docache + kernel /boot/gparted root=/devi/ram0 init=/linuxrc real_root=/dev/loop0 doxdetect looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot dodmraid nosound docache cdroot=/dev/sda initrd /boot/gparted.igz title=GParted-liveCD (auto-configuration - nocaching = noejection) - kernel /boot/gparted root=/dev/ram0 init=/linuxrc real_root=/dev/loop0 looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot dodmraid nosound + kernel /boot/gparted root=/dev/ram0 init=/linuxrc real_root=/dev/loop0 looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot dodmraid nosound cdroot=/dev/sda initrd /boot/gparted.igz title=GParted-liveCD (auto-configuration and framebuffer) - kernel /boot/gparted root=/dev/ram0 init=/linuxrc real_root=/dev/loop0 vga=788 looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot dodmraid nosound docache + kernel /boot/gparted root=/dev/ram0 init=/linuxrc real_root=/dev/loop0 vga=788 looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot dodmraid nosound docache cdroot=/dev/sda initrd /boot/gparted.igz -title=GParted-liveCD (boot off External-usb-cd : /dev/sr0) - kernel /boot/gparted root=/dev/ram0 init=/linuxrc real_root=/dev/loop0 looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot=/dev/sr0 dodmraid nosound docache - initrd /boot/gparted.igz - -title=GParted-liveCD Macbook option - kernel /boot/gparted root=/devi/ram0 init=/linuxrc real_root=/dev/loop0 doxdetect looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot dodmraid nosound docache noapic irqpoll acpi=force +title=GParted-liveCD (boot off External-usb-stick : /dev/sda) + kernel /boot/gparted root=/dev/ram0 init=/linuxrc real_root=/dev/loop0 looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot=/dev/sda dodmraid nosound docache initrd /boot/gparted.igz title=GParted-liveCD Force VESA driver - kernel /boot/gparted root=/dev/ram0 init=/linuxrc video=vesa real_root=/dev/loop0 looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot dodmraid nosound docache + kernel /boot/gparted root=/dev/ram0 init=/linuxrc video=vesa real_root=/dev/loop0 looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot dodmraid nosound docache cdroot=/dev/sda initrd /boot/gparted.igz title=GParted-liveCD Force I740 driver - kernel /boot/gparted root=/dev/ram0 init=/linuxrc video=i740 real_root=/dev/loop0 looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot dodmraid nosound docache + kernel /boot/gparted root=/dev/ram0 init=/linuxrc video=i740 real_root=/dev/loop0 looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot dodmraid nosound docache cdroot=/dev/sda initrd /boot/gparted.igz title=GParted-liveCD Force I810 driver - kernel /boot/gparted root=/dev/ram0 init=/linuxrc video=i810 real_root=/dev/loop0 looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot dodmraid nosound docache + kernel /boot/gparted root=/dev/ram0 init=/linuxrc video=i810 real_root=/dev/loop0 looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot dodmraid nosound docache cdroot=/dev/sda initrd /boot/gparted.igz title=GParted-liveCD HP laptop (pci=conf1) - kernel /boot/gparted root=/dev/ram0 init=/linuxrc video=i810 real_root=/dev/loop0 looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot dodmraid nosound docache pci=conf1 + kernel /boot/gparted root=/dev/ram0 init=/linuxrc video=i810 real_root=/dev/loop0 looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot dodmraid nosound docache pci=conf1 cdroot=/dev/sda initrd /boot/gparted.igz title=GParted-liveCD HP laptop (pci=conf2) - kernel /boot/gparted root=/dev/ram0 init=/linuxrc video=i810 real_root=/dev/loop0 looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot dodmraid nosound docache pci=conf2 + kernel /boot/gparted root=/dev/ram0 init=/linuxrc video=i810 real_root=/dev/loop0 looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot dodmraid nosound docache pci=conf2 cdroot=/dev/sda initrd /boot/gparted.igz title=GParted-liveCD HP laptop (pci=conf3) - kernel /boot/gparted root=/dev/ram0 init=/linuxrc video=i810 real_root=/dev/loop0 looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot dodmraid nosound docache pci=conf3 + kernel /boot/gparted root=/dev/ram0 init=/linuxrc video=i810 real_root=/dev/loop0 looptype=squashfs loop=/gparted.dat udev dokeymap scandelay=6 cdroot dodmraid nosound docache pci=conf3 cdroot=/dev/sda initrd /boot/gparted.igz title=Clonezilla live 1.0.5-8 paddy:~# umount USB Stick umount /mnt/sda1 mount an usb image: =================== To mount the .img file: blackbox:~# fdisk -ul /root/nslu2/backup-03232010.bin You must set cylinders. You can do this from the extra functions menu. Disk /root/nslu2/backup-03232010.bin: 0 MB, 0 bytes 17 heads, 32 sectors/track, 0 cylinders, total 0 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0xc3072e18 Device Boot Start End Blocks Id System /root/nslu2/backup-03232010.bin1 250784 4062047 1905632 83 Linux Partition 1 has different physical/logical endings: phys=(1023, 16, 32) logical=(7466, 16, 32) /root/nslu2/backup-03232010.bin2 32 250783 125376 82 Linux swap / Solaris Partition table entries are not in disk order blackbox:~# mount -o loop,offset=128401408 /root/nslu2/backup-03232010.bin /mnt/sdb5/ blackbox:~# ls /mnt/sdb5 bin boot dev etc home initrd lib lost+found media mnt opt proc root sbin selinux srv sys tmp usr var blackbox:~# Offset is *512 create a device: ================ blackbox:~# man mknod blackbox:~# cd /dev/ blackbox:/dev# ls name -l ls: name: No such file or directory blackbox:/dev# ls /dev/sda -l brw-rw---- 1 root disk 8, 0 2007-12-29 16:23 /dev/sda blackbox:/dev# ls /dev/sda1 -l brw-rw---- 1 root disk 8, 1 2007-12-29 16:07 /dev/sda1 blackbox:/dev# ls /dev/sda5 -l brw-rw---- 1 root disk 8, 5 2007-12-29 16:08 /dev/sda5 blackbox:/dev# mknod -m 660 /dev/sda6 b 8 6 blackbox:/dev# ls /dev/sda6 -l brw-rw---- 1 root root 8, 6 2007-12-29 16:31 /dev/sda6 blackbox:/dev# chgrp disk /dev/sda6 blackbox:/dev# qemu: ===== boot from an iso: qemu -cdrom cd.iso -boot d -m 512 for the kqemu acceleration, see http://www.nabble.com/Bug-418516:--dev-kqemu-is-not-created-automatically-when-loading-module-kqemu-t3551962.html # modprobe kqemu # mknod /dev/kqemu c 250 0 # chmod 666 /dev/kqemu Limit failed login attempts: ============================ * Limit consecutive invalid login attempts - There are two types of line that are required: - auth required pam_tally.so no_magic_root - and: - account required pam_tally.so deny=5 reset no_magic_root - Before adding the "account"-line reset counters. - The command is "faillog -a -r". - Add "auth"-line to /etc/pam.d/common-auth *after* line 10 - Add "account"-line to /etc/pam.d/common-account *after* line 9 Watch session startup during a kdm login: ========================================== # inotifywatch /etc/X11/Xsession.d/* Log boot messages: ================== $ cat /etc/default/bootlogd: # Run bootlogd at startup ? BOOTLOGD_ENABLE=Yes repeatedly run a command ======================== watch e.g. watch -d=cumulative -n1 ls -lt /var/log PCI IDs: ======== Update the PCI ID database: update-pciids After that lspci -v should display all known devices modinfo: ======== /sbin/modinfo ath_pci ssh through firewall: ===================== iptables -A INPUT -p tcp -i eth0 --dport 22 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT iptables -A OUTPUT -p tcp -o eth0 --sport 22 -m state --state ESTABLISHED,RELATED -j ACCEPT Disable firewall for vnc: ------------------------- iptables -A INPUT -p tcp -m tcp --dport 5900 -j DROP (for port 0) sshfs: ====== Install sshfs, modprobe fuse Add to /etc/fstab: sshfs#rdorsch@9.56.193.200:/ /mnt/h13 fuse allow_other,uid=1000,gid=1000,reconnect 0 0 Mount sshfs via kde menues: ---------------------------- #!/bin/bash LOCAL_USER=`whoami` SSH_USER="$LOCAL_USER" SSH_HOST="hdc201.boeblingen.de.ibm.com" SSHFS_MOUNT_PATH="/home/$LOCAL_USER/sshfs" SSH_REMOTE_PATH="/remote/usr/path/$SSH_USER" EXECUTABLE="/media/data/eclipse/eclipse" if [ `grep $SSHFS_MOUNT_PATH /proc/mounts | wc -l` -eq 1 ]; then echo "sshfs is already mouted - starting $EXECUTABLE" eval "$EXECUTABLE" else echo "mounting sshfs" if kdialog --title "sshfs is not mounted" --warningcontinuecancel "do you want to mount sshfs at $SSHFS_MOUNT_PATH?" ; then xterm -e "/bin/bash" -c "nohup sshfs $SSH_USER@$SSH_HOST:$SSH_REMOTE_PATH $SSHFS_MOUNT_PATH" sleep 3 echo "grep $SSHFS_MOUNT_PATH /proc/mounts" grep $SSHFS_MOUNT_PATH /proc/mounts if [ `grep $SSHFS_MOUNT_PATH /proc/mounts | wc -l` -eq 1 ]; then echo "starting eclipse" eval "$EXECUTABLE" else echo "warning: sshfs is still not mounted at $SSHFS_MOUNT_PATH" kdialog --title "sshfs is not mounted" --sorry "sshfs is still not mounted at $SSHFS_MOUNT_PATH \n$EXECUTABLE is not started" fi fi fi accompanying .desktop file: --------------------------- das .desktop file dazu sieht so aus: cat /media/data/Eclipse.desktop [Desktop Entry] Comment= Comment[en_US]= Encoding=UTF-8 Exec='/media/data/eclipse.sh' GenericName=Eclipse GenericName[en_US]=Eclipse Icon=eclipse MimeType= Name=Eclipse Name[en_US]=Eclipse Path= StartupNotify=true Terminal=false TerminalOptions= Type=Application X-DCOP-ServiceType= X-KDE-SubstituteUID=false X-KDE-Username= umount problems: ---------------- rdorsch@paddy:~$ umount /mnt/codesign14 umount: /mnt/codesign14 mount disagrees with the fstab rdorsch@paddy:~$ fuser -u /mnt/codesign14 Cannot stat /mnt/codesign14: Input/output error Cannot stat /mnt/codesign14: Input/output error rdorsch@paddy:~$ mount /mnt/codesign14 fuse: bad mount point `/mnt/codesign14': Input/output error rdorsch@paddy:~$ fuser -u /mnt/codesign14 Cannot stat /mnt/codesign14: Input/output error Cannot stat /mnt/codesign14: Input/output error rdorsch@paddy:~$ man fuser man: can't set the locale; make sure $LC_* and $LANG are correct rdorsch@paddy:~$ fu function funzip fuser fusermount rdorsch@paddy:~$ fuser fuser fusermount rdorsch@paddy:~$ fusermount -u /mnt/codesign14 obexfs via fuse: ================ paddy:~# grep n900 /etc/fstab obexfs.fstab#-b00:BD:3A:88:29:D3\040-B10 /mnt/n900 fuse noauto,users,allow_other 0 0 paddy:~# Allow other in /etc/fuse.conf: paddy:~# grep allow_ /etc/fuse.conf # Allow non-root users to specify the 'allow_other' or 'allow_root' user_allow_other paddy:~# Work around Debian bug 461509 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=461509 paddy:~# cat /usr/bin/obexfs.fstab #!/bin/bash # # a hack for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=461509 # # * copy to /usr/bin/obexfs.fstab # * in /etc/fstab use entries like: # obexfs.fstab#-b00:11:22:33:44:55\040\-B1 /mountpoint ... # COMMAND=/usr/bin/obexfs COMMAND+=" " for argument in $@ do COMMAND+=$argument COMMAND+=" " done # fixes http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=398051 COMMAND+="-o fsname=\"obexfs.fstab#$1\"" # need to use eval here eval $COMMAND paddy:~# Cryptoloop: =========== Using cryptoloop to create encrypted backups with Debian and restore them under Knoppix details: http://www.tldp.org/HOWTO/Cryptoloop-HOWTO/loopdevice-setup.html (use also next) and for files http://www.tldp.org/HOWTO/Cryptoloop-HOWTO/filebased.html (used aes instead of aes-256 on paddy) modprobe blowfish modprobe cryptoloop losetup -k 256 -e blowfish /dev/loop0 /udev/mdisk5 losetup -e aes /dev/loop0 /udev/mdisk5 mkfs.ext3 /dev/loop0 mkdir /mnt/crypto mount -t ext3 /dev/loop0 /mnt/crypto umount /mnt/crypto losetup -d /dev/loop0 To mount that under knoppix losetup -e blowfish256 /dev/loop0 /dev/sda5 mount -t ext3 /dev/loop0 /mnt/crypto Encrypted Harddisk: =================== From Joern Engel: cryptsetup -h sha1 create max /dev/sda mount /dev/mapper/max /var/ftp/archiv/300er/ dm-crypt: ========= see also http://www.andreas-janssen.de/cryptodisk.html http://linuxwiki.de/cryptsetup # create loop device losetup /dev/loop0 /backup-new/rdorsch.tib # format device cryptsetup luksformat -t ext3 /dev/loop0 # open device and make it known to device mapper cryptsetup luksOpen /dev/loop0 backup_crypt # mount partition mount /dev/mapper/backup_crypt /backup.aes/ #umount partion umount /backup.aes # close device cryptsetup luksClose /dev/mapper/backup_crypt Use encfs to encrypt folders: ============================= see http://ubuntuforums.org/showthread.php?t=148600 for details run aptitude: ------------- # aptitude install encfs fuse-utils # addgroup rd fuse # modeprobe fuse create encrypted folder # mkdir enc create unencrypted folder # mkdir unenc Initializing the folder # encfs /home/rd/enc /home/rd/unenc In expert mode these options may be selected Konfiguration abgeschlossen. Das angelegte Dateisystem hat die folgenden Eigenschaften: Dateisystem-Verschlüsselung: "ssl/aes", Version 2:2:1 Dateinamenkodierung: "nameio/block", Version 3:0:1 Schlüssellänge: 256 Bits Blockgröße: 1024 Bytes Jede Datei enthält 8 Bytes Vorspann mit einmaligen IV-Daten. Dateinamenkodierung benutzt IV-Verkettungsmodus. File holes passed through to ciphertext. Umount # fusermount -u /home//temp_encr dm-crypt: ========= see http://nerdcenter.de/howto-debian-loopback-dm-crypt-luks-pam-mount/ http://www.besy.co.uk/debian/how_to_setup_file_system_encryption_with_dm-crypt # modprobe aes # aptitude install dmsetup cryptsetup paddy:~# losetup /dev/loop0 /backup-new/rdorsch.tib paddy:~# KEY=`tr -cd [:graph:] < /dev/urandom | head -c 79` paddy:~# echo $KEY | openssl aes-256-cbc > container.key enter aes-256-cbc encryption password: Verifying - enter aes-256-cbc encryption password: paddy:~# https://wiki.archlinux.org/index.php/System_Encryption_with_LUKS_for_dm-crypt#Configuring_LUKS Generate key # dd if=/dev/urandom of=backup.key bs=512 count=4 # losetup /dev/loop0 /backup-new/rdorsch.tib # cryptsetup -v -c aes -s 256 luksFormat /dev/loop0 /root/backup.key # cryptsetup -d /root/backup.key luksOpen /dev/loop0 backup_crypt # mkfs.jfs /dev/mapper/backup_crypt # mount /dev/mapper/backup_crypt /backup.aes Writting a floppy image: ======================== dd if=rescue-X.Y.Z-1.img of=/dev/fd0 Reading options from the bash command line: =========================================== see man getopt (getopts is the bash built-in) and see examples in /usr/share/doc/util-linux/examples WLAN tools: =========== aircrack kismet glx (3D-support): ================= glxinfo | grep -i direct sollte yes bringen. sonst ist 3d nicht aktiv Work with pdf files - pdftk =========================== http://www.lagotzki.de/pdftk/index.html Network setup wlan: =================== /etc/network/interfaces check guessnet Export linux printer to windows: ================================ Use samba and cups: see http://www.debian-administration.org/articles/425 Automatically mount devices in KDE ================================== usbmount, pmount, hal grieve:~# diff /etc/usbmount/usbmount.conf* 20c20 < FILESYSTEMS="vfat ext2 ext3" --- > FILESYSTEMS="ext2 ext3" 33,34c33 < # FS_MOUNTOPTIONS="" < FS_MOUNTOPTIONS="-fstype=vfat,gid=floppy,dmask=0007,fmask=0117" --- > FS_MOUNTOPTIONS="" grieve:~# sync before unplugging vfat devices required -> see the /usr/share/doc/pmount/README file Power off for old PCs: ====================== /etc/lilo.conf: append="acpi=off apm=power-off" /etc/modules: apm power_off=1 alternatively to modules, add and option to modprobe.d rd@topsi:~$ cat /etc/modprobe.d/apm # laptop should power down automatically options apm power_off=1 rd@topsi:~$ top 10 commands in history: =========================== history|awk '{print $2}'|awk 'BEGIN {FS="|"} {print $1}'|sort|uniq -c|sort -rn|head -10 Input devices: ============== /proc/bus/input/devices shows the input devices as assigned to /dev/input/event[0-9] Adding signed deb sources: ========================== W: GPG error: http://www.debian-multimedia.org etch Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 07DC563D1F41B907 gpg --keyserver pgpkeys.mit.edu --recv-key 07DC563D1F41B907 gpg -a --export 1F41B907 | apt-key add - apt-cache policy: ================= topsi:~# apt-cache policy firefox firefox: Installed: (none) Candidate: (none) Package pin: (not found) Version table: 1.5.dfsg+1.5.0.7-1 999 500 http://ftp.debian.org etch/main Packages topsi:~# Removing Package: firefox Pin: release a=sarge-backports Pin-Priority: 999 from /etc/apt/sources.list brings an install candidate topsi:~# apt-cache policy firefox firefox: Installed: 1.5.dfsg+1.5.0.7-1 Candidate: 1.5.dfsg+1.5.0.7-1 Version table: *** 1.5.dfsg+1.5.0.7-1 0 500 http://ftp.debian.org etch/main Packages 100 /var/lib/dpkg/status topsi:~# and installs. gnucash umbuchungen: ==================== Hans Ulrich Niedermann schrieb: > FÂŽür den Geldverkehr zwischen diesen beiden Konten kann man weder > "ÂŽÜberweisung" noch "Lastschrift" verwenden, sondern benÂŽötigt > hÂŽöchstwahrscheinlich einen besonderen GeschÂŽäftsvorfall "Umbuchung". > > Im aqbanking-Source sehe ich > > aqbanking-2.2.3/src/plugins/backends/aqhbci/plugin/accountjobs/jobinternaltransfer.xml > > was etwas in der richtigen Richtung sein kÂŽönnte. Ja, genau das ist dafÂŽür gedacht. > Allerdings konnte ich > bislang noch nicht herausfinden, wie man das nun mit aqbanking-tool > (oder gar gnucash) benutzen kÂŽönnte. > > Habe ich da irgendetwas offensichtliches ÂŽübersehen oder ist das > einfach noch nicht fertig? In aqbanking ist das seit, ÂŽäh, 1.6.1 oder so mit drin. In GnuCash (sogar) auch, aber der MenÂŽüpunkt ist standardmÂŽäÂŽßig nicht aktiviert, weil ich da keine Abfrage auf die vorhandene aqbanking-Version einbauen konnte. Abhilfe, sogar ohne gnucash neucompilieren: Die Datei $prefix/share/gnucash/ui/gnc-plugin-hbci-ui.xml (im source: src/import-export/hbci/gnc-plugin-hbci-ui.xml) in einem Texteditor ÂŽöffnen und Zeile 21 wieder reinkommentieren, so dass sie lautet Ab dem nÂŽächsten gnucash-Start mÂŽüsste der MenÂŽüpunkt "Einzelumbuchung" (statt -ÂŽüberweisung) vorhanden sein. Christian SSD Disks: ========== Partition alignment: -------------------- There are numerous reports on partition alignment issues: e.g. http://www.nuclex.org/blog/personal/80-aligning-an-ssd-on-linux partitions should be aligned to the erase block size (128 to 512 kiB). current conclusions: -> a sector is 512 byte on current disks -> partitions are on cyclinder boundary -> a cyclinder contains a number of sectors. The number is given by the product of #heads * #sectors/track (for 512 kiB, this should be a multiple of 1024 * 512b sector size) a partionless disk (mkfs.ext4 /dev/sdc) has no alignment issues. /etc/fstat: ----------- Do not record access times - add noatime Do writeback to reduce wear-out UUID="8b30f379-55fe-49e5-97b7-0f6e7f63661a" /home ext4 noatime,discard,data=ordered 0 2 # The flags for the root filesystems are not evaluated during boot use rootflags in /boot/grub/grub.cfg instead and run update-grub UUID=8b8e1499-da6c-4526-8f9a-849dc62ac6d5 / ext4 noatime,errors=remount-ro,data=writeback 0 1 # make tmp as ramdisk tmpfs /tmp tmpfs nodev,nosuid,noexec,mode=1777 0 0 (for data=writeback it is required to run -tune2fs -o journal_data_writeback /dev/sda1 when the ext4 fs was selected, see also http://blog.loxal.net/2009/04/tuning-ext4-for-performance-with.html ) disk IO scheduler ------------------ Disable the elevator scheduler in /etc/default/grub root@omjuta:/etc/default# diff grub.orig grub 7c7 < GRUB_CMDLINE_LINUX_DEFAULT="quiet" --- > GRUB_CMDLINE_LINUX_DEFAULT="quiet elevator=noop rootflags=noatime,discard,data=ordered,errors=remount-ro" root@omjuta:/etc/default# (user grub-mkconfig to check the new configuration and update-grup to enable it) Secure erase an SSD: -------------------- See https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase After startup the SSD is usually frozen. Sending the system through a suspend/resume cycle unfroze the SSD on my ASUS P5E-VM motherboard. Fine tuning system for ssd usage (or adding local init script): --------------------------------------------------------------- blackbox:/etc/init.d# cat ssdtuning #!/bin/sh -e ### BEGIN INIT INFO # Provides: ssdtuning # Required-Start: $local_fs # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Tune SSD based system # Description: Currently setups disk scheduler and swapiness ### END INIT INFO case "$1" in start) # During boot elevator=noop is set in /etc/default/grub, revert that for normal disks echo cfq >/sys/block/sda/queue/scheduler echo cfq >/sys/block/sdb/queue/scheduler # Swap space is on a regular disk, reduce swapiness echo cfq >/sys/block/sda/queue/scheduler echo "SSD Tuning done." ;; stop|restart|force-reload) exit 0 ;; *) echo "Usage: $0 {start|stop|restart|force-reload}" >&2; exit 1 ;; esac [ ! -L /etc/resolv.conf ] \ && /usr/local/sbin/fixresolvconf blackbox:/etc/init.d# insserv ssdtuning insserv: warning: script 'K01scratchbox-core' missing LSB tags and overrides insserv: warning: script 'scratchbox-core' missing LSB tags and overrides blackbox:/etc/init.d# Trace accesses into a directory structure: ------------------------------------------ inotifywatch -v -t 3600 -r /mnt/disk Verifying the grub2 boot cmdline: ================================= rd@blackbox:~$ cat /proc/cmdline BOOT_IMAGE=/boot/vmlinuz-2.6.32-5-686-bigmem root=UUID=4a4eb948-2d2b-4188-96ae-76a3776ae69c ro quiet quiet elevator=noop rootflags=noatime,discard,data=ordered,errors=remount-ro rd@blackbox:~$ Passwords for grub: =================== paddy:~# grub-md5-crypt Password: Retype password: $1$aX.BF1$aQx4b1BVXg1v63Ym.Fhgq0 paddy:~# paddy:~# grep md5 /boot/grub/menu.lst # grub-md5-crypt, /usr/share/doc/grub ## password ['--md5'] passwd # password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/ password --md5 $1$aX.BF1$aQx4b1BVXg1v63Ym.Fhgq0 paddy:~# Do not show grub menu: ====================== rd@blackbox:/scratchbox/users/rd/home/rd/20110506$ grep HIDDEN /etc/default/grub GRUB_HIDDEN_TIMEOUT=0 rd@blackbox:/scratchbox/users/rd/home/rd/20110506$ (press SHIFT during boot to enter the menu) -- DOES NOT WORK! -- Add partition label: ==================== blackbox:~# tune2fs -L backup /dev/sda1 aqbanking - Resynchronisation: ============================== If HBCI fails with HBCI: 9210 - Unbekannte Kundensystem-ID, bitte synchronisieren Sie neu. (M) aqhbci-tool4 listusers aqhbci-tool4 getsysid -c CUSTOMERID Display CPU information: ======================== cpuid - Intel and AMD x86 CPUID display program silverboxy:~# cpuid eax in eax ebx ecx edx 00000000 00000002 756e6547 6c65746e 49656e69 00000001 00000f27 00010809 00004400 bfebfbff 00000002 665b5101 00000000 00000000 007b7040 80000000 80000004 00000000 00000000 00000000 80000001 00000000 00000000 00000000 00000000 80000002 20202020 20202020 20202020 6e492020 80000003 286c6574 50202952 69746e65 52286d75 80000004 20342029 20555043 30342e32 007a4847 Vendor ID: "GenuineIntel"; CPUID level 2 Intel-specific functions: Version 00000f27: Type 0 - Original OEM Family 15 - Pentium 4 Extended family 0 Model 2 - Stepping 7 Reserved 0 Brand index: 9 [not in table] Extended brand string: " Intel(R) Pentium(R) 4 CPU 2.40GHz" CLFLUSH instruction cache line size: 8 Hyper threading siblings: 1 Feature flags bfebfbff: FPU Floating Point Unit VME Virtual 8086 Mode Enhancements DE Debugging Extensions PSE Page Size Extensions TSC Time Stamp Counter MSR Model Specific Registers PAE Physical Address Extension MCE Machine Check Exception CX8 COMPXCHG8B Instruction APIC On-chip Advanced Programmable Interrupt Controller present and enabled SEP Fast System Call MTRR Memory Type Range Registers PGE PTE Global Flag MCA Machine Check Architecture CMOV Conditional Move and Compare Instructions FGPAT Page Attribute Table PSE-36 36-bit Page Size Extension CLFSH CFLUSH instruction DS Debug store ACPI Thermal Monitor and Clock Ctrl MMX MMX instruction set FXSR Fast FP/MMX Streaming SIMD Extensions save/restore SSE Streaming SIMD Extensions instruction set SSE2 SSE2 extensions SS Self Snoop HT Hyper Threading TM Thermal monitor 31 reserved TLB and cache info: 51: Instruction TLB: 4KB and 2MB or 4MB pages, 128 entries 5b: Data TLB: 4KB and 4MB pages, 64 entries 66: 1st-level data cache: 8KB, 4-way set assoc, 64 byte line size 40: No 2nd-level cache, or if 2nd-level cache exists, no 3rd-level cache 70: Trace cache: 12K-micro-op, 4-way set assoc 7b: 2nd-level cache: 512KB, 8-way set assoc, sectored, 64 byte line size silverboxy:~# nmap: ===== Scanning a subnet for ports/machines: ------------------------------------- silverboxy:~# nmap -sX -p 80 192.168.1.* Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2006-11-04 22:43 CET caught SIGINT signal, cleaning up silverboxy:~# nmap -sX -p 22 192.168.1.* Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2006-11-04 22:43 CET Interesting ports on silverboxy (192.168.1.1): PORT STATE SERVICE 22/tcp open|filtered ssh Nmap finished: 256 IP addresses (1 host up) scanned in 7.494 seconds silverboxy:~# Guessing OS etc: ---------------- # nmap -O -v scanme.nmap.org LastFM and streamripper: ======================== http://wiki.ubuntuusers.de/LastFM Add username and password in config.py rd@bokomoko:~$ /opt/lastfmproxy-1.3b/main.py streamripper http://localhost:1881/lastfm.mp3 Alternative: http://search.cpan.org/~jochen/last.fm-ripper-1.2/last.fm-ripper Cleaning up a Debian system: ============================ see http://www.debian-administration.org/articles/462 Purging a deinstalled package: ============================== Try "dpkg -P hotplug". If the package is properly purged you should see this: $ dpkg -l hotplug Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version Description +++-====================-====================-======================================================== pn hotplug (no description available) bcm4318 and ndiswrapper: ======================== http://wiki.linuxquestions.org/wiki/Broadcom_4318_Airforce_one_54g_card Rename disk partitions: ======================= I had LKG7F63BB:~# fdisk /dev/sda The number of cylinders for this disk is set to 4870. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): p Disk /dev/sda: 40.0 GB, 40060403712 bytes 255 heads, 63 sectors/track, 4870 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 31 248976 82 Linux swap / Solaris /dev/sda2 * 32 4870 38869267+ 83 Linux Partition table entries are not in disk order Command (m for help): I deleted both partitions and created first sda1 from 32 to 4870 and then sda2 from 1 to 31 again: LKG7F63BB:~# fdisk /dev/sda The number of cylinders for this disk is set to 4870. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): p Disk /dev/sda: 40.0 GB, 40060403712 bytes 255 heads, 63 sectors/track, 4870 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 32 4870 38869267+ 83 Linux /dev/sda2 1 31 248976 82 Linux swap / Solaris Partition table entries are not in disk order Command (m for help): Works well. Setting up a PXE server: ======================== Download the PXE-on-a disk image: PXE-on-a-disk: ftp://ftp.scyld.com/private/jlehan/pxe-on-a-disk.html Get pxe-on-a-disk.tar.bz2 and extract it. Copy the pxe image on a floppy: dd if=pxe-on-a-disk.floppy of=/dev/fd0 ; sync Install an tftp server silverboxy:/opt# apt-get install tftpd-hpa (automatically adds to /etc/inet.d tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot ) Populate the tftpboot directory with the appropriate debian-installer files: wget http://ftp.nl.debian.org/debian/dists/testing/main/installer-i386/rc1/images/netboot/netboot.tar.gz cd /var/lib/tftpboot tar xvfz /netboot.tar.gz Add lines in dhcpd.conf (of a running dhcp server) /etc/dhcpd.conf: add one line for host topsi host topsi { filename "/pxelinux.0"; # for pxe boot hardware ethernet 08:00:46:0c:b2:b2; fixed-address 192.168.1.99; server-name "silverboxy"; option host-name "topsi"; } Make sure that the dhcpd runs on the right interface: /etc/default/dhcp (/etc/network/interface might need some editing). Booting the laptop from the pxe floppy should boot the laptop with the debian installer. Dec 6 11:17:23 LKG7F63BB ntpd_initres[1825]: ntpd returns a permission denied error! Dec 6 11:17:23 LKG7F63BB last message repeated 3 times Dec 6 11:18:23 LKG7F63BB last message repeated 4 times Dec 6 11:19:23 LKG7F63BB last message repeated 4 times Shorewall: ========== default configs are in /usr/share/doc/shorewall/examples Three important things todo: ---------------------------- 1. /etc/default/shorewall: enable shorewall at startup 2. Enable IP forwarding /etc/shorewall/shorewall.conf: -> Double check IP_FORWARDING=Keep see http://www.shorewall.net/FAQ.htm#faq76 3. Enable SIP for the local network: For SIP and NAT: rmmod nf_nat_sip rmmod nf_conntrack_sip # cp /usr/share/doc/shorewall-common/default-config/modules /etc/shorewall/ blackbox:/etc/shorewall# diff /usr/share/doc/shorewall-common/default-config/modules modules 90c90 < loadmodule nf_conntrack_sip --- > loadmodule nf_conntrack_sip sip_direct_media=0 blackbox:/etc/shorewall# restart shorewall Config dir: ----------- blackbox:/etc/shorewall# ls -l insgesamt 36 -rw-r--r-- 1 root root 508 22. Mai 20:37 interfaces -rw-r--r-- 1 root root 453 8. Nov 2007 Makefile -rw-r--r-- 1 root root 897 22. Mai 21:07 masq -rw-r--r-- 1 root root 3600 22. Mai 23:23 modules -rw-r--r-- 1 root root 744 22. Mai 23:04 policy -rw-r--r-- 1 root root 555 22. Mai 20:09 rules -rw-r--r-- 1 root root 4004 22. Mai 21:02 shorewall.conf -rw-r--r-- 1 root root 4006 22. Mai 20:52 shorewall.conf.orig -rw-r--r-- 1 root root 427 22. Mai 20:21 zones blackbox:/etc/shorewall# blackbox:/etc/shorewall# cat interfaces # # Shorewall version 4 - Interfaces File # # For information about entries in this file, type "man shorewall-interfaces" # # The manpage is also online at # http://www.shorewall.net/manpages/shorewall-interfaces.html # ############################################################################### #ZONE INTERFACE BROADCAST OPTIONS net ppp0 detect dhcp loc eth0 detect tcpflags,nosmurfs,dhcp #LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE blackbox:/etc/shorewall# blackbox:/etc/shorewall# cat zones # # Shorewall version 4 - Zones File # # For information about this file, type "man shorewall-zones" # # The manpage is also online at # http://www.shorewall.net/manpages/shorewall-zones.html # ############################################################################### #ZONE TYPE OPTIONS IN OUT # OPTIONS OPTIONS loc ipv4 net ipv4 fw firewall #LAST LINE - ADD YOUR ENTRIES ABOVE THIS ONE - DO NOT REMOVE blackbox:/etc/shorewall# blackbox:/etc/shorewall# diff shorewall.conf.orig shorewall.conf 107c107 < IP_FORWARDING=Keep --- > IP_FORWARDING=Yes 125c125 < ROUTE_FILTER=Yes --- > ROUTE_FILTER=No blackbox:/etc/shorewall# Documentation: http://www.shorewall.net/three-interface.htm#DNAT Module Assistant: ================= module-assistant update module-assistant get openafs module-assistant build openafs module-assistant install openafs Openafs: ======== Connection timed out Problem: Ohne ersichtlichen Grund kommt es immer wieder zu Fehlermeldungen ``Connection timed ou''. Lösung: Nicht gesichert, eine Vermutung, die in einer Newsgroup genannt wurde: Der AFS-Cache (bei Debian /var/cache/openafs) ist in nicht konsistentem Zustand (z.B. nach Systemabsturz oder Stromausfall). Eventuell hilft ``fs flush''. Sonst muss der AFS-Client gestoppt und dann /var/cache/openafs/* gelöscht werden. Danach den Client wieder starten. HAL: ==== lshal Check which are the groups with special permission: /etc/dbus-1/system.d/hal.conf in this case powerdev and plugdev Getting kde-guidance-powerdaemon to suppress continous OSD: =========================================================== add user to powerdev and restart dbus Firefox user agent switcher addon: ================================== https://addons.mozilla.org/firefox/59/ Firefox: unresponsive script: ============================= http://lifehacker.com/software/firefox/put-off-firefox-15s-unresponsive-script-dialogue-162574.php - Type about:config in Firefox's address bar. - Filter down to the value for dom.max_script_run_time. - Change the value to something higher than the default (which is 5.) I set mine to 20. Device enumeration: =================== For network devices, you can avoid this reordering by using the ifrename utility to bind physical devices to specific names at boot time. See ifrename(8) and iftab(5) for more information. You can also avoid this by using udev rules, more specifically, through the definitions at /etc/udev/rules.d/z25_persistent-net.rules[4]. Both alternatives (ifrename and udev) should not be used at the same time. OpenNIC: ======== ns1.de.opennic.glue (Cologne, DE) - 217.115.138.24 ns1.jp.opennic.glue (Tokyo, JP) - 219.127.89.34 ns2.jp.opennic.glue (Tokyo, JP) - 219.127.89.37 ns1.nz.opennic.glue (Auckland, NZ) - 202.89.131.4 ns1.uk.opennic.glue (London, UK) - 194.164.6.112 ns1.phx.us.opennic.glue (Phoenix, AZ, US) - 63.226.12.96 ns1.sfo.us.opennic.glue (San Francisco, CA, US) - 64.151.103.120 ns1.co.us.opennic.glue (Longmont, CO, US) - 216.87.84.209 ns1.ca.us.opennic.glue (Los Angeles, CA, US) - 67.102.133.222 ns1.be.opennic.glue (Luik, Belgium) - 83.217.93.246 Meter data through a pipe: ========================== rdorsch@paddy:~$ apt-cache show pv Package: pv Priority: optional Section: utils Installed-Size: 216 Maintainer: Cédric Delfosse Architecture: i386 Version: 0.9.6-1 Depends: libc6 (>= 2.3.6-6) Suggests: doc-base Filename: pool/main/p/pv/pv_0.9.6-1_i386.deb Size: 42574 MD5sum: 8a563b015e6fe8cbe3c0bdd4bbaccec1 SHA1: 18082a862bfd5dced23d53369f4d015666b44f89 SHA256: e39558ca68ebe851f39650360618f6e59867a1085f95907e645000b6482d3156 Description: Shell pipeline element to meter data passing through pv (Pipe Viewer) can be inserted into any normal pipeline between two processes to give a visual indication of how quickly data is passing through, how long it has taken, how near to completion it is, and an estimate of how long it will be until completion. . To use it, insert it in a pipeline between two processes, with the appropriate options. Its standard input will be passed through to its standard output and progress will be shown on standard error. Tag: interface::commandline, role::program, scope::utility, use::monitor rdorsch@paddy:~$ D-Link DWL-G122 =============== # module-assistant prepare # May not be needed # module-assistant get rt2x00 # module-assistant build rt2x00 topsi:~# cd /usr/src/ topsi:/usr/src# dpkg -i rt2x00-modules-2.6.18-4-686_0cvs20060928-1+2.6.18.dfsg.1-11_i386.deb # modprobe rt2500usb in /etc/network/interfaces: iface wlan0 inet dhcp wpa-ssid xxxxxxxxx wpa-key-mgmt WPA-PSK wpa-psk xxxxxxxxxxxxxxxxxxxxxxxxx wpa-driver wext For intermittent connection problems, try iface wlan1 inet dhcp pre-up iwconfig wlan1 power off pre-up iwconfig wlan1 rate 11M wpa-ssid LS6 wpa-key-mgmt WPA-PSK wpa-psk XXXXXXXXXXXXXXXXXXXXXXXx (see also http://www.uluga.ubuntuforums.org/showthread.php?p=9295045 ) Limiting MTU in DHCP environment: ================================= Server side: ------------ rd@nslu2:~$ grep interface-mtu /etc/dhcp3/dhcpd.conf option interface-mtu 1492; rd@nslu2:~$ Client side: ------------ /etc/dhclient.conf request interface-mtu; On a router in a pppoe network: ------------------------------- Use in shorewall.conf CLAMPMSS=Yes This modifies the MSS in TCP SYN requests to the maximum MSS supported by a connection in this router. The proper way of setting the MSS is using path mtu discovery (PMUTD), but this requires that ICMP pakets like 'Destination unreachable: Fragmentation needed, but DF set.' must not be blocked by a firewall. For details see http://www.sauff.org/blog/static.php?page=mtu-mini-faq#1.6 Port forwarding (e.g. for VNC within shorewall): ================================================ /etc/shorewall/rules # accept packets ACCEPT net $FW tcp 5900 #vnc # and forward them DNAT net loc:192.168.1.10 tcp 5900 - Dump TCP traffic: ================= tcpdump -i any host debtags: ======== see /var/lib/debtags/package-tags Ken's kubuntu tips: =================== http://www.elliptique.net/~ken/Kubuntu.txt /etc/network/interfaces for WLAN: ================================= auto eth1 mapping eth1 script guessnet-ifupdown map default: remmi map timeout: 15 map verbose: true iface wlan inet dhcp # Residence Inn, Pok iface rinn inet dhcp pre-up iwconfig eth1 essid GoldenTree iface fischach inet dhcp wpa-ssid Herbert wpa-psk xxxxxxxx wpa-proto WPA wpa-pairwise TKIP wpa-group TKIP wpa-driver wext #Remmingers iface remmi inet dhcp wpa-ssid remmi wpa-psk xxxxxxxxxxxxxxx wpa-proto WPA wpa-pairwise TKIP wpa-group TKIP wpa-driver wext # WEP interface iface wepexample inet dhcp wireless_mode Managed wireless_essid Wlan wireless_freq 2.412G wireless_channel 3 wireless_nick LaptopWlan wireless_key restricted 1 XXXXDEINWLANKEYXXXX wpa_cli: ======== paddy:~# wpa_cli wpa_cli v0.5.5 Copyright (c) 2004-2006, Jouni Malinen and contributors This program is free software. You can distribute it and/or modify it under the terms of the GNU General Public License version 2. Alternatively, this software may be distributed under the terms of the BSD license. See README and COPYING for more details. Selected interface 'eth1' Interactive mode > status bssid=00:14:a8:a1:17:90 ssid=IBM id=0 pairwise_cipher=NONE group_cipher=NONE key_mgmt=IEEE 802.1X (no WPA) wpa_state=COMPLETED ip_address=9.152.98.211 Supplicant PAE state=AUTHENTICATED suppPortStatus=Authorized EAP state=SUCCESS selectedMethod=17 (EAP-LEAP) > qemu: ===== boot from an iso: qemu -cdrom cd.iso -boot d -m 512 for the kqemu acceleration, see http://www.nabble.com/Bug-418516:--dev-kqemu-is-not-created-automatically-when-loading-module-kqemu-t3551962.html Setup virtual windows in wine: ============================== # export WINEPREFIX=$HOME/.wine-wow/ # winecfg # wine "D:\Setup.exe" or # WINEPREFIX=$HOME/.wine-wow/ wine "C:\Program Files\WoW\WoW.exe" -opengl wine setup: =========== Install wine 0.9.35 Install mfc42 using ------------------- unzip mfc42.zip $ cabextract mfc42.exe Extracting cabinet: mfc42.exe extracting olepro32.dll extracting msvcrt.dll extracting mfc42.dll extracting Mfc42.inf extracting ADVPACK.DLL extracting W95INF32.DLL extracting W95INF16.DLL installed fine. cp mfc42.dll /home/rd/.wine/drive_c/windows/system32/ To bypass the IE check ---------------------- save in: IeVersionByPass.reg those lines : " REGEDIT4 [HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer] "Build"="6.0.2800.1106" "Version"="6.0.2800.1106" "W2kVersion"="6.0.2800.1106" [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Ports] " and import it via regedit. then use Wine Gecko when it ask to be autoinstalled if app wants to render someting in html for example. For Microsoft Data Access Components (mdac): -------------------------------------------- http://www.lanetelecom.com/guest/Guest.aspx Call wine MDAC_TYP.EXE twice, first ends with error. for microsoft jet: ------------------ http://www.microsoft.com/downloads/details.aspx?familyid=4335216C-8CDD-4168-A030-46F815D3F5CD&displaylang=de wine Jet40SP8_9xNT.exe for dlls: --------- http://www.dll-files.com/ e.g. MSVCP60.DLL unzip file and mv MSVCP60.DLL /home/rd/.wine/drive_c/windows/system32/ Wiki: ===== Finding the user data: ---------------------- Goto the wiki data dir: /var/www/wiki/data on atc To peek into a user's data: 1. Become root, or whatever user is allowed to access the user files. 2. Go to the data/user directory, where the user files are. 3. grep UserName * (grep Name= *) in new version Removing / disabling a user account ----------------------------------- You can remove a user by deleting his user file (and other files that are named with that userid prefix). Be aware that if you do that, you will destroy the edit history of that user. Moin won't be able to show this user in page history, because this user id will then be unknown. So better disable an account rather than removing it. Just edit the user file and set disabled=1. It also is a good idea to change the user name and email when disabling it - just append -disabled to avoid trouble with duplicate names/emails if somebody else wants to create an account with the same name. Add a user ---------- -> Use the web interface to create account -> Edit http://alzental-castle.de/Wiki/AdminGroup appropriately (alternatively, for a single page change acl_rights_default in /etc/moin/wikimaster.py or start the file with #acl: UserName: read,write,revert ) zip files with AES encryption ============================= 7z a -tzip -p exam.zip Exam.pdf controlling X resources: ======================== editres Debug xorg.conf: =========== Check for (EE) lines fglrx switching displays: ========================= With the fglrx driver On-the-fly works with aticonfig in the newest Drivers, see Display Switching. Additionally, to use both ports there is the possibility to either have the monitor connected during X startup, or force activation of both ports by adding Option "ForceMonitors" "lvds,crt1" to the Device section in your /etc/X11/xorg.conf. Powering the CRT port consumes 400-500mW, regardless of whether a CRT is attached. http://www.thinkwiki.org/wiki/Fglrx#Display_Switching_.28Dynamic_Display_Management.29 Display Switching (Dynamic Display Management) Version 8.25.18 introduces a new feature: Dynamic Display Management. It allows display switching on-the-fly. To list all connected and enabled monitors: # aticonfig --query-monitor To switch displays: # aticonfig --enable-monitor=STRING,STRING, where STRING can be: none, lvds, crt1, crt2, tv, tdms1, tdms2 Only 2 displays can be enabled at the same time. Any displays that are not on the list will be disabled. nvidia graphics and KDE4: ========================= http://techbase.kde.org/User:Lemma/KDE4-NVIDIA rdorsch@paddy:~/Managed/zIOSSM/doc/DeveloperGuide/ModelSpecification/Figures$ nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1 Attribute 'InitialPixmapPlacement' (paddy:0.0) assigned value 2. Attribute 'GlyphCache' (paddy:0.0) assigned value 1. rdorsch@paddy:~/Managed/zIOSSM/doc/DeveloperGuide/ModelSpecification/Figures$ Holding a package in Debian: ============================ echo "wine hold" | dpkg --set-selections That should do it in a clean way so that apt-get update will still work for other packages. Regular "apt-get install wine" will override the hold status when wine works again. Sort installed Debian packages by-size: ======================================= topsi:~# dpkg-query -W -f='${Installed-Size;10}\t${Package}\n' | sort -k1,1n Find new kde packages/find packages that depend on another package: =================================================================== aptitude -F '%p%d' search '!~i~Dkdelibs5' User Agent in apt get: ====================== kann man also in der /etc/apt/apt.conf.d/01local noch folgendes adden: Acquire::http::User-Agent "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10" Opensync: ========= Setup (now part of lenny): rd@silverboxy:~$ grep opensync /etc/apt/sources.list #opensync deb http://opensync.gforge.punktart.de/repo/opensync-0.21/ etch main deb-src http://opensync.gforge.punktart.de/repo/opensync-0.21/ etch main rd@silverboxy:~$ Then install aptitude install libopensync-plugin-file libopensync-plugin-kdepim libopensync-plugin-irmc opensyncutil libgnokii3 # list installed plugins msynctool --listplugins # add synchronization group msynctool --addgroup filefile # add group members msynctool --addmember filefile file-sync msynctool --addmember filefile file-sync msynctool --addmember filefile irmc-sync # show group msynctool --showgroup filefile # configure members msynctool --configure filefile 1 msynctool --configure filefile 2 msynctool --configure filefile 3 # run synchronization msynctool --sync filefile # for the S55: msynctool --sync rd --filter-objtype event --filter-objtype note --filter-objtype todo Configurations: rd@silverboxy:~/.opensync/group1/1$ cat file-sync.conf /home/rd/tmp.nobackup/sync1 FALSE rd@silverboxy:~/.opensync/group1/1$ cd .. rd@silverboxy:~/.opensync/group1$ cd 3 rd@silverboxy:~/.opensync/group1/3$ cat irmc-sync.conf bluetooth 00:01:E3:1F:AB:AB 5 rd@silverboxy:~/.opensync/group1/3$ (for the channel search the sdptool browse for irmc) (see also http://www.opensync.org/wiki/SetupGuide) Traces for debugging: --------------------- They are difficult to read but might be useful for developers. mkdir /tmp/osynctraces/ export OSYNC_TRACE=/tmp/osynctraces/ msynctool ... Second Life for Etch: ===================== build - openjpeg_1.1.1-4.dsc - xmlrpc-epi_0.51-1.dsc - slviewer_1.15.1.3-1.dsc on etch i386 from http://www.tbble.net/debian/slviewer/ used libcurl3-openssl-dev as build dependency instead of libcurl4-openssl-dev Debian update notification: =========================== -> update-notifier -> cron-apt cp /usr/share/doc/cron-apt/examples/[0-9]* /etc/cron-apt/action.d/ /etc/cron-apt/config: MAILON="output" Make the update run quiet: -------------------------- nslu2:/etc/cron-apt/action.d# diff 3-download 3-download.orig 2c2 < dist-upgrade -d -y -o APT::Get::Show-Upgraded=true -o quiet=3 --- > dist-upgrade -d -y -o APT::Get::Show-Upgraded=true nslu2:/etc/cron-apt/action.d# Storage of crontab: =================== ls /var/spool/cron/crontabs/ network interfaces are persistent (or change when migrating to another box): ============================================================================ This file contains the mac address / interface mapping /etc/udev/rules.d/z25_persistent-net.rules (lenny) or /etc/udev/rules.d/70-persistent-net.rules (squeeze) Check connectivity: =================== if printf "HEAD / HTTP/1.0\r\n\r\n" | nc -w 10 cqweb.rchland.ibm.com 8080; then /usr/local/lib/auth/bfs-auth-cq $pw fi SSE2007 ======= Hallo Linuxer! Meine bisherige erfolgreiche Steuersoftware TAX Professional unterstützt mit der Version 2007 (Steuerjahr 2006) direkt keine Linux/Wine Version mehr. So habe ich die Steuertipps SSE07 mal ausprobiert. Wollte euch mal kurz meinen Werdegang bezügliches des Themas darstellen, vielleicht kann jemand die Hinweise gebrauchen. Mein System ----------- Suse Linux 10.1 wine-0.9.37 Drucken mit cups auf lokalem HP Laserjet Steuertipps SSE07 Folgende Schritte habe ich durchgeführt, bzw. waren nötig 1) Herunterladen und Installation der Testversion von SSE07 2) Nach Fehlermeldung von fehlenden Fonts (arial, courier), fonts (zum Beispiel arial32.exe) heruntergeladen und installiert 3) Aufgrund von Font Darstellungesproblemen der Steuersoftware ein paar rpm's nachgeladen und mit rug installiert cabextract-0.6-1.i386.rpm prelink-0.3.10-2.1.i586.rpm fontforge-20060715-7.3.i586.rpm wine-0.9.37-12.1.i586.rpm 4) Fehlende Windoof Treiber Datei MSVCP60.DLL herunter gelanden und nach ~/.wine/drive_c/windows/system32 kopiert. 5) Nachdem die Darstellung von SSE07 nun besser aussah, Lizenzschlüssel gekauft und über den LicenceManager.exe aktiviert. 6) Online update durchgeführt. Fehlercode 28 - Abbruch mit einem link-Setzen gelöst cd /usr/lib/wine ln cmd.exe.so wcmd.exe.so Die Wiederholung des OnlineUpdates führt ziemlich am Ende des Updates nach dem Kommentar 'Patchprozess abgeschlossen' zu einem Fehlercode 4, was aber wohl kein Problem darstellt. 7) Nach der Erstellung der Steuererklärung ließ sich der Drucker nicht mehr über wine Applikationen ansprechen. Das Öffnen des Druckerfenster (zum Ausdrucken der komprimierten Erklärung) zeigte nur 'Dummy' Werte für Drucker Status und Typ. Das Problem ließ sich lösen durch Umbenennen und Neuinitialisierung des '.wine' Verzeichnisses. Um sicher zu gehen, Steuersoftware SSE07 in das neue '.wine' installiert. Dann klappte es. Ob der Drucker ansprechbar ist, lässt sich schnell über 'wine notepad.exe' klären. Soweit so gut. Steuererklärung erstellt und abgeschickt. Das Programm läuft auch recht flüssig, teilweise besser als das TAX Prof Programm. SSE2008: ======== Online-Update funktioniert nicht: Anleitung in http://www.steuertipps.de/?softlinkID=10552&cfid=17143055&cftoken=21466156 folgen Druckprobleme: -------------- Passt nicht auf das Papier: Vielleicht helfen die Bordmittel vom Programm, nämlich das Stauchen eines Ausdruckes. DATEI - DRUCKEN - DRUCKER - Seitenränder SSE09: ====== rd@blackbox:~$ wine --version wine-1.1.28 rd@blackbox:~$ export WINEPREFIX=$HOME/.wineSSE09 winecfg wine /home/rd/SW.nobackup/SSE_14.10.exe wine /home/rd/SW.nobackup/SSEUpdate.exe cp ~/SW.nobackup/wc20040108.exe ~/.wineSSE09/drive_c/windows/system32/calc.exe Start with env WINEPREFIX="/home/rd/.wineSSE09" wine "C:\Programme\Akademische Arbeitsgemeinschaft\Steuerprogramm\2009\StartCenter.exe" (identisch mit Desktop icon) SSE10: ====== rd@blackbox:~$ wine --version wine-1.2 rd@blackbox:~$ #compile wine rd@blackbox:~$ export WINEPREFIX=$HOME/.wineSSE10 winecfg #download winetricks winetricks vb6run winetricks vcrun2005 wine /home/rd/SW.backup/SSE10/SSE_15.11.exe # Download update from http://www.steuertipps.de/?menuID=7&navID=110 wine /home/rd/SW.nobackup/SSEUpdate.exe # Start SSE using wine .wineSSE10/drive_c/Programme/Akademische\ Arbeitsgemeinschaft/Steuer-Spar-Erklaerung\ 2010/StartCenter.exe For printing issue: switch win version to 98 winetricks corefonts Sending SMS from kaddressbook via sipgate: ========================================== (see also http://www.pro-linux.de/news/2009/13679.html) blackbox:~# aptitude install libfrontier-rpc-perl libcrypt-ssleay-perl rd@blackbox:/usr/local/bin$ cat sipgateAPI-sms.pl #!/usr/bin/perl -w # # Sam Buca, indigo networks GmbH, 08/2007 # # This script is a very basic perl-client to the SAMURAI service # provided by sipgate (indigo networks GmbH) without any claim to # completeness and without any warranty! # # The following code shows how to use the service to send messages # via SMS using a sipgate account. # use strict; use Frontier::Client; # needed for XMLRPC # declare some variables for later use: my $VERSION = "1.0"; my $NAME = "sipgateAPI-sms.pl"; my $VENDOR = "indigo networks GmbH"; my $url; my $xmlrpc_client; my $xmlrpc_result; my $args_identify; my $args; # check the count of commandline parameters and show usage information # if not matching: unless (@ARGV == 4) { print "\n"; print "This script needs 4 parameters supplied on the commandline:\n"; print "\n"; print "parameter 1 -> the username (not SIPID) used to login to sipgate\n"; print "parameter 2 -> the password associated with the username\n"; print "parameter 3 -> the number to send the message to\n"; print " (with national prefix, e.g. 4917xxxxxxxxx)\n"; print "parameter 4 -> the message to send quoted in \" or \'\n"; print "\n"; exit 0; } # define URL for XMLRPC: $url = "https://$ARGV[0]:$ARGV[1]\@samurai.sipgate.net/RPC2"; # create an instance of the XMLRPC-Client: $xmlrpc_client = Frontier::Client->new( 'url' => $url ); # identify the script to the server calling XMLRPC-method "samurai.ClientIdentify" # providing client-name, -version and -vendor: $args_identify = { ClientName => $NAME, ClientVersion => $VERSION, ClientVendor => $VENDOR }; $xmlrpc_result = $xmlrpc_client->call( "samurai.ClientIdentify", $args_identify ); # the check for success is not necessary in this case since the Frontier::Client module # dies with an exception in case of a fault, but we do it for completeness: if ($xmlrpc_result->{'StatusCode'} == 200) { print "Successfully identified to the server!\n"; } else { # we should never get here! print "There was an error during identification to the server!\n"; } # create the input argument set for XMLRPC: $args = { RemoteUri => "sip:$ARGV[2]\@sipgate.net", TOS => "text", Content => $ARGV[3] }; # do the call and store the result / answer to $xmlrpc_result: $xmlrpc_result = $xmlrpc_client->call( "samurai.SessionInitiate", $args ); # again we do the check on success for completeness: if ($xmlrpc_result->{'StatusCode'} == 200) { print "Your request was successfully send to the server!\n"; } else { # we should never get here! print "There was an error!\n"; } rd@blackbox:/usr/local/bin$ rd@blackbox:/usr/local/bin$ cat sipgateWrapper-sms #!/bin/bash NUMBER=`echo $1 | tr -c -d "[0-9]"` NUMBER=${NUMBER/#0/49} sipgateAPI-sms.pl userid password $NUMBER "`cat $2`" rd@blackbox:/usr/local/bin$ Settings in kaddressbook: sipgateWrapper-sms %N %F Converting hex to decimal: ========================== echo "ibase=16; 6CAB"|bc rdorsch@paddy:~$ let a=1+0x20 rdorsch@paddy:~$ echo $a 33 rdorsch@paddy:~$ kopete and ssl support: ======================= install qca-tls bash parameter expansion: ========================= Bash has a powerful parameter syntax. The examples below show a command on the left, the result (if any) in the center, and an explanation on the right. See “Parameter Expansion” in the bash man page. Set Up the Test Directory ------------------------- $ mkdir test $ cd test $ touch file1 file2 file3 Basic Parameter Expansion ------------------------- $ param1=hello $ echo $param1 hello $ echo ${param1}a helloa the braces separate the name $ echo ${param2} nothing there Default Values -------------- $ echo ${param2:-file*} file1 file2 file3 all files in the directory $ echo ${param2:-$param1} hello uses $param1's value... $ echo $param2 (nothing) ... but didn't change $param2 $ echo ${param3:=$param1} hello uses $param1's value... $ echo $param3 hello ... and assigns it to $param3 Substring Manipulations ----------------------- Keep in mind that the substitutions etc are expanded, not literals, so you can use wildcards and other pattern syntaxes in them (for example, the “he*l” below used to strip “hell” from the value). $ echo ${param1:2} llo substring from 2 $ echo ${param1:2:2} ll substring from 2, len 2 $ echo ${param1#he} llo strip shortest match from start $ echo ${param1#hel*} lo strip shortest match from start $ echo ${param1#he*l} lo strip shortest match from start $ echo ${param1##he*l} o strip longest match from start $ echo ${param1%l*o} hel strip shortest match from end $ echo ${param1%%l*o} he strip longest match from end $ echo ${param1/l/p} heplo replace as few as possible $ echo ${param1//l/p} heppo replace as many as possible Miscellaneous $ echo ${!param*} param1 param2 param3 parameter names starting with... $ echo ${#param1} 5 length of parameter value Example Uses ------------ # Rename all .GIF files to .gif for file in *.GIF; do mv $file ${file%GIF}gif; done # Now number the files sequentially cnt=0; for file in *.gif; do mv $file $cnt$file; let cnt=cnt++; done # Oops, I didn't mean that... get rid of the numbers. for file in *.gif; do mv $file ${file##[0-9]}; done courier-imap ============ kmail show new messages in a folder which disappear when the folder is opened: These are messages which have been deleted, but files not (yet) removed on the IMAP server and are not marked as seen: Find the with: rd@bokomoko:~/Maildir/cur$ ls -lt|grep T|grep -v S and delete them might fix the problem. removing messages: ------------------ > I delete from time to time many mails from mailing lists using a IMAP client. > I would prefer to run a cron job on the server which deletes in some folder > mails older than 6 months. Can I implement a script which just deletes the > files or are there somewhere data structures maintained which I would bread > if I bypass the IMAP interface? No, you are free to run scripts that remove individual messages. If an IMAP client happens to have the folder opened and the same time, and requests the contents of the message that you just removed, it will get an error, and some IMAP clients don't handle this very well, and crash. When the client gets restarted and reopens the folder, it should be fine. at for onetime jobs =================== bokomoko:~# echo "shutdown -h now" | at 0:30am Oct 7 warning: commands will be executed using /bin/sh job 1 at Wed Oct 7 00:30:00 2009 bokomoko:~# VPN with tinc: ============== tinc comes with good info pages copy /usr/share/doc/tinc/examples/ to /etc/tinc/ add VPN-IP to: /etc/tinc//tinc-up add client name to: /etc/tinc//tinc.conf add ConnectTo server to: /etc/tinc//tinc.conf create a key pair for each party: tincd -n -K To add a client to an existing VPN: best copy /etc/tinc/ from the VPN server then add a /etc/tinc//hosts/ directory creata a key pair copy the /etc/tinc//hosts/ directory to the VPN server changing kmail attachment size: =============================== as user: Kwriteconfig --file kmailrc --group Composer --key MaximumAttachmentSize 100 for other kmail parameters see /usr/share/config.kcfg/kmail.kcfg Kmail and gnupg: ================ Add to ~/.gnupg/options # kmail requires a running gpg-agent use-agent vectorize bitmap images: ======================== potrace -s image.bmp Using screen: ============= screen - to start a session C-a d - detach from a session C-a c - create a new window screen -R - reconnect to a previous session Encoding of files: ================== find out: rd@bokomoko:~$ file --mime eBayAgent8.pl eBayAgent8.pl: text/plain; charset=utf-8 rd@bokomoko:~$ encoding conversion: $ iconv -f ISO8859-1 -t UTF-8 eBayAgent.pl > eBayAgent8.pl migrate to utf8 =============== run utf8migrationtool gpg agent: ========== see http://www.debian-administration.org/articles/378 apt-get install gnupg-agent pinentry-qt Add rdorsch@paddy:~/tmp.nobackup$ cat ~/.gnupg/gpg.conf use-agent rdorsch@paddy:~/tmp.nobackup$ Add rdorsch@paddy:~/tmp.nobackup$ tail -3 ~/.gnupg/gpg-agent.conf pinentry-program /usr/bin/pinentry-qt no-grab default-cache-ttl 1800 rdorsch@paddy:~/tmp.nobackup$ (to be tested) Change incoding of filenames: ============================= man convmv Konqueror: ========== ssh support. sftp://rd@bokomoko.de or fuse://rd@bokomoko.de (sftp works more reliable) Display non-printable characters: ================================= vi has a ":set list" command which will show you non-printable characters, even TAB characters. In Emacs, there is no way to distinguish between TAB and SPC characters without moving the cursor over them. Manipulate a deb file: ====================== Extract content $ dpkg-deb -x xyz_1.2.3_i386.deb workdir Extract control $ dpkg-deb -ex xyz_1.2.3_i386.deb workdir/DEBIAN edit the workdir content Rebuild package from modfied content $ dpkg-deb -b workdir xyz_1.2.3_i386.deb Adding a new protocol to KDE: ============================= rd@blackbox:~$ cat .kde/share/kde4/services/notes.protocol [Protocol] exec=/opt/ibm/lotus/notes/notes %u protocol=notes input=none output=none helper=true listing= reading=false writing=false makedir=false deleting=false Icon=utilities-terminal rd@blackbox:~$ kfmclient exec "notes://bla" (4521)/ ClientApp::doIt: Creating ClientApp kioclient(4521) ClientApp::kde_open: KUrl("notes://bla") rd@blackbox:~$ Download youtube videos and convert them: ========================================= Encoding for the N800: clive --ffmpeg "/usr/bin/ffmpeg -y -i %i %o" -r avi "http://www.youtube.com/watch?v=4XpnKHJAok8" --no-cache or as ogg theora clive --ffmpeg "/usr/bin/ffmpeg -y -i %i %o" -r ogg "http://www.youtube.com/watch?v=4XpnKHJAok8" --no-cache (see also man clive for batch downloads) Using network-manager: ====================== network-manager is not touching interfaces which are referenced in /etc/network/interfaces users need to be added to the netdev group http://download.eclipse.org/releases/galileo Modelling: Graphical Modelling framework USB Disk for Bios Update with Freedos: ====================================== create stick with $ kdesudo unetbootin a FREEDOS USB stick mount the stick then loopmount the freedos image # mount -o loop ubninit /mnt/sdb5 Add the data which should be added Converting EBCDIC files from zOS: ================================= native2ascii -encoding IBM-1047 Debian USB Installer: ===================== http://d-i.alioth.debian.org/manual/en.i386/ch04s03.html#ftn.id318743 4.3. Preparing Files for USB Memory Stick Booting Use an USB stick with a FAT16 (LBA) (type 0E) partition which is marked bootable! Then just do # mkdosfs /dev/sdX1 # syslinux /dev/sdX1 # mount /dev/sdX1 /mnt copy vmlinuz and initrd.gz from http://http.us.debian.org/debian/dists/squeeze/main/installer-i386/current/images/hd-media/ and http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/i386/iso-cd/debian-testing-i386-netinst.iso create syslinux.cfg with blackbox:/mnt/sdc1# cat syslinux.cfg default vmlinuz append initrd=initrd.gz blackbox:/mnt/sdc1# To erase a potential boot-record in MBA: # install-mbr /dev/sdX Digikam issue: ============== chgrp plugdev /dev/bus/usb/001/009 See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584289