I've been noticing a lot of defunct or zombie evince processes lately and decided to take a couple minutes figuring out what's going on. In the Linux world, evince is a good PDF reader, certainly better than the one freely-available from Adobe. The problem isn't with evince: zombies cannot be held accountable.
All the zombies I had on my system this morning had one of two parent process IDs, that of Firefox (3.6.18) or that of Chrome (13.0.782.56 beta). When a process forks a child, it is supposed to wait() for the child. This can be done asynchronously, so it's little inconvenience for the parent process, and not much for the programmer of the parent process, if said programmer knows what he is doing. The child process, evince in my case, hangs around the process table as a zombie until the parent issues a wait(). This allows a parent process to keep track of the status of its children. Once the parent checks on the child, the child can go away.
Firefox and Chrome are apparently not checking on their children.
Showing posts with label evince. Show all posts
Showing posts with label evince. Show all posts
Wednesday, July 20, 2011
Thursday, August 14, 2008
Evince Bug Workaround
Evince has been a continuous battle for me ever since I switched from KDE to Gnome. Ok, more of an occasional annoyance than a continuous battle, and the various problems I've had with Evince convinced me to install and primarily use kpdf for awhile. Well, I've got a fresh Ubuntu install, and didn't want to litter it with all the junk that comes along with kpdf, so I've been using evince. However, evince wants to print everything in A4 format. Yes, my printer defaults are letter. Yes, the PDF documents are letter size. Yes, /etc/papersize contains one line, letter.
I remember wasting an afternoon on this sometime back, so the question became tell evince to use letter every single time I print, go back to kpdf, or waste another afternoon with no guarantee of better results than last time.
First tried the obvious thing:
Totally useless. Instead of placing everything in one place, the evince folks have decided to scatter documentation all over the place at their web site. But, unlike last time, Google found me a solution, a recent blog entry by Dominique Cimafranca at UbuntuLiving. He apparently uses bash, and so suggests a change to the user's .profile. I use tcsh, and so added this line to my .cshrc:
UbuntuLiving suggests that after making this change, one log out and then back in. Not necessary. Any new xterm opened from that point will have the correct setting, or one can just type
in an existing xterm (or gnome-terminal, or konsole, or whatever) and LC_PAPER is set. Then the next time you type the evince command, it'll actually print correctly with no gyrations by the user. Imagine that.
Is this a bug within evince? The evince folks may think not, but Google is unable to find any mention of LC_PAPER at site:www.gnome.org/projects/evince/ and the man page is useless, so the documentation is woefully lacking. Yeah, I'm using an undocumented feature. It'll probably break with the next release.
I remember wasting an afternoon on this sometime back, so the question became tell evince to use letter every single time I print, go back to kpdf, or waste another afternoon with no guarantee of better results than last time.
First tried the obvious thing:
man evince
Totally useless. Instead of placing everything in one place, the evince folks have decided to scatter documentation all over the place at their web site. But, unlike last time, Google found me a solution, a recent blog entry by Dominique Cimafranca at UbuntuLiving. He apparently uses bash, and so suggests a change to the user's .profile. I use tcsh, and so added this line to my .cshrc:
setenv LC_PAPER en_US.UTF-8@letter
UbuntuLiving suggests that after making this change, one log out and then back in. Not necessary. Any new xterm opened from that point will have the correct setting, or one can just type
source ~/.cshrc
in an existing xterm (or gnome-terminal, or konsole, or whatever) and LC_PAPER is set. Then the next time you type the evince command, it'll actually print correctly with no gyrations by the user. Imagine that.
Is this a bug within evince? The evince folks may think not, but Google is unable to find any mention of LC_PAPER at site:www.gnome.org/projects/evince/ and the man page is useless, so the documentation is woefully lacking. Yeah, I'm using an undocumented feature. It'll probably break with the next release.
Subscribe to:
Posts (Atom)