Here are notes on
- various programs I've used, or
- programs that I haven't use, but which look interesting.
Altho the notes are short, the information therein may have taken me hours to discover. Therefore others might find this useful. My preferred environment is linux and C++, supplemented by commercial tools that are good enough to be worth the hassle of license management etc.
Comments are welcome.
This page describes publicly available SW written by others. For my SW, see my Research page.
2. Boot ISO image from disk (hard drive)
2.1. What worked
2.2. What didn't work
2.3. Not thoroughly explored
2.4. Links
3. Linux multimedia incl video
4. Linux other
5. Using an ipod with linux
6. Potentially interesting C++ tools
7. Numeric SW
8. Graphics
9. LaTeX
10. Image format conversions
11. MS Office in linux
12. Matlab Hints
12.1. Two-D False Color Plot of a Matrix
12.2. Read a Data File
12.3. Plot Where the Non-Zero Entries of a Matrix Are
12.4. Run a Matlab Batch Job
13. Rendering terrain with povray
14. GPS, specifically Garmin 60csx
14.1. Track vs Active Track
14.2. Tracks saved on data card
14.3. gpsbabel - great program for processing tracks in linux
15. Linux mail user agents - comparisons, advantages and problems
15.1. Kmail
15.1.1. Bad
15.1.2. Good
15.2. Claws-mail
15.2.1. Bad
15.2.2. Good
15.3. Evolution
15.3.1. Bad
15.3.2. Good
15.4. Thunderbird
15.4.1. Good
15.5. Gmail
15.5.1. Bad
16. VMWare - shrink pre-allocated disk on windows client
17. PDF processing
17.1. Watermark a PDF file
17.2. Convert a directory of images files to PDF files
17.3. Combine a directory of PDF files into one file
17.4. Update PDF file metadata
17.5. PDF to RTF (good for MS Word)
17.6. Paginate a PDF file
1. Linux booting
- Grub disk naming when booting
- Assume you have a laptop with two disks: the original one and a second in a caddy replacing the DVD drive.
- In the BIOS, you specify the order in which the BIOS is to try booting from them.
- That is the order that grub uses when numbering disks (hd0), (hd1) etc.
- Note that the disks' positions on the bus is irrelevant here.
- If you exclude a disk from the boot order, then grub doesn't give it a number.
- Later, grub and linux name the disks according to their bus addresses.
- Up to SuSE 10.1 (approx), including older versions of Knoppix, the main disk is /dev/hda and the caddy disk /dev/sda
- From SuSE 10.2 on (approx), the main disk is /dev/sda and the caddy disk /dev/sdb.
- You can use these names later in grub, e.g., in the kernel command.
- Does /dev/sda correspond to (hd0) or (hd1)? It depends on the BIOS boot order.
- In the BIOS statup list disk (S1) is the builtin disk, and (PM) is the caddy disk.
- scsiinfo -s /dev/sda lists the disk's serial number that is printed on the disk itself.
- If /etc/fstab disagrees with the root= option on the grub kernel command, then the root= option determines what partition is mounted, but /etc/fstab determines what df shows. If they are inconsistent, then df's output will be wrong.
- Grub setup/install weirdness: The command
grub-install /dev/sdacan produce a different result thangrub > setup /dev/sdaThe former reused an old location for message. (approx; this is from memory). 10/19/2007
2. Boot ISO image from disk (hard drive)
Suppose that you wish to boot an ISO image of an OS, w/o writing the image to to an external medium, like a CD or USB drive. Info on how to do this is scattered around various mailing lists, and much of that didn't work for me.
2.1. What worked
- Ubuntu:
- Put ISO image somewhere in file system.
- Temporarily mount ISO image and copy vmlinuz and initrd files to /boot, possibly renaming them.
- Add this to grub, possibly edited:
title Ubuntu 8.04 root (hd0,0) kernel /boot/ubuntu804-amd64-vmlinuz root=/dev/sda2 vga=0x31b \ splash=silent showopts find_iso=/ubuntu.iso boot=casper initrd /boot/ubuntu804-amd64-initrd.gz lock
- Knoppix:
- See http://www.knoppix.net/forum/viewtopic.php?p=114964
- My menu.lst:
title Knoppix 5.3
root (hd0,0)
kernel /boot/isolinux/linux ramdisk_size=100000 init=/etc/init lang=us
apm=power-off vga=791 nomce bootfrom=/dev/sda2/knoppix.iso dma
myconfig=scan
initrd /boot/isolinux/minirt.gz
2.2. What didn't work
- in grub 0.97: using map --hook or map --rehook or map --mem. These options don't exist.
- grub 2.0: its authors don't claim it's ready for public use.
- grub4dos: this might be the answer since it's more flexible and powerful than grub (e.g., it has --hook and --mem), but there's too little documentation in English.
- Copying the ISO image to a separate partition then using grub
thus:
title Knoppix rootnoverify (hd0,4) chainloader (hd0,4)+1
- Using fromhd in grub thus:
title Knoppix root (hd0,1) kernel /boot/knoppix53 ramdisk_size=100000 init=/etc/init lang=us \ apm=power-off vga=791 nomce fromhd=/dev/sda2 dma myconfig=scan initrd /boot/knoppix53-minirt.gzortitle Knoppix root (hd0,1) kernel /boot/knoppix53 ramdisk_size=100000 init=/etc/init lang=us \ apm=power-off vga=791 nomce fromhd=/dev/sda2/KNOPPIX dma myconfig=scan initrd /boot/knoppix53-minirt.gz
2.3. Not thoroughly explored
- Putting the image in a separate partition with dd, marking it bootable, and causing grub to boot it.
2.4. Links
Some of these are useful.
- http://forums.hexus.net/operating-systems-applications/141523-usb-boot-iso-images-possible.html
- http://www.linuxquestions.org/questions/linux-software-2/booting-of-raw-iso-from-grublilo-though-preferably-grub-367901/
- http://www.911cd.net/forums//index.php?showtopic=18045&st=45
- http://grub4dos.sourceforge.net/wiki/index.php/Grub4dos_tutorial
- http://www.freesoftwaremagazine.com/articles/grub_intro/
- http://ubuntuforums.org/showthread.php?t=774539&highlight=grub
- http://ubuntuforums.org/search.php?searchid=41979132&pp=25&page=2
- http://ubuntuforums.org/archive/index.php/t-170530.html
- http://www.linuxquestions.org/questions/linux-general-1/boot-iso-image-from-hard-disk-294744/
- http://www.knoppix.net/forum/viewtopic.php?t=27883
- http://www.knoppix.net/forum/viewtopic.php?t=11796
- http://www.freesoftwaremagazine.com/articles/grub_intro
3. Linux multimedia incl video
- IBM Thinkpad T43p audio
- If there is no sound when playing an mp3, say with mplayer, then turn off the line jack sense and headphone jack sense in kmix (or krecord).
- Kmix settings to record
These are probably correct.
- Input » capture must be set. Level irrelevant.
- Input » microphone maybe set. Level relevant.
- Switches » mix maybe irrelevant
- Output » pcm set. Level 1/3.
- Disable everything else, else feedback loop.
- OK to mute output. Maybe better.
- Input » red mic set
- Input » capture set
- Switches » mix NOT set. Setting it unsets Input » red mic.
- Kmix settings to play input sound
- Output » master set, and reasonable level.
- Input » green mic set, and reasonable level.
- Switches » mic boost does that.
- Nothing else seems to matter.
- Kmix settings to play audio file
- Output » master set, and reasonable level.
- Output » pcm set, and reasonable level.
- Switches » line jack sense not set.
- Switches » headphone jack sense not set.
- Nothing else seems to matter.
- Other interesting pages
- Gnome-sound-recorder is another recorder.
- Alsasound can restart things if they are messed up.
- gnome-sound-properties looks useful.
- Converting wav to mp3
- Install lame from http://users.rsise.anu.edu.au/~conrad/not_lame/
- Do: notlame -h in.wav out.mp3
- Converting realaudio to wav
- Use mplayer.
- The realaudio format changes frequently.
- The current version of realaudio cannot play very old realaudio formats. Mplayer can.
- Mplayer low quality: The output from mplayer (in linux) seems to be worse quality than that of windows programs.
- Converting an AVI video to MPEG4 (from SCOREC)
- Video tools from Philippe Dreuw.
4. Linux other
- Who owns a given open file? fuser -v FILE
- Why firefox gets slower and slower: Noscript and probably other addons seem to have quadratic time performance. They record URLs in a list and apparently linearly search it. The only solution that I've found is to run firefox inside vmware and regularly restore the VM. Even deleting files that Firefox wrote seems not to work. Firefox 3 is faster, but doesn't print, for the following reason: The firefox 3 designers decided to use a feature of some other SW that had never been used before. It didn't work. Firefox says that's not their problem that the other SW fails. Meanwhile, users like me, who just want to get our work done, watch this temper tantrum and start thinking about using Windows.
5. Using an ipod with linux
This is not about installing linux on the ipod.
- http://people.csail.mit.edu/adonovan/hacks/ipod.html
- Ubuntu and Your iPod
- http://boingboing.net/2007/09/14/new-ipods-reengineer.html
- http://www.gtkpod.org/about.html
6. Potentially interesting C++ tools
7. Numeric SW
- The Object-Oriented Numerics Page
- BLAD - Bibliothèques Lilloises d'Algèbre Différentielle
- http://gmplib.org/
- NTL: A Library for doing Number Theory
8. Graphics
- VTK
- Gri language for scientific illustration
- GLE - Graphics Layout Engine / Professional Graphics Language
- Inkscape open-source vector graphics editor
9. LaTeX
- http://www.fauskes.net/nb/introducing-dot2texi/dot2texi
- http://www.ctan.org/tex-archive/macros/latex/contrib/gnuplottex/gnuplottex
- http://en.wikibooks.org/wiki/LaTeX
- ... and pmwiki. You can now include LaTeX math like \Phi_{\mu,\sigma^2}(x) = \frac{1}{\sigma\sqrt{2\pi}}\int_{-\infty}^x e^{-\left(\frac{u-\mu}{2\sigma}\right)^2}du See jsMath. This requires that Javascript be enabled. If you increase the font size and redisplay the page, the formula gets larger and looks better. Setting a minimum font size in the browser can make the formula look worse.
10. Image format conversions
- Convert ps to png:
- with gs gs -sDEVICE=png256 -r300 -sOutputFile=out.png in.ps (change the device if desired)
- with ImageMagick: convert -resize 300 email.eps email.png
11. MS Office in linux
- antiword (for reading MS Word) - often all you need. What it omits, like gratuitous images, is often content-free.
- openoffice - formerly much worse than MS Office, but getting better.
- codeweaver's crossover office (excellent)
- vmware (excellent)
12. Matlab Hints
12.1. Two-D False Color Plot of a Matrix
The matrix may be up to several thousand square.
pcolor(M) shading interp
12.2. Read a Data File
load FOO.dat or load FOO
Reads ascii file FOO.dat or FOO into matrix FOO. The file must have one row of numbers per row of the matrix.
12.3. Plot Where the Non-Zero Entries of a Matrix Are
spy(M)
12.4. Run a Matlab Batch Job
(in linux, from Metin)
matlab -nodisplay -nojvm -nodesktop -nosplash < try.m 1> try.out 2> try.err&
13. Rendering terrain with povray
povray-terrain-1.tz shows how to render images of terrain in povray.
povray-terrain-2.tz has more test data and the corresponding images.
14. GPS, specifically Garmin 60csx
14.1. Track vs Active Track
SFAIK, the only difference is that the active track has the time of each point. That is deleted when the active track is saved.
14.2. Tracks saved on data card
gpx files saved to the data card do have the times. There is one file per day. The GPS doesn't list them all (?!). They don't show on the GPS display. Get them by putting GPS in USB mode, mounting it, then copying.
Ref: http://freegeographytools.com/2007/garmin-microsd-card-tricks
14.3. gpsbabel - great program for processing tracks in linux
15. Linux mail user agents - comparisons, advantages and problems
This is based on personal experience. It contains detailed info that I've not seen in other reviews, and also not seen in the documentation.
This emphasizes the negative because a package's limitations are often more important than its advantages in deciding whether to use it. Also, the limitations are rarely mentioned in the documentation.
15.1. Kmail
15.1.1. Bad
- The whole KDE project is designed by enthusiasts for enthusiasts. It adds whatever new features the designers consider fun. Users are expected to help debug it. KDE is not intended to be a turnkey system for people who just want something that works w/o thinking about it.
- The kmail documentation is several years out of date. If that's a problem for you, then fix it yourself. The KDE developers have more fun things to do than write documentation.
- Can lose mail when internal db gets corrupted. Symptom: folder shows a message with no subject or body.
- Cannot search mail by date. It is impossible to search only within all mail from the last week. The lack of searching by date has been listed in the features request list for several years, but nothing has happened. This is still true of the current 1.9.51 version, as of 7/18/2008.
- Searching large folders within kmail is so slow as to be useless. It is much slower than searching the directory directly.
- Kmail has very specific requirements for imap, and will not talk to servers that don't have the same hi standards.
- Kmail wouldn't talk to gmail, the last time I tried. This may work now.
15.1.2. Good
- The addressbook is sophisticated. It is a complete contact program, useful for addresses, phone numbers, etc.
- Retrieving messages can be stopped by the user. This is useful if a large imap folder is being scanned.
15.2. Claws-mail
15.2.1. Bad
- Retrieving mail from several mailboxes is single threaded. Only one mailbox is checked at a time.
- Retrieving from a large imap folder cannot be stopped, short of killing claws-mail.
- The addressbook is minimal, lacking features in competing addressbooks. E.g., it is useless for storing phone numbers.
- This is a stand-alone mail program, not a component of a PIM. There is no integrated calendar.
15.2.2. Good
- claws-mail allows mail to be sorted depending on the specific address book containing the sender or recipient. This really convenient feature appears unique to claws-mail.
- You can search and filter on arbitrary headers.
- You can assign colors to messages and then search by color.
- You can watch the connection handshaking.
15.3. Evolution
15.3.1. Bad
- You cannot search by arbitrary headers.
- If a header is duplicated, only the first occurrence is used, unless you write a regex. This makes it very hard to search for mail that flowed thru a specific relay.
- You can filter on whether the sender is in any addressbook, but not whether he is in a specific addressbook.
15.3.2. Good
- You can check for supported types of authentication.
15.4. Thunderbird
15.4.1. Good
- Many addons are available.
15.5. Gmail
15.5.1. Bad
- All your mail is conveniently centralized, available for search warrants, legal or illegal fishing expeditions, disk crashes, and security failures.
16. VMWare - shrink pre-allocated disk on windows client
Preallocated disks are faster and don't get larger with more writes (they start large) but you have to pick the size at the start. What if you later want to shrink (truncate) it?
- Create a new preallocated disk file of the desired size on the host.
- Install partition magic on the client
- On the client, copy and resize the partition from the old disk to the new.
- Halt the VM.
- In the VM settings, delete the old disk, and update the IDE bus address for the new disk from 0:1 to 0:0.
- Reboot; you're done (with luck).
Thanks to http://communities.vmware.com/message/899544#899544
17. PDF processing
17.1. Watermark a PDF file
pdftk filetomark.pdf background watermark.pdf output out.pdf
or
pdftk filetomark.pdf stamp watermark.pdf output out.pdf
17.2. Convert a directory of images files to PDF files
for f in image-*.pnm
do
convert -resize 25% $f ../pdf/${f:s/pnm/pdf}
done
17.3. Combine a directory of PDF files into one file
pdftk image*pdf cat output onebigfile.pdf
17.4. Update PDF file metadata
- extract an info file:
pdftk file.pdf dump_data > info
- edit info
- pdftk file.pdf update_info info output file2.pdf
17.5. PDF to RTF (good for MS Word)
I haven't tried this, but it looks interesting.
http://3d2f.com/programs/22-038-advanced-pdf-to-rtf-converter-download.shtml
17.6. Paginate a PDF file
I haven't tried this, but it looks interesting.