LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-14-2014, 06:44 PM   #1
CowboyRT
LQ Newbie
 
Registered: Jan 2014
Posts: 7

Rep: Reputation: Disabled
Attempting to get the userid of user submitting a print job to application.


I have a software application that runs on linux that takes input data from a virtual printer, processes it, and generates output.

I am creating file output from this application and part of the filename is the user who submitted the print job.

I am using DATE(), TIME(), USERNAME() functions as part of filename.

LET d = DATE()
LET t = TIME()
LET u = USERNAME()

I used the values d, t, and u to build my filename. When I invoke this application from the command line by calling the executable directly and supply the input data, my output file has the correct username as part of the filename.

When I invoke the application by sending the data to the virtual printer using the lp command, it does not return anything in the username part of the filename. It is just blank.

When the data is sent to the virtual printer, the virtual printer takes that input data and runs a script to process it.

Thanks for any ideas on this.

Regards,
CowboyRT
 
Old 05-15-2014, 09:39 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,216

Rep: Reputation: 6100Reputation: 6100Reputation: 6100Reputation: 6100Reputation: 6100Reputation: 6100Reputation: 6100Reputation: 6100Reputation: 6100Reputation: 6100Reputation: 6100
From your other post I assume you are running CentOS and using CUPS. How did you create the virtual printer? Without knowing anything about your application, printer, script etc it is a bit difficult to help. Did you create your own filter?

http://www.cups.org/documentation.ph...pi-filter.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Print job stops, will not print OS: Fedora 16, Printer Samsung ML-2955ND Entwicklung Linux - General 9 05-18-2013 08:00 AM
Firefox, Okular don't put print job on the print queue (silently) pwabrahams Linux - Software 1 02-18-2011 07:39 AM
[SOLVED] Cups and Samba to print one print job to 2 printers - tutorial added bourne Linux - General 7 09-18-2009 10:10 AM
Submitting batch job from apache vidhuc Linux - General 6 03-20-2008 02:05 PM
Submitting a job to a server frankie_DJ Linux - Newbie 3 06-26-2006 01:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration