gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Gnome (Debian, Ubuntu) and gnumed medication printing


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Gnome (Debian, Ubuntu) and gnumed medication printing
Date: Mon, 11 Jan 2010 21:33:48 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Mon, Jan 11, 2010 at 11:46:26AM -0800, Jim Busser wrote:

> While the PDF generation works fine, I am now debugging to
> get such GNUmed-generated PDFs (under Ubuntu which, like
> Debian, uses Gnome and does not have kprinter installed)
> actually to the printer.

Install gtklp and adjust gm-print_doc accordingly.

> I did note that after my failed print, my GNUmed stdout/stderr window contains
> 
>       /home/jbusser/bin/gm-print_doc: 46: kprinter: not found
> 
> and I wondered whether deletion of the temp files including generated PDFs 
> should be positioned after the above step, and not done when the line returns 
> as above? Or would you expect to never encounter such a line once a printer 
> had been set up? I was just thinking that under the principle of not deleting 
> a medical transmission without confirming its receipt at the destination 
> which – here – is the printer queue. At least once its hits the queue, the 
> user can be notified by the print software that there is a printing problem, 
> but if a user cannot realize the printing was not properly set up and wrongly 
> believes the jobs are emerging somewhere else in the building, that would not 
> be good.

The standard gm-print_doc takes care to capture the exit
code of kprinter (or the shell calling kprinter) and
returning that to the caller. However, somewhere along
Python <-> libc <-> Linux <-> shell the exit code seems to
get lost. Perhaps because Python's os.system() uses a
subshell.

I'll have a look at what we can gain from
subprocess.Popen().

However, it needs to be said that at some point we must
relinquish control - it is not feasible to attempt to
control the far end of the bit universe. What if the print
queue is but a decoy set up to divert print jobs ? What if
the printer is out of paper ? What if a malicious secretary
shreds medication lists as they emerge from the network
printer ?

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

[Prev in Thread] Current Thread [Next in Thread]