Ubuntu Hacks by Jonathan Oxer, Kyle Rankin, & Bill Childers The unconfirmed error reports are from readers. They have not yet been approved or disproved by the author or editor and represent solely the opinion of the reader. Here's a key to the markup: [page-number]: serious technical mistake {page-number}: minor technical mistake : important language/formatting problem (page-number): language change or minor formatting problem ?page-number?: reader question or request for clarification This page was updated August 1, 2008. UNCONFIRMED errors and comments from readers: {1} http://proquest.safaribooksonline.com/0596527209/I-0596527209-CHP-4-SECT-1 Multiple paragraphs; Description of the Gnome Power Manager is incorrect. The organization and tab names listed do not exist in the shipping code. Features listed (backlight brightness control) do not exist in shipping code. NOTE: This errata is for the Safari online edition of the book. I don't have a physical copy of the tome to verify that the errors exist there as well. (8) Second paragraph under "Boot the Live CD in Persistent Mode"; Things have changed on the Dapper release. The drive must be named casper-rw, not casper-cow. Also, options are F6, not F4. Please see https://help.ubuntu.com/community/LiveCDPersistence#head- a18ffed91fe2214d033b3aa11affaceaf5c5a90c (14) Section Repack the Filesystem; The code line should read: $ sudo mksquashfs extracted_fs extracted_cd/casper/filesystem.squashfs (not .../filesystem.squash) [17] The use of 'update-menus'; I am referring to hack#17 as I am reading from Safari online and don't have the page number. The use of the 'update-menus' would not work inside the GNOME environment. The menu files were locked by dpkg. It only works when you start the system in failsafe terminal mode. (40) Just after fifth paragraph in line of code to be typed by the user, Use chroot; The instructions for this hack reads as follows in second paragraph below Use chroot: The removable drive will actually be mounted under the /target directory, and the first step is to mount the special /proc filesystem within that drive: #mount -t proc/target/proc After typing the above line I got the following prompt: Canīt find /target/proc/ in "etc/fstab I found the following line in ubuntuforums.org and it worked. #mount -tproc proc/target/proc Information found here: http://ubuntuforums.org/showthread.php?t=80811 (74) Installing Java Runtime Environment; When attempting the command: sudo apt-get install sun-java5-jre sun-java5-plugin sun-java5-fonts The response is that sun-java5-jre is not found. Trying them one at a time, I get that NO sun-java5- is found. I have included the multiverse and universe and etc hack. But I don't seem to be able to find java5. Also in various places throughout the book, if you do not do the hacks one at a time you may end up needing a library that is not installed from the base install. I suspect you may not have attempted these hacks from a clean install before each one. Just a note somewhere to warn the unsuspecting would probably be in order. {84} 2nd paragraph; Installation of wp-tray is dependent on libgnutls11 library. You need to go to the Synaptic Package manager and install this before installing wp-tray. {108} top of the page; June 2006: First Edition, Hack #26 The instructions for this hack are valid on Ubuntu 5.10, but not on the newest release, Dapper Drake 6.06. In the 6.06 release /etc/cups/cupsd.conf does not contain "RunAsUser Yes" (adding the line "RunAsUser No" to /etc/cups/cupsd.conf does not alter the following situation. When the "Add a Printer" wizard is opened, the PDF printer is not detected. Under the Ubuntu 6.06 release, the following workaround is effective (assuming Gnome desktop environment). Open a terminal and type "sudo nautilus" and then your password Go to Filesystem -> usr -> lib -> cups -> backend Rightclick "cups-pdf" and select Properties Go to the Permissions tab and click the "Set user ID" special flag (another way to do the above is from a terminal: sudo chmod 4755 /usr/lib/cups/backend/cups-pdf) Now the PDF printer can be added through the "Add a Printer" wizard as described. Information condensed from here: http://ubuntuforums.org/showthread.php?t=188860 {108} Top, First paragraph; Not really a technical mistake so much as an update. In Dapper (6.06) the method for adding a PDF printer has changed. After adding the cups-pdf package the following command must be run: sudo chmod +s /usr/lib/cups/backend/cups-pdf then follow the directions as described in the book (omitting the edit of the /etc/init.d/cupsd.conf file). Taken from: https://help.ubuntu.com/community/PDFPrinting?action=show&redirect=forum%2Fsoftware%2Fcups- pdf {108} 1st line; There is no entry in the cupsd.conf file that has RunAsUser. Refer to: https://help.ubuntu.com/community/PDFPrinting?action=show&redirect=forum%2Fsoftware%2Fcups- pdf This has an update that you need to set the permission on /usr/lib/cups/backend/cups- pdf to overcome a bug. The wiki even says that you need to change RunAsUser, but I was successful in using the printer without this modification. {115} Section "Install Codecs of Ambiguous Legality"; ftp://ftp.nerim.net no longer has a directory "debian-marillat". After a bit of googling, I found http://debian.video.free.fr/ which states: 07/05/2006 : Why Marillat's repository doesn't work ? Because now the repository is here debian- multimedia.org See at the bottom for news sources.list entries. Now you can use the distro name or the alias name (stable --> sarge or etch --> testing). I can't seem to find the w32codecs_20050412-0.0_i386.deb file in the mirrors, though. RESPONSE FROM AUTHOR: That particular file has been superseded by a newer package. The specific file listed ("w32codecs_20050412-0.0_i386.deb") includes the version number, so you need to look for the same package but without the specific version. The actual package name is the portion before the first underscore, ie: "w32codecs". The new packages can be obtained by editing the file "/etc/apt/sources.list" as specified on the www.debian-multimedia.org site. Open your "sources.list" file and add a line like this: deb http://www.debian-multimedia.org testing main Then "sudo apt-get update" to refresh the package list, and you'll be able to find the package using "apt-cache search w32codecs" and install it with "sudo apt-get install w32codecs". [176] Hack #47; This hack does not seem to reflect Ubuntu 6.06 RLS and xorg setup in that release. Several technical inconsistancies appear. 1) the Option "Buttons" "n" line in the xorg.conf file seems to mean exactly that, the number of buttons not counting the scroll or tilt wheels. 2) the ZAxisMapping entry is which physical button to map to a Z axis movement, but also appears to effect the total physical button count. 3) The xmodmap will require that any mapping includes a total button count which reflects the number value for "Buttons" + the number of physical buttons mapped in "ZAxisMapping" + 2. I have not yet figured out the reason nor the use of the + 2. So the default setup gives a count of 9. 4) The physical button to button code mapping is what is done by xmodmap. The value it requires for it's -e "pointer" command is dependant on the above calculation. It will error out and not assign any mapping if either a syntactical error or quantity (of buttons) error is noticed. 5) The 'Start-> Preference -> Sessions -> Startup Programs' entry does not take (that I can find) quote marks correctly, which are required to pass the -e (execute) parameter to xmodmap. In order to get this to work you should put the entry xmodmap .xmodmaprc into the Startup Programs list; create the .xmodmaprc file (in your top level user directory) to contain any mapping commands. 6) The default driver for most mice in 6.06 is "ExplorerPS/2" so a modification is not usually required. Given all of that... here is the sequence needed to get a "Microsoft Trackball Explorer V1.0" to work so the 'extra' buttons function as back and forward in FireFox. This mouse has the following button code layout as reported by xev. 1 = left button 2 = wheel press-down button 3 = right button 4 = wheel forward event 5 = wheel back event 6 = not seen 7 = not seen 8 = extra left most button 9 = extra right most button To get these to work: a) do not modify /etc/X11/xorg.conf as the defaults will work. The Buttons option is set to 5, which we have. The ZAxisMapping is set to 4 5, which is what xev reported for the wheel movement. b) since firefox appears to expect the back and forward buttons as physical buttons 6 and 7 (this was determined empirically so YMMV) you will need to map 8 and 9 to those positions. c) create a .xmodmaprc (or call it what you want) file in your top level directory. d) Insert the following line pointer = 1 2 3 4 5 8 9 6 7 NOTE - no quotes or delimiters e) In the System->Preferences->Sessions->Startup Programs window add the command xmodmap .xmodmaprc f) before invoking ... test the process. 1) open a terminal window 2) enter: xmodmap -pp you'll get the current mapping dump 3) enter: xmodmap .xmodmaprc this should not respond with anything, if all is correct 4) enter: xmodmap -pp you should see the new map with physical button 6 mapped to button code 8 physical button 7 mapped to button code 9 physical button 8 mapped to button code 6 physical button 9 mapped to button code 7 5) open Firefox, select a link; hit left extra button and it should do a back page; hit the right extra button and it should do a forward page. g) if all went well, log out and back in. Since we didn't modify the xorg.conf you need not restart the GDM. [227] HACK #60; Since your book was published, a change has been made. Modifications for the sources.list are contained in files written to the directory /etc/apt/sources.list.d. files: dapper-commercial.list dapper-multiverse.list dapper-universe.list Ubuntu will add these files automatically when you request a non standard package. A dialog box comes up and asks 'would you like to add this channel?' With Kubuntu, you have to add these files manually to access packages such as libxine-extras and opera. [230] 4th example; your book talks to dapper. I updated to fawn then bought your book. why is deb http:// ... not recognized? {278} Paragraphs 6 and 7; These paragraphs give directions for editing the file "config" for use with a proxy. Both paragraphs discuss editing sections 1.5 and 1.6 of the "config" file. The correct settings are contained in sections 2.5 and 2.6 of "config". {279} Figure 7-8; While I have had success with this hack, during a fresh install today I found the following error in /var/log/tor/log: "Aug 11 17:13:43.261 [warn] You are running Tor version 0.1.0.16, which will not work with this network. Please use one of 0.1.0.18,0.1.1.23." Following the Tor documentation to http://wiki.noreply.org/noreply/TheOnionRouter/TorOnDebian , I installed Tor version 0.1.1.23 . This brings me to figure 7-8. The figure is correct, but the dialog box is sufficiently confusing that I think a bit more explanation would be helpful. "SOCKS v4" and "SOCKS v5" have radio buttons, but neither are initially checked and it's not clear if they refer to the text box "SOCKS Proxy" immediately above them (if the text box is empty, shouldn't they be grayed out?). Unfortunately, if either is accidently checked, there's no way to go back to the state of both being unchecked. If one had to guess, "SOCKS v4" looks kinda sorta like the "forward-socks4a" that was put into the config file. Unfortunately, that didn't work. Leaving both of them unchecked or checking "SOCKS v5" does work for me. While this GUI is (of course) not the fault of the authors, I think it's sufficiently confusing to deserve a warning in the text. {302} shell command 3 paragraphs down; I don't know if its really an error per se,perhaps an omission, but it did give me some trouble. I followed the kernel compilation instructions and was greeted by kernel panic upon rebot. Some searching led to find that I had to use mkinitrd to get my new kenel to boot. Some more searching led me to the fact that if I pass -initrd to make-kpkg it will do this for me. I don't know if this problem was due to my setup or not but thought I would pass it along. (311) code between last two paragraphs; In the instructions on how to export the package listin Hack #80, there is an un-needed \ in the code example. The code reads: $ sudo dkpkg --get-selections | grep '[[:space:]]'install$ | \ awk '{print $1}' > package_list The \ before awk is the error. With that \ the whole command aborts and returns the statement "bash: awk: command not found" The same error is repeated at the top of page 313 in the script example. (322) 3rd paragraph; When writing rules for local persistent names, the syntax used for key-value pairs requires at least one "Match" pair (using ==) and one "Assignment" pair (using =). Throughout this hack (#83) the assignment pair NAME{all_partitions}=="foo" incorrectly uses the double, instead of single, equal sign. (Refer to http://reactivated.net/writing_udev_rules.html) In addition, even with the above modification, it has so far failed for me on an HP nx6110 laptop running Ubuntu 6.06. [323] 3rd paragraph; man udev does not document the syntax NAME{all_partitions}. Rather, it documents OPTIONS="all_partitions", NAME="temp". The comparison operator following NAME should be an assignment ("=" instead of "==") (350, hack #88) toward end of hack; Google Earth subhead; Actually, this is not so much an error as an update. Hack #88, "Play Windows Games", (which I wrote) discusses how to run Google Earth on Linux using Wine. Today, Google announced the beta for a Linux version of Google Earth. If possible, it would be great to add a highlighted note under the subhead which reads, "Run Google Earth with Wine", or at the end of that section. This highlighted note might read as follows: "Note: as we went to press, Google announced a beta version of Google Earth for Linux. System requirements are listed on the Google Earth download page (http://earth.google.com/download-earth.html), and Google notes the beta has been tested with and works on Ubuntu (well, it's been tested with Breezy, at any rate). Definitely worth checking out, and yet another indication that Linux and Ubuntu continue to gain in mindshare and popularity." {399} 6th paragraph; The paragraph states that the user should create a symlink to /etc/apache2/mods-enabled/vhosts_alias.load. That file did not exist on a fresh install of Ubuntu Server and Apache2. (399) Last paragragh; reads: logformat ?%V %h %l %u %t ?%r? %s %b? vcommon should read: 1.logformat ?%V %h %l %u %t \?%r\? %s %b? vcommon