Linux Information
I use Debian GNU/Linux unstable (sid) distribution.
This is information I wish I could have found on Google. Perhaps it will be of use to you.
- CUPS Client-Error-Forbidden
I kept getting the “client-error-forbidden” error when attempting to cancel print jobs through the CUPS web interface when the job had been submitted by someone else; in /var/log/cups/error_log I would see error messages like ‘cancel_job: “” not authorized to delete job id 659 owned by “anonymous”!’. The solution was simple; I had to add AuthClass System and AuthType Basic to /etc/cupsd.conf under. That is, you should have at least the following in your cupsd.conf:
AuthClass System
AuthType Basic
Allow from 127.0.0.1
Previously I had no AuthClass line and thus could only cancel print jobs originating from the system running the server. I consider this to be a bug, and filed a report on it, although the cups maintainer insists it is necessary for security (check out my bug report for more detail).
I wrote a tiny little patch (download for cupsys 1.1.14, or download for cupsys 1.1.20) that allows you to specify AuthType None for jobs. You cannot set AuthType None without this patch. Note that this will make your system insecure inasmuch as anyone can see anyone else’s jobs if you provide this option. You can also download Debian packages (for woody, sarge, and sid) and RPM (Red Hat) Packages (untested) of cupsys recompiled with the option to turn off job authentication. If you prefer, add the following line to your /etc/apt/sources.list to use apt-get to upgrade to my cups packages (unstable, testing, or stable):deb http://adam.rosi-kessel.org/debian unstable main
Note that you will need to modify your cupsd.conf if you also want unauthenticated users to be able to cancel, hold, and release jobs. Here is an example.
(I am currently getting about 25-35 unique visits a day from people searching on this problem; let me know if my fix worked for you or if I should be giving additional information!)
Update 8/10/04: This patch has finally been applied to the Debian package and the default cupsd.conf file fixed to not give the “client-error-forbidden” error by default. I’m not sure if this update will make it into the next version of Debian stable (Sarge), but it is currently in unstable.
Update 12/31/04: A SuSE 9.0 user suggests the following solution under SuSE. First, set up a CUPS admin account and password using:sudo lppasswd -g sys -a root
Then, modify /etc/cups/cupsd.conf to read:
AuthType BasicDigest AuthClass Group AuthGroupName sys Order Deny,Allow Deny From All Allow From 127.0.0.1 - SMC 2632W V3 under Linux
There are details scattered all over the web about how to get this card to work. Part of the confusion is that each version of the card uses a different chipset (SMC 2632 V1, V2, and V3). If you have the V2 or the V3 you need to use the atmelwlan driver. The proper module is pcmf502rd (pcmf502r is for the V2 card). Also, the key factor for me was building a kernel with i82365 compatible bridge support enabled (CONFIG_I82365=y) as well as, obviously, PCMCIA and CardBus support (both in kernel—not the separate PCMCIA kernel modules). First, you build the kernel, install and boot into it, then run the configuration and install scripts for the atmel drivers (make config; make all; make install). Finally, you need to create the file /etc/pcmcia/smc.conf with the following contents:
device "pcmf502r" class "network" module "pcmf502rd" card "SMC 2632W V2 11 Mbps Wireless PCMCIA Card" manfid 0x01bf, 0xb301 bind "pcmf502rd"
Hopefully this will work for you. It did for me kernel 2.4.22 and Debian Unstable. Once I had this setup, it “just works.”
- Gaim with Encryption
Would you like to have encrypted instant messenger conversations? Gaim-Encryption use OpenSSL to provide transparent RSA encryption as a Gaim plugin. You have to recompile the program, though. For your convenience, here is a Debian package of the latest Gaim with the encryption plugin built in. Alternatively, add this line to your /etc/apt/sources.list file and you can upgrade to Gaim with encryption:
deb http://adam.rosi-kessel.org/adam/debian unstable main
- glabels and Avery 5376 labels
Having trouble printing with glabels 0.4.6 and Avery 5376 labels? After dozens of attempts, I’ve decided that the definitions file is wrong. You need to edit /usr/share/glabels/predefined-labels.template (as root) and change the layout line to:
I’ve reported this suggestion to glabels, we’ll see if it gets incorporated.
- Gdk-WARNING: Missing charsets in FontSet
Do you ever get the Gdk-WARNING **: Missing charsets in FontSet creation ISO8859-1 error? Several postings to e-mail lists got me no help on this. It turns out, for me, it was simple: a theme had installed itself in ~/.gtkrc that was looking for a font that wasn’t there. Rename your ~/.gtkrc and see if you still get the error.
Incidentally, I get an awful lot of hits from people searching for this error. If this fixed your problem, let me know, and if it didn’t, let me know what did and I will post it here! - GNU/Linux on an OmniBook
- If you run GNU/Linux on an HP OmniBook 500, you can probably find all the information you’re looking for on the GNU/Linux on HP Omnibook Laptops site. Although the site isn’t terribly up to date, the mailing list and archive are invaluable resources.
- I also recently installed Debian Woody GNU/Linux on an HP Omnibook XE4100. As far as I know, there are no webpages devoted exclusively to GNU/Linux on the XE4100, but there are some about the XE4500, a similar model (one for Red Hat and one for Debian). The proper driver for XF86Config-4 is “savage”, and sound requires the “via86cxxx_audio” module (under kernel 4.2). CD-ROM and network worked right out of the box. I haven’t gotten a chance to try the modem.
- XF86Config-4 file for HP OmniBook 500 with External Gateway 2000 1572 DG Monitor.
I use this file when my laptop is docked. I’m not sure that the timings are perfect, but it works, and there seems to be a great dearth of information about there about this monitor.
- MaxBlast/BIOS Issues
Having trouble with a MaxBlast hard drive on an old system with an obsolete BIOS that needs its own bootloader? I found switching to grub from LILO did the trick for me. I’ll post more details about this, which also involved the Windows NT (Windows 2000) boot loader as well. - Destroyed Partition Table
Did you just destroy your partition table, perhaps because you ran dd over /dev/hda rather than /dev/fd0? And your system is still up and running, in fact you’re reading this web-page, but know when you reboot, you’ll be toast? Well, good! I have a cautionary tale for you about how to avoid this situation, but also an easy way to recover if you follow the enclosed directions. - Emusic, Zinf, and Segfaults
Are you an emusic subscriber unable to use the recommended player, zinf (“Zinf Is Not FreeA*p”) for batch downloading? Emusic recommends zinf for Linux users, but unfortunately zinf segfaults when loaded with an “emp” file. I wrote a shell script hack to fix this (the segfault can be avoided by renaming the .emp to .rmp, but then discovered fetchrmp by Doran Barton. So I’ve modified that script to give some additional options: place downloaded files in a hierarchy by genre, album, and artist, and also play music when downloaded. The modified script is called fetchemusic and you can download it here. Note that you’ll need the the Perl XML-EasyOBJ module for this to work, which is not included in Debian (you’ll also need modules LWP::Simple, Getopt::Long, File::Path, and File::Copy, which are all in Debian. The emp segmentation fault has been around for a while, it was reported to Debian in October 2002. Let me know if you’ve had this problem, if you have any other solutions, or if my script is useful to you!
(Update 6/3/03: Unfortunately, Emusic has switched to an encrypted file format, so this script will no longer work! I’m leaving it here in case it ever becomes useful again.)
(Update 10/1/03: Someone has written a very nice perl script that works with the new encrypted EMP file format, called decrypt-emp. Get it now!) - French vs. North American Wireless Channels (or, why can’t I connect to my Access Point with my Xircom CWE-1120-FR?)
I’ve written a few times about my wireless woes. I couldn’t for the life of me figure out why my Xircom CWE-1120 card couldn’t connect to my Access Point. As it turns out, the card was set to the French Channel Set, which is different from the North American Channel Set, except on Channels 10 and 11. So I set my Access Point to Channel 10, and now I can finally access my network. There is, allegedly, a DOS command line tool that allows you to reprogram the EEPROM on Cisco cards to switch the channel set to North American, but I was unable to locate it. In fact, Intel (who purchased Xircom, which produced the card) was very wary of the whole topic. I suspect it might be illegal to have/use this tool, since it might permit you to set your card to a mode that violates FCC regulations. Intel was actually pretty spooked that I even had the cards (which I purchased legitimately in the United States, thinking they were North American cards). Thanks to Dan Lanciani on the airo-linux-gen80211 list for finally pointing this out to me. - Volume Problems on a Toshiba P25-S477 Laptop
I’ve been trying to set up GNU/Linux (remotely) on my brother’s Toshiba p25-s477 (one of a seemingly endless number of obscurely named Toshiba laptops). Almost everything worked fine, except the sound was almost inaudible, and substantially distorted with external amplified speakers. It turns out I needed to go into the alsamixer (ncurses GUI) program and set “External Amp Power Down” to “Mute.” This is far from intuitive: first, that “external amp power down” would be “on” by default, and second, that you need to “mute” this setting to have “power down” turned “off.” But that’s how it works. (solution posted by someone in the aesthetically weird tlinux-users mailing list.) - Functional Java Packages for Debian Sid Mozilla
I’ve been looking for functional Debian Java packages that work with latest Mozilla in sid. I tried downloading several Java binaries from sun and elsewhere and either it didn’t register in Mozilla or crashed immediately. I finally discovered José Fonseca’s excellent Java packages that actually work. Add the following to your /etc/apt/sources.list to get these packages:
deb http://jrfonseca.dyndns.org/debian ./
- Procmail Detritus Filters
Here’s a good procmail recipe that should catch a lot of viral email—both actual viruses, and bogus “we caught a virus coming from your account” messages. Note that you need to increase from the default line buffer length to have this all packed into one expression:
LINEBUF=3000
:0
* ((^Subject: (Virus infection notice|New Network Security Upgrade|Newest Net Update|Newest Internet Upgrade|Newest Internet Security Patch|Internet Security Pack|New Internet Security Patch|Latest Critical Pack|Latest Net Upgrade|Latest Network Critical Update|(Latest|Current|Newest|New) (Microsoft|Net(work)?|Internet) (Security|Critical) (Update|Patch|Pack)|Current Microsoft Critical Pack|Newest Critical Pack|Latest Net Security Pack|Current Net Critical (Pack|Patch)|Latest Network Critical Pack|Abort Report|A virus has been detected in a document you authored.|RAV Antivirus:|BitDefender found an infected object|Virus Detected by Network Associates, Inc. Webshield|—— Virus Detected ——|Virus detected|Virus Alert|InterScan NT Alert|Virus found in the message|Message quarantined|VIRUS ALERT!|MDaemon Warning – Virus Found|Warning: E-mail viruses detected|ScanMail Message: To Sender virus found|VIRUS IN YOUR MAIL|Norton AntiVirus detected|VIRUS .* IN YOUR MAIL|Antigen found VIRUS|Filter incident|V.rus figyelmeztetés! Virus warning!|Symantec AVF detected|Returned due to virus;|Anti-Virus Notification|BANNED FILENAME|File blocked – ScanMail for Lotus|NAV detected a virus|RAV AntiVirus scan|VIRUS .+ IN MAIL FROM YOU|Virus Notification:|Virus found in a message you sent|Virus found in sent message|VIRUS EN SU CORREO|Warning: antivirus system report|M..Daemon Notification — Attachment Removed|Information – Antivirus|Symantec AntiVirus detected a violation|WARNING: YOU WERE SENT A VIRUS|SAV detected a violation in a document|MailMarshal has detected a suspect attachment|A virus was detected in your mail|Recipient Virus-alert|Virus Found in message|E-?mail viruses detected|Undelivered mail: VIRUS FOUND|Quarantined Mail: virus from|Failed to clean virus|Virusveszely! Virus warning!|Virus in mail from you.|Possible virus found in mess..age you sent|AntiVir ALERT|Centrale Anti-Virus melding|Vexira ALERT|You sent potentially unsafe content|ID.*thanks ScanMail has detected a virus!|\{Virus\?\}))|(^X-BLTSYMAVREINSERT|^X-Virus-Scan-Result: Repaired|^X-AtHome-MailScanner: Found to be infected|^X-Scanned: Symantec Antivirus Scan – Virus found|^X-Sender: NetMail AntiVirus Agent|^X-yoursite-MailScanner: Found to be infected|^X-ELTE-VirusStatus: was_infected)|(^To:.*MS Network Security))
virusAnd here’s a simple way to filter spamassassin mail into two folders, one which is “very certainly” spam and one which is “probably” spam:
:0
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*
verycertainspam:0
* ^Subject:.*\*\*\*\*SPAM\*\*\*\*
probablyspam
- Firefox 0.9 remote newtab syntax
When I open a link from another application (gnome-terminal or evolution, for example), I would like it to open in a new tab in Firefox, so I had a script which I called newmoz:
firefox -remote “openURL($1,new-tab)”
This is my default web browser. With Firefox 0.9, the syntax has changed. You now need:
firefox -a firefox -remote “openurl($1,new-tab)”
I believe this has something to do with the confusion of the possibility of several related Mozilla applications running all at once, although I’m not entirely convinced. To make it really snazzy, try:
firefox -a firefox -remote “openurl($1,new-tab)” || firefox $1
This way, if firefox isn’t already running, it will still work.
- Email yourself after a long task
This is a really obvious one, but I only recently thought of it. Due to several recent failed hard drives, I’ve been moving a lot of data around from one drive to another, some through NFS, and some over my cable modem. Moving 200 gigabytes, even within a LAN, takes a long time—even longer if you throttle it so as not to congest the network too much. I would find myself checking back on the process every few hours, even though I knew it probably wasn’t done. So why not append a mail command after a long process? E.g.:
rsync -Pa / storage.system.somewhere:backup ; echo done | mail adam
Since I’m always checking email, I’ll find out as soon as it’s done, and waste less time continually checking back on the process, especially when the transfer might take three or four days.
- ssh timeout error/connection reset by peer with rdiff-backup and D-Link DI-604 router
Backing up bostoncoop.net over a cable modem takes a long time. If something goes wrong, rdiff-backup has to roll back the previous backup and start over. As best I can tell, rdiff-backup first makes the connection, then starts the roll back, but doesn’t send or receive any data during the roll back. On my system, the roll back can take longer than the timeout period for my DI-604 router—the consequence being that the connection is reset before the backup can start and rdiff-backup fails out.There’s an easy fix, which should come in useful to anyone with a router that is too vigilant about timing out ssh connections (for example, if you ssh to get your email and often leave the window alone for an hour at a time). Add the following to your .ssh/config:
serveraliveinterval 300
serveralivecountmax 10This will insure that ssh will occasional send an ACK type request every 300 seconds so that the connection doesn’t die.
- Fixed font in gnome-terminal
I’ve wanted to use gnome-terminal for a long time, primarily because of the tabbed terminal feature (many terminals in one window) and because of the URL recognition (open a URL by right clicking on it). I also like being able to paste into the window with the keyboard.There was always one problem, though. The font. I know some people like the new fixed-width GNOME fonts, but I don’t. I just wanted plain old fixed, which I use with xterm (10×20). But that font never showed up in the list of available fonts.
I finally found the solution in /etc/fonts/local.conf—namely, the following lines:
Just uncomment the path, run fc-cache as root, and you should see fixed in the output of fc-list.
I’m not sure how a naive user would ever figure this out, but then again, maybe a naive user wouldn’t care that much about having fixed font in gnome-terminal. I also don’t understand why we wouldn’t users to have access to bitmapped fonts by default—why not just set the default font to something the GNOME people like, but have the other choice in there to start? - Reading Annoying HTML Mail in Mutt
I’ve tried several solutions for reading broken HTML mail in mutt, including my own custom Python hack, addMIMETextToHTMLEmail (this was actually the first Python program I ever wrote). Reasonably nice mail clients will send a plaintext part in addition to the HTML mail for us textophilic email users, but the dominant Microsoft Hotmail and Microsoft Exchange send HTML-only mail with no plaintext part. I wonder if they do this because they expect anybody worth writing to these days is using Microsoft Outlook or Microsoft Hotmail.I think I’ve recently discovered the best solution, since my addMIMETextToHTMLEmail script doesn’t always work properly and is probably unnecessarily complex:
- Download and install demoroniser. You may need to tweak it slightly, since it expects perl to be in /bin/perl.
- Install html2text (Debian package, separate source available from Martin Bayer).
- Add to ~/.mailcap:
text/html; /home/adam/bin/demoroniser.pl -q -w0 '%s' | /usr/bin/html2text -width 90 -style pretty; copiousoutput; description=HTML Text
You may prefer a wider output; the person who suggested this to me uses 158.
- Edit ~/.muttrc and add:
set implicit_autoview=yes
- You should now be able to view HTML-only emails in mutt without having any extra steps.
Mohammed May 13
Thanks for ur help, ur information helped me so much. The printer was going to print a lot of papers, you’ve saved my company money :)