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

profile function: not found. Was: Dymo 450 ejects label on login



Darac Marjal <mailinglist@darac.org.uk> writes:

> On Mon, Oct 15, 2012 at 05:47:07PM -0600, Joe Pfeiffer wrote:
>> The issue is as above:  new machine running xfce4 desktop, with two
>> printers attached.  One of them is an Epson Workforce 645, the other is
>> a Dymo 450 label printer.  The Epson is, of course, the default printer
>> on the system.
>
> Is the Dymo attached as a standard printer (that is, you have an entry
> in CUPS and you can print to it from any normal application) or (being a
> label printer), does it just show up as a character device that prints
> out any data sent to that device?
>
> If the former, check the CUPS logs to see if there's a stuck job,
> perhaps. If the latter, something is presumably sending a form-feed to
> the device. Does this happen if you create a new user and log-in to
> their desktop? Does it happen if you log in at a VT and run startx?

Thanks -- that seemed like the direction the problem had to be in -- but
as you will see in a moment, it wasn't related to the printer or CUPS at
all.

>> 
>> When I log in to the desktop, the Dymo ejects one blank label.
>> 
>> Any thoughts?

I've tracked the problem down now, and found another, stranger (but
easily resolved!) problem.

My .profile defines several bash functions.  When logging in from gdm3,
my .xession-errors file was getting a "function: not found" on every one
of them, and executing all of the commands in the function.  The
particular symptom I was seeing before came because I had a function
defined as

function label { sed -e 's/^[ \t]*//' | enscript -r -d dymo450 -B -f Times-Roman12 -M Address ; }

(if your news reader wraps that, it was all one line in the file and in
my post)

Using the alternate syntax

label () { sed -e 's/^[ \t]*//' | enscript -r -d dymo450 -B -f Times-Roman12 -M Address ; }

works just fine -- no error, and no blank label.

I've got *no* idea why the function keyword wasn't being recognized.  I
put an

echo $SHELL

in the file, and it wrote /bin/bash in the .xsession-errors file, so it
isn't the obvious problem...
-- 
"Erwin, have you seen the cat?" -- Mrs. Shroedinger


Reply to: