All Entries RecentChanges RSS Oddmuse Wiki

Fedora Blues

The continuing saga of my battle to install and maintain Fedora Core 3.

SRP:Fedora RSS Feed


2005-01-16 Fedora

Make Adobe Reader 7 for Linux Stop Flashing!

I like the fact that Adobe finally has updated its PDF reader for Linux, after possibly a decade of no development whatsoever. Way to go guys! Oh, and by the way, the scroll wheel on the mouse still doesn’t %$&*ing work!!

Ahem. Anyway, the default behavior when you move a page, either by scrolling or by using the “hand-grabber” mouse cursor, seems to be to completely redraw the whole page. It’s annoying. If you move the page even a few pixels, the page will keep redrawing and strobing.

To fix this, first recover from your epileptic fit. Then in Adobe Reader 7, go to Edit->Preferences->Startup. Select “Use page cache”. This will fix the issue. It probably uses more memory, but at least you won’t be having fits on the floor from the strobing display of your pdf file.

1 Comment on this page


2005-01-11 Fedora

Kaffeine is good

I just wanted to give props to Kaffeine, the KDE-optimized audio/video player. It’s a front-end to xine, a free audio/video engine. Together they play just about any video format that I’ve thrown at them. And Kaffeine does it with style. It’s one of the most satisfying, solid, and stylish open-source programs I’ve used. (See also Firefox.)

Make sure you know how to spell it. It’s German. Not that there’s anything wrong with that.

2432 Comments 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-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-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-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…

1347 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: matt.hdr. 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 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 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