All Entries RecentChanges RSS Oddmuse Wiki

All Entries (2004)

2004-12-28 Personal

My Dad with Very Important People

dadngeneral 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.)

dadnchairman 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:

dadnrevolutionary 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.

1 Comment on this page

2004-12-18 Fedora

Printing -- Mostly Unbroken

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.

0 Comments on this page

2004-12-17 Technical

Windows File Searching Made Faster

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.

Monitor, to sleep! Now!

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
(Why did I use "ping"?)

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.

0 Comments on this page

2004-12-14 Fedora

Default email Program from Firefox

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);

0 Comments on this page

2004-12-13 Technical

Firefox and Thunderbird userChrome.css tricks

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.

0 Comments on this page

2004-12-06 Personal

 h140

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.

0 Comments on this page

2004-12-06 Fedora

Broken Printing

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.

0 Comments on this page

2004-12-03 Personal

gasssss

I like the fact that “Gasssss” is the international word for the sound that an Illy espresso can makes when you open it.

1 Comment on this page

2004-12-01 Personal (Technical)

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.

0 Comments on this page

2004-11-30 Personal

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.

0 Comments on this page

2004-11-29 Fedora

Boot Processes I turned off

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

cpuspeed: This can change the cpu speed on the fly if you have a “mobile” version of CPU. Useful for laptops, but not for my desktop. Turned off. Had to use the --level 12345 switch because by default chkconfig only affects levels 2,3,4,5.
apmd: Takes care of batteries. Also useful for laptops. I use apcupsd to run my ups, and it seems that acpi has superseded apm anyway. So, unless this makes something break, it’ll stay off.
hpoj: I don’t have any HP printers or other devices hooked up to my computer
isdn: As far as I can tell, this is a very old part of the kernel. I don’t have ISDN, and I trust that as long as I’m getting my network through a standard 100BaseT connection, I don’t need this for anything else.
iiim: Some sort of Sun protocol. It also seems to have something to do with emacs. (Gasp!) Deleted!
pcmcia: I don’t have any pcmcia cards. Gone.
sendmail: I don’t run a local mailserver, and if I did, it would be qmail. Bye-bye.
mdmonitor: This helps mdadm, a software RAID tool for linux. I don’t do software RAID, if wanted a hard drive array, I would buy a card to do it. Asta la vista.
iptables, ip6tables: I have a hardware firewall between my computer and the internet, so I won’t bother with the software overhead. buh-bye.
arptables_jf: For the arptables firewall to filter ARP requests. I’m fairly certain that I’m not using it, especially since I’m not even using iptables
irqbalance: balances IRQs across multiple processors in an SMP system. I don’t have multiple processors, and I don’t have a hyperthreading processor, so it’s done for.

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…

0 Comments on this page

2004-11-23 Fedora

Courier PostScript Font Problems

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.

Ref

enscript

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

0 Comments on this page

2004-11-22 Personal

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.

0 Comments on this page

2004-11-22 Fedora

Printing

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.

0 Comments on this page

2004-11-17 Fedora

UPS

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.

Hot-plugging Devices, or "Where are my USB devices?" or "How I learned to stop worrying and love udev"

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.

chkrootkit

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.

0 Comments on this page

2004-11-16 Personal

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.

0 Comments on this page

2004-11-16 Fedora

dyndns: dynds rocks my world! If you have a DSL-type connection like I do, your IP address is going to change once in a while. Dyndns gives you a subdomain in one of their domains for free that will follow your ip address whenever it changes. You just have to sign up, get a client program for your computer that keeps track of your public IP address, and promise not to harass the dyndns folks with IP address updates unless it really actually changed. It’s really cool! I can now ssh to my linux box from anywhere with its public name. It’s almost like I have a static IP address, except I really just have a static DNS name.
chkconfig: I just learned from a knowledgable friend what the best way is to update which programs start up at which runlevel. Previously I had been directly modifying the symlinks in /etc/rc.d by hand. How uncivilized! chkconfig is really what you want to use instead.
printing: At some point I realized that linux wasn’t recognizing my printer in the same way that Windows 2000 didn’t recognize it. The workaround was the same: after booting, unplug and replug the USB of the printer into the computer. There may be some weird quirk with my USB hardware, or there may be something I’m not doing right, but if I do that then linux and cups can always see my printer.
smb: One thing that wasn’t obvious to me, is that it is possible to do extensive configuration gymnastics with the pretty GUI system tools, and it will never tell you that the service itself is not running. I tried all sorts of things to configure Samba, and it never worked. Until I had the bright idea to actually check if smb was running. It was not. Once I started it I could share the printer with my Windows laptops at home. Maybe it’s me, but I just assume that those controls should be inactive and greyed-out if the service isn’t running. Or there should be a big button on the panel marked “Start SMB Now” if it is off.
NVIDIA redux: I finally found out why my nvidia permissions are changing. It was not PAM, but the culprit again was udev. What is necessary is to edit /etc/udev/permissions.d/*udev.permissions to tell it not to install the nvidia drivers with more restrictive permissions. Find the line with nvidia*:root:root:0660 and change it to nvidia*:root:root:0666.

0 Comments on this page

2004-11-14 Fedora continued

Reformatting old Windows hard drives: The tools you need are fdisk and mkfs.ext3. You may also want to use mkswap and swapon to add a swap partition. To make mount points permanent, you need to edit /etc/fstab. Ref Ref Ref When you add swap partitions to /etc/fstab, remember that without a “pri=<number>” option, swap partitions listed first will have higher priority than those listed last. That means that they will be used until full before the system tries other swap partitions. Giving two swap partitions the same priority means that the system will use them both simultaneously in a “round-robin” approach. Looking at the file /proc/swaps will show you such information about your current swap files.

0 Comments on this page

2004-11-14 Fedora

NTFS support: I had a bunch of old files that I put on two hard drives in my system that I wasn’t installing Fedora onto. I assumed that read-only access would be built-in to whatever Fedora version I installed. I was wrong. Maybe I missed a checkbox? I found a site which explains how to recompile the kernel to provide NTFS support. It was a bit of a hassle, but I did it. One interesting caveat is that there is no longer a separate kernel source package, you need to download the regular kernel package, but specify that you want the source for it, like you can with any package. I did this. It was nice to compile a kernel optimized for my particular processor. Of course, then my NVIDIA driver refused to work with the new kernel. And up2date complained and said that since I was using my own kernel I wouldn’t be able to apply any Fedora security patches. I ended up just copying over the files from my old NTFS partitions to the new ext3 partitions, and then rebooting back to the Fedora stock kernel, so that my video drivers would work, and up2date would stop complaining. I don’t have a dual-boot system, so I’m going to re-format those drives to ext3 anyway.
Gnome and KDE: I’ve always used Gnome as my desktop, just because it’s always the default, and the Linux boxes at work always have it. Like a hot girl who is tempting but bad news, I’ve always found that Gnome is pretty but annoying. I use KDE now that I’ve had time to experiment with both of them, and I’ve found that it is easy to make it behave exactly as I want it to. It’s not quite as pretty as Gnome, but the recent KDE version is very nearly as easy on the eyes as Gnome.
NVIDIA driver: I have an NVIDIA card, and decided to take advantage of its native Linux driver. I installed it fine. It didn’t have a module pre-built for the 2.6 kernel that I’m running, but it managed to compile itself for my kernel without a hitch. Great. When I rebooted, however, it refused to start my X server. What the--? The problem, I found, was that udev, the Linux hot-plugging system, was removing the /dev/nvidia* drivers on shutdown, and wasn’t getting them put back in time for the X server to start up again. The solution? “cp -a /dev/nvidia* /etc/udev/devices/” Ref This puts the nvidia drivers into /dev at boot no matter what. There is a separate problem with file permissions getting removed from the NVIDIA drivers in /dev. This prevents any OpenGL program from working. All of these driver files start out as being readable and writable by everyone. It seems that the PAM security module is changing their permissions on login or logout. NVIDIA claims that by removing all references to “/nvidia*” in /etc/security/console.perms, you can prevent this from happening. I did exactly what they said, but sometimes I still see that the permissions have been changed. I don’t know which mechanism is causing this to happen. It remains an open issue. What I do to make it work is to su and add permissions by hand each time. It’s a bit annoying. If you see random core.* files in your home directory and you didn’t see any program crash, you might check that your OpenGL screensavers are working. If not, they can leave those core files behind.
Booting in text mode: One of the things you find when your video driver keeps breaking, is that the new Fedora relies heavily on advanced hi-res video modes and proper functioning of the X server very early in the boot process. If there is a problem with your X video driver, this makes the screen cease to give useful information very early on when you’re booting. The solution to this is to remove the kernel parameter “rhgb” to force boot to happen only in text mode without X. Then you’ll be able to see what’s going on, even if your X configuration isn’t working. You may also want to remove the kernel parameter “quiet” to see even more diagnostic info. While booting with grub, press any key before boot starts to get into the grub menu, cursor so your kernel entry of choice is highlighted, press ‘e’ for edit. Then you can delete these kernel parameters. Don’t worry, the changes are not permanent--they only affect the current boot. If you really have an emergency, you can put the kernel parameter “single” at the end to boot into single-user mode, which automatically boots as root into runlevel 3 with no X server.
MP3 support: Fedora takes a purist line that mp3 files taint the kernel because they use a patented file format. This is really annoying. Not only do none of the sound-playing programs included with Fedora play mp3s, but the ones that do play mp3s in their normal state have had that capability systematically ripped out of them by the Fedora people. In fact, KDE plug-ins natively have mp3-playing capability that in Fedora has been removed. I can download individual programs no problem, but recompiling KDE from scratch is an enormous pain. The easiest fix is to download an rpm for xmms that adds mp3 capability. The other programs and KDE modules will have to be re-installed with their un-mangled versions.
Mozilla applications: The Mozilla applications that I use, Firefox and Thunderbird, were thoughtfully included in the Fedora list of packages. Unfortunately they were the previous versions, but Firefox 1.0 was quickly added as an up2date upgrade, even though I was stuck with Thunderbird 0.8 when 0.9 had been released a few weeks ago. What I didn’t realize at first, but soon did, was that they were custom versions that had been hacked by the Fedora people. Certain things, like the file dialogs, were obviously different from the stock Mozilla widgets. In fact, Firefox 1.0 from Fedora was really slow and kept crashing. Not only that, but it didn’t have the Talkback crash feedback feature installed, presumably because that violated the Fedora people’s open-source sensibility by being not free source. So every time the buggy Fedora Firefox crashed, I couldn’t even send crash data back to Mozilla. To remedy the situation, I removed the Fedora packages of Firefox and Thunderbird from my package list, and downloaded the most recent versions from www.mozilla.org. They now run beautifully fast and stable, and I can enable all the features (including Talkback and the DOM inspector) that I want. Update: an admin at the mozillazine.org forums said he ran the stock Fedora Firefox 1.0 with no problems. Maybe he had a faster computer? Less prone to getting confused in processing? I don't know, but I'm not going back.
yum and up2date mirrors: When you first install Fedora, running yum to install new packages or up2date for updates involves a veritable Wheel of Fortune of mirror sites. The stock mirror sites that are specified for both tools can be anywhere in the world, functional or non-functional. They can make you wait a long time for no real reason, when a perfectly good mirror may be down the road. You should change your configurations so that they point only to local mirrors. Do this for yum. Do this for up2date. (Edit /etc/sysconfig/rhn/sources.) Ref
Give your computer a name!: I edited /etc/sysconfig/network to give my computer a more interesting name than “localhost.localdomain”.

0 Comments on this page

2004-11-10 Fedora

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.

0 Comments on this page