Not very many people know this, but my dad has had the privilege to meet and hang out with many famous foreign dignitaries. Here he is sharing a laugh with a famous World War II ally: (Dad’s friend probably has a lot on his mind--he doesn’t seem so jolly.)
Later, he invited a foreign leader from China to speak at the local Lion’s club meeting, and was lucky enough to have the pleasure of hosting and introducing the distinguished gentleman:
In his later years, as a fair and just law practitioner, he recognized that everyone needs good representation for our legal system to work. He served as pro-bono counsel for many, including a few having problems with the United States government.
I found pictures of all of these famous events, and specially prepared them for my dad as a Christmas present. In an unrelated aside, I should mention that my dad has a very weird sense of humor, and has been pining for prints just like these for years, ever since he realized that such historical prints could be prepared effectively with a computer.
It turns out the major problem cups was having with my Windows machines trying to print was not that they were remote, or Windows. It didn’t like the fact that it was getting sent “raw” preprocessed data suitable for sending directly to the printer.
So I downloaded Adobe's PostScript driver for Windows and the ppd file for my printer from http://www.linuxprinting.org/ . I installed the Adobe PostScript driver, and when it asked for the network address of my printer, I entered the http:// URI for my cups IPP daemon.
As soon as my Windows computers were sending PostScript to my linux box and cups daemon, printing worked.
So that’s something to try if your remote IPP printing isn’t working with cups. I tried various methods to make cups print the raw stream, but really I just have no clue how to make cups work, so at some point I gave up and was just happy that printing works again.
If you consider yourself fairly knowledgable about Windows, you might think that starting the Indexing Service to index the files on your hard drive would make doing a file search faster. Well, normally it doesn't.
If you naively go to the “Search” button on your folder view or from the start menu, and then type in a filename in the “All or part of the filename:”, Windows is going to start cranking through your hard drive, looking over every file. It doesn’t matter that it’s already been indexed by the Indexing Service. It’s going to search stupidly anyway right at that moment.
On the other hand, if you type a special search query into the box marked “A word or phrase in the file:”, Windows will instantaneously give your results, because it will use the Indexing Service. For instance, if you type the following in that blank with your C: drive selected:
@filename *.txt
In the blink of an eye you will get a list of every text file on your C: drive. If you try that the old way, in the “All or part of the filename” blank, you’ll be in for a long wait, and a lot of disk thrashing.
Similarly, if you type the following in the “word or phrase” blank:
!good
In another blink of an eye it will find all files that contain the word “good”.
I couldn’t find the definitive guide to this query language from Microsoft, only much more complicated references. But there are many pages on the net involving a page name of “ixqlang”, which are probably copied from some original Microsoft source. Here’s one such copy.
Using the “@” identifies a property of the file you’re looking for. Some examples:
@size > 10000 @write < 2004/10/01 @filename *.txt & @size > 10000
Those past three examples look for a.) anything bigger than 10,000 bytes, b.) anything modified before October 2004, and c.) any text file bigger than 10,000 bytes. More detail can be found in the ixqlang references.
Apparently, the new MSN Desktop Search Bar is just a fancy user interface to this pre-existing functionality that Microsoft saw fit to deprive us of for so long.
If you have a laptop or a flat screen monitor, it can be vexing that sometimes Windows just doesn’t put your monitor into power-save mode even if you tell it to do so after a certain amount of inactivity. With an LCD screen, you’re wasting precious life of your backlight. It doesn’t matter if what’s being displayed is black, the backlight is still on unless your monitor is in “Suspend” mode. For a laptop, your power is being used unnecessarily.
I’ve seen a couple of people who have interfaced the windows screen-saver mechanism, which always seems to work, to the activation of Suspend mode. One such person offering a free solution is this guy. He offers a screen saver that will put your laptop screen into power-save mode, turning off the backlight, instead of just painting pretty picutures. Great.
An even better side benefit is that he offers a program, monsus.exe, that will suspend your monitor when it is run. We can use this to create a keystroke way of instantly turning off your monitor (if your laptop manufacturer hasn’t already been nice enough to give you this capability.)
First, copy monsus.exe into C:\WINDOWS or C:\WINNT, whichever exists on your system. Then, create the following batch file:
@echo off rem wait one second ping 1.1.1.1 -n 1 -w 1000 >NUL rem now suspend the monitor monsus 2
Just make a text file with the above text, and then name it monitoroff.bat. Put that also in C:\WINDOWS or C:\WINNT depending on your system.
Now I’m not sure if you need to logout to make sure those files are in your path, but I think you do. So logout and login again.
Now, open up C:\WINDOWS or C:\WINNT, find the monitoroff.bat file, and drag it to your Start Menu, to some subdirectory where it will be out of the way, but you know where to find it. This will create a shortcut to monitoroff.bat in your Start Menu. Once it is created, go to that shortcut in your Start Menu, and right-click on it, and select “Properties”. You’ll see a blank for a “Shortcut key”. Type in some key (Not ESC, Enter, TAB, PrintScreen, SPACEBAR, DELETE, or BACKSPACE) and you will notice that Windows adds a “Ctrl+Alt+” before it. Whatever key you put in this blank is now the hotkey to activate monitoroff.bat. Press OK, to finish editing the properties.
Now, by pressing Ctrl+Alt+<your key>, you run monitoroff.bat at any time, no matter which program is focused. It will wait one second, and then turn off your monitor. Voila!
The reason I wait one second, is that if the monitor gets disabled, then releasing the Ctrl and Alt keys will be interpreted as a keyup event and turn the monitor back on. You can release the Ctrl and Alt keys very quickly to try and get around this, but then when your computer wakes up, it won’t know that the Ctrl and Alt keys have ever been released, and think that they are still down, which will be confusing to you.
You can also do this trick with the hotkeys for any program in your Start Menu. It’s a very quick way to start any program.
I use KDE with Fedora Core 3, and it seems that Mozilla Firefox doesn’t know how to respect my choice for default email program unless I brutally force it to.
The way to force it is to add the following “hidden preference” to the file user.js in your user directory for Firefox:
user_pref("network.protocol-handler.app.mailto","/usr/local/bin/thunderbird");
If your executable for thunderbird is not in /usr/local/bin, then replace the second string with whatever the full path to thunderbird is.
user.js is like prefs.js, except that firefox will explicitly not ever write to user.js, even though it will write and modify prefs.js.
Here are some other hidden preferences that I use in firefox:
When you press tab in a web page, only move the focus between form elements--don’t focus on the hyperlinks in the page as well:
user_pref("accessibility.tabfocus", 3);
Show more “unhidden” preferences in the Advanced tab of the Firefox preferences window. These new preferences let you control how to display links in firefox that were sent to it by external programs:
user_pref("browser.tabs.showSingleWindowModePrefs", true);
The first of the following two prefs turns on autoscroll, or what normally happens in Windows when you push the scroll wheel as a button, see a scroll icon, and then can scroll the page proportionally to the location of the mouse. The second preference is very important. It turns off pasting the contents of the clipboard into the URL location if you push the middle click in the middle of the web page area. Normally, if you at any point middle-click in the middle of your webpage, it will load whichever url is in the clipboard into the browser. This is usually gibberish. This hidden pref turns that “feature” off:
user_pref("general.autoScroll", true);
user_pref("middlemouse.contentLoadURL", false);
If you’re like me, you have big oafish paws and don’t like to hit very tiny little buttons on your screen. A more genteel way of saying this is that onscreen buttons you use all the time should be bigger than others to help you get to them faster with the mouse. This is referenced back to Fitt's law, which is a model to describe how fast people can point at a target of given width. (The short version: People can point to bigger targets faster than smaller targets)
Anyway, really what I want to talk about is how to make the “Back” button in Firefox much wider. All you need to do is add or modify a file called userChrome.css. This file will live in your Firefox user directory. On unix, this directory will be ~/.mozilla/firefox, and in Windows, it will be in C:\Documents and Settings\<username>\Application Data\Mozilla\Firefox. Note, that in Windows, your Application Data directory is normally “hidden”, so you will have to go into your folder options to make hidden folders visible.
Within the firefox user directory, go to Profiles/????????.default/chrome. In that directory you should find your userChrome.css. If it doesn’t exist, you can add it yourself. There should be an example file in that directory called userChrome-example.css. Rename this to userChrome.css and then you can add to it the css code described below.
This file is a great way to make changes to the way that firefox looks without too much hassle. For instance, if you want menus to highlight with navy blue like Windows XP, (instead of the pseudo-3D default behavior,) see these instructions.
To make the “Back” button bigger, add the following text to your userChrome.css:
/* make Back button big! */
toolbarbutton[label="Back"] {
min-width: 10.0ex !important;
}
The first line is just a comment. Next, we say that we’re going to apply a style to a toolbarbutton with label property equal to “Back”. We assign a minimum width that is in “ex” units, which is proportional to whatever font we’re using. And finally we say that it’s “!important” to make sure that we override the default behavior as defined in the mozilla css code.
In a similar way, you can get Thunderbird to make the “Send” button very large on the compose window. Find the thunderbird userChrome.css in a similar place in the .thunderbird (unix) or Thunderbird (Windows) directory structure. Then add the following code to userChrome.css:
/* make Send button big! */
toolbarbutton[label="Send"] {
min-width: 10.0ex !important;
}
Voila! Now you can write embarrassing drunken emails, and still have no problem mousing to the “Send” button. You’re welcome.
I want one!
That is all.
Update: It appears that iriver is no longer selling the h140. I may have to settle for the gratuitous color screen and no remote of the h340.
Hmmm. Well printing on cups via IPP from Windows machines broke on Dec. 2 for no apparent reason. My laptops still talk to cups on my linux box, they show up in the logs, and their jobs show up fine as “Completed” in the cups queue. But they never get sent to the printer. And there are no errors. Just silently it all doesn’t work. I can still print locally from my linux machine fine. In the cups access_log and error_log it looks as though all clients are connecting and submitting jobs fine, but in page_log, none of the remote jobs show up as being printed.
Anyone who might know why this is happening? If so leave some comments. Or post a reply to my plea for help. I can’t think of anything I changed before it stopped working. It’s possible I up2date’d something, but I can’t think of anything related to printing.
If anyone has an idea how to start debugging this I’d be happy to know too. I made the logs capture everything with the “debug2” setting, but it still didn’t show anything unusual except the absence of printing.
I like the fact that “Gasssss” is the international word for the sound that an Illy espresso can makes when you open it.
This isn’t really a personal post, but I thought I would write down the resolution to a technical issue I brought up on my last journal entry.
So the Gateway tech finally excercised tough love and told me to go call Toshiba. Which I thought at first was the end of the line, but as it happens Toshiba was awesome and helpful.
Toshiba’s tech support number is long distance, which “back in the day” would’ve annoyed me. But now that we live in the age of cell phones, long distance is the same as local – it’s all just minutes. Great. So I called Toshiba tech support and was not put on hold. That blew my mind from the beginning. A woman actually answered and immediately wanted to help me. After a few seconds of me sputtering and not knowing what to do because I wasn’t on hold, I told her the problem, and she identified the issue in about 15sec.
Apparently for some reason Toshiba laptop hard drives have two model numbers. The drive I’m trying to get to work has its main model number which is MK6022GAX, but it has another identity as HDD2184F. The “F” signifies that this drive has non-standard firmware and interface. In this case, the “F” means the hard drive was specially made for Compaq laptops.
The woman told me to look at the Toshiba drive I have that already works, and its model number was HDD2171C. The “C” means that it is a standard issue firmware/interface. It’s the type of drive that I can buy from any reputable source.
Which I guess is the problem. I bought my hard drive from ebay, and I guess this guy had a whole lot of Compaq hard drives, which he mistakenly thought were the same as any other Toshiba drive, but the Toshiba woman told me the hard horrible truth.
So now, I can finally rest. And possibly am one step closer to my dream of having 60GB storage space on my laptop.
I know all of my readers are relieved.
As Jim Anchower would say, it’s been a while since I rapped at ya.
But that’s ok, since I’ve been living a grad student life, where fun-time slows and my social life runs at half the speed of a normal person. Einstein described this. If I were to go back and meet my friends in the real world after 6 years of grad school, I would find that they would’ve had the equivalent of 60 years of fun, while I would’ve felt like only a few weekends had passed. Yeah, I know, it blows my mind too.
I think I’m going to make a T-Shirt that says “Grad Life” in big stencil-font letters. Although people would either not get it, or get it and think it was really sad. I guess there’s no cause to bum people out unnecessarily.
Speaking of what grad students do for fun, lately I’ve been obsessing about why I can’t install a 60GB hard drive on my laptop, even though the drive works on every other computer, and my laptop is supposed to handle that size hard drive. The BIOS refuses to even recognize that a drive is attached to the computer. I have this psychological problem where I get really upset if I feel as though an inanimate object is beating me in a test of wills. That must be why I’m an engineer. Or maybe it’s because I’m an engineer? At any rate, I find laptop debugging very frustrating because everything’s all sealed up and not available for me to monkey with. The other realization I came to which made me sad was that there was no computer repair outfit I could bring my laptop to who would do a better job of figuring out this problem than me. Here’s hoping that somehow Gateway tech support comes through. I’m crossing my fingers that I’ll find a technician who knows all the secrets, and isn’t constantly asking me if I’m sure that I turned on the computer.
Which reminds me of my plan to issue “Not Technically Stupid” ID cards. You should be able to pass some kind of test and get one. Then when you’re on the phone with Tech support, you can give them your ID number and they can immediately start talking to you as a bona fide knowledgeable person. Instead, most of the time I’m talking to technical support people, they spend a long time going through a series of questions to make sure I’m not one of those people who use the CD-ROM drive as a cup holder. I hate that.
I had my turkey on Thanksgiving with my crazy extended family. It was actually OK, because I was slightly removed from all of the craziest of problems, while still related enough to be sympathetic. The food was amazing, even if all of my relatives are so politically conservative that they serve a dish called “Republican Corn”. Although I must give credit: If there’s one thing those Republicans do well, it’s making a corn dish. Yummy.
I executed /sbin/chkconfig --list | grep on to see all of the things that the system automatically starts on boot at different runlevels. I then went through them to find any obvious things that I don’t use.
To turn something off: /sbin/chkconfig <process> off
There’s a bunch of other stuff pertaining to nfs that I can probably get rid of also. I also probably can get rid of portmap, since I don’t use any RPC protocols (I think.) But I think I’ve done enough damage for one day. I have to make sure I would never want to use nfs someday…
Part of my printing woes involved printing text files. If I printed text directly to my laser printer, it would always go off the edge of the page, as if the font was bigger than the print formatter expected it to be.
Then, I observed the same thing when converting text to postscript with the excellent program enscript. Viewing the postscript file in ghostview would show the text spilling over the intended margins. This led me to believe that maybe it wasn’t just a printer issue, but a postscript or font issue.
It turns out it was a font issue. The issue is with a package called urw-fonts-2.2-6. This package is the Fedora Core 3 version of the free fonts which are the equivalents of the basic PostScript fonts. It appears that with this version, ghostscript displays bigger Courier fonts than it should. So it thinks that a certain number of Courier characters will fit on a line, but when displaying them they spill off the right side. Since my printer is PCL and not actually PostScript, ghostscript is doing the rendering of text files before they are sent to the printer to be printed. Thus both viewing in ghostview and printing directly to my printer show the too-large fonts.
My solution is to “downgrade” to urw-fonts-2.1-7. Now everything prints and view fine.
Enscript is an awesome program for printing text files. The best feature of it is to put two text pages per sheet of paper, side-by-side with the paper in landscape orientation:
enscript -2jr myfile.txt
That will print directly to your default printer. With the --output=output.ps option, you could output to a file called ‘output.ps’.
It even prints a nice header at the top of the page by default. You can customize everything, make interesting headers, etc. But I find that just by not printing text files in huge font and avoiding using many sheets of paper is reason enough to use it.
Here is my custom header that I use for enscript: [[download:m?]]. To use it, you download that file, and typically put it in /usr/share/enscript (or wherever your enscript *.hdr files are) and then execute the follwoing command:
enscript -2jr --fancy-header=matt myfile.txt
I just got back from another wedding. This one was for my good friend Ryan and his lovely bride Kelly. One of my friends remarked that once all of the single people get married off, we’ll have no reason to rendezvous from across the country to the same spot anymore. I hope that’s not true. Hopefully we’ll at least all be a lot richer than most of us are now, so jet-setting across the country for the weekend will be totally possible and fashionable.
For a blessed occasion (and this wedding was definitely the blessed kind, in an actual church) there certainly was a lot of gambling that transpired. Or at least poker playing for plastic chips. It probably depends on your religion to figure how God feels about simulated gambling with no actual money involved. I played more poker in a short amount of time than probably ever before. And I must say that the absence of any real money was very liberating. I think what I learned is that I’m very cheap, because before, even playing with a $2.00 buyin made me nervous about every chip. But with nothing at stake, I could try out different strategies and be a bit bolder. Gone was the awful feeling of losing actual money for no apparent reason other than voluntarily engaging in an activity for which I have no skill. I still wasn’t very good, but at least I think I got better. It helped that we are all intellectual nerds and somewhat systematically trying to learn from each hand. Normally I hate that kind of deconstruction of a fun activity, but in this case I really was trying to figure out how to play better, so it was welcome.
Speaking of deconstructing, I feel the same way about art. After being logical and systematic about my technical job all day, one of the best things about music or movies or plays or literature is that it can be full of mystery and intangibles that feel deeper than mere facts. Which is why I’m always a little bit surprised to find academics or those who fancy themselves academics trying to break down some work of art into little observable, identifiable pieces. It almost seems to me as if they’re trying to pretend that subjective art is objective and scientific. I’m glad I don’t believe that it’s possible, because it would be a shame.
I finally not only got the printer to work for my linux computer, but also convinced it to serve the printer for our windows laptops.
I use cups, with a fairly normal configuration, but I made sure to Deny From None, and Allow From All. (I have an intranet behind a firewall so this is ok.)
I made sure to also disable my iptables firewall on my linux machine, also ok because I’m behind another firewall. You can keep iptables if you want, but you need to unblock port 631 for trusted computers.
I tried to use samba for a while, but found it excruciatingly painful. My windows machines could print to the printer via samba – sort of. There seemed to be a lot of miscommunication and freeze-ups on the WinXP side of things.
In the end, the best way to have the windows computers connect turned out to be as an “Internet Printer” in Windows terms. Or using cups IPP in linux terms. See this tutorial for an excellent explanation. The key for me was to discover the proper way to word the url. For a linux IP address of, for example, 192.168.1.2, and a printer named ‘myprinter’:
http://192.168.1.2:631/printers/myprinter
This form uses port 631, which is the where cups listens for IPP. The subdirectory and printer name were what I didn’t realize I had to add before.
On the windows machine, I went to “Add a Printer”, checked “Add a network printer”, checked “Connect to a printer on the Internet or on a home or office network”, and then entered in the blank the URL above. I then hit next, and when it asked for a driver, I gave it the native driver for my printer that I downloaded off the internet into a directory, using “Have Disk…”
The page I linked to above says that for Fedora you need to add configuration to cups to make it print a raw stream from the windows machines. On my more recent Fedora 3, I found it worked right off the bat with no extra configuration.
I have a APC Uninterruptible Power Supply, and so I thought, what better way to run it with linux, than with their native PowerChute Business Edition, for linux! Boy was I wrong.
Apparently (from APC tech support) this software doesn’t run any UPS over the USB link, even though almost all of their UPSes nowadays use USB to talk to the computer. Also it has absolutely no documentation. If you go to the official link on the APC website for the documentation for this software product, it will direct you to one file which is a single page of information entitled “Troubleshooting” which discusses a particular problem with a particular hotfix for Micros0ft Wind0ws. There’s a readme file, but that only tells you how to install it and turn their monitoring agent on, but after that, there’s a whole java web interface that I guess you’re supposed to guess about. (The tech support guy actually told me how to use it.)
A much more civilized approach is to get apcupsd, which after trying to get PowerChute to work, is the equivalent of running through a field of daisies on a sunny day. Or whatever you like doing on a sunny day.
If you have to use any USB device on a linux 2.6 system, required reading should be the following: Beginnings of Comprehension and Enlightenment. Especially the latter will help you to take a random generic USB device, and turn it into something far more identifiable, such as /dev/palm, /dev/lp-brother, or even /dev/ups. Much magic happens in /etc/udev, such as assigning device names to loaded drivers (/etc/udev/rules.d) to defining permissions of devices (/etc/udev/permissions.d). And it’s not just for USB. For instance, my nvidia graphics card drivers are loaded by udev and have their permissions also set by udev. Knowing udev means living a richer, happier life with a linux 2.6 kernel.
Another great tool specifically for USB information is usbview. It’s a great help in writing rules for udev. It updates in real time, so you can unplug and plug USB devices and see how they show up.
Recently on a computer at work we had some jerk trying every common username and password through ssh, and we wanted to be sure that the little guy hadn’t actually gotten in and mucked anything up. A colleague alerted me to chkrootkit, a program you can run to check for “rootkits” which are basically automated hacking programs. It’s the first thing to look for if you’re concerned about someone hacking your system.
Well, here’s the start of my pale-blue-colored online journal. The color of the background is subject to change, but I thought it was more interesting than white.
Right now I’m trying to write my thesis for eventual graduation in February (knock wood). Which is why it’s the perfect time to avoid writing--I mean, do some serious soul-searching. Yeah, that sounds better.
I’m not sure if I’ll have anything Earth-shattering for the world at large to read, but at least possibly my friends can see what’s going on with me once in a while.
I have friends who are cool enough to have blogs instead of something like this, which is obviously just an online journal. They have pseudonyms for all of their friends to protect their identities. I guess since you all know me then nobody’s secret identity will be protected anyway. So using first names shouldn’t be a problem? Pseudonyms seem like too much work. Then I’d have to remember them. What a hassle. And as my roommate can tell you, I’m bad with names. Which is good because she’s bad with faces. It reminds me of a movie.
Speaking of secret identities, everyone should see The Incredibles. I love Pixar because they were the first people to invest computer animation with heart and soul. And this movie was a lot of fun, and very funny.
By the way, I’m not using Advanced Blogging Software. This is really a wiki. As a person who is a perfectionist to a fault, I love wikis. The whole idea of a community keeping things documented with few barriers between them and publishing is great. I have my own personal wiki to keep track of todo lists, movies to see, things to remember, basically EVERYTHING my feeble brain usually forgets. And it’s nice to be able to add stuff to the same virtual notebook wherever there’s a web browser, which is most places nowadays. So this won’t be a full-featured blog, but I may add capabilities in the future if I’m really trying to avoid work.
OK, sleep is good. Without sleep, you’re as happy as a chicken in a tree. There’s my very first obscure inside reference which maybe two people will get.
Installed Fedora Core 3, checked the box marked “Install All packages”. With kernel and applications, it only takes about 6GB. Cool.
I only installed to my biggest hard drive, giving 20GB partition for /, and the remaining 60GB for /home. I left my user data on the other two hard drives in my system so that I could access it later.