| Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-28-2010, 02:59 PM
|
#1
|
|
LQ Newbie
Registered: Jan 2008
Posts: 6
Rep:
|
run script when a users prints
How do I write a script (or more correctly, a daemon) that will listen for print jobs and run a script when the user prints?
Basically when the user prints I want to open a browser window that takes them to a portal we have setup to allow them to release the print job, the job will go to the print server immediately, so I don't have to worry about standing in the way of the print job. I just wan to open firefox after the job is submitted to the server.
Any Ideas?
|
|
|
|
06-28-2010, 03:24 PM
|
#2
|
|
Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 11,817
|
Quote:
Originally Posted by Elcrapocrew
How do I write a script (or more correctly, a daemon) that will listen for print jobs and run a script when the user prints?
Basically when the user prints I want to open a browser window that takes them to a portal we have setup to allow them to release the print job, the job will go to the print server immediately, so I don't have to worry about standing in the way of the print job. I just wan to open firefox after the job is submitted to the server.
Any Ideas?
|
Nope, not with details. What are the clients running? How are the printers attached now? How do the users print now??
Best idea I'd have, would be to do away with the portal, web page, clicking, etc., and just go straight through a CUPS server. You'd have a log of who printed what, when, etc., and users wouldn't have to click anything, run any scripts, etc.
|
|
|
|
06-28-2010, 04:45 PM
|
#3
|
|
LQ Newbie
Registered: Jan 2008
Posts: 6
Original Poster
Rep:
|
hahaha, TB0ne you have no idea how badly I would like to do away with that portal page!
Let me give you a bit more info:
I work for a small private college that is thinking about using linux thin clients for our dorm lab computers. We have an existing printing solution that allows our students to print and charges them a set amount depending on the printing in question (color, location, etc.) The print server is Windows Server 2003 and the clients will probably be either Linux Mint or BrowserLinux.
Once the client prints, the printing software on the server catches the job and holds it in a queue, then the student needs to go to a webpage and login with their AD credentials to see the print jobs sent from that computer.
From there the student selects the job they want to print, if the student has enough credit the job prints and the student goes along their merry way.
All of this is set in stone and is non-negotiable.
If the client is windows based, the user will get a popup message after the job is submitted to the print server. This popup is nothing more than an IE window with all the tool bars stripped off. The problem is that the printing solution provider does not have a linux client that does the same thing. The functionality seems pretty basic, when the user prints a job I want to kick off a script that opens firefox and sends them to the portal page that they can release their job from.
I figure I will need to either listen for print events (run a daemon) or hook into cups and have a post print event (kick off a script), either one works for me.
A nasty hackish way could be to watch the syslogs, grepping for print events and firing off the script if it sees one ... but something about that just doesn't sit right with me ... it seems to cobbled together. I am looking for a more elegant solution, elegance = reliability in my experience ... but I guess that largely depends on your idea of elegance ... but I digress : )
Last edited by Elcrapocrew; 06-28-2010 at 04:45 PM.
Reason: misspelling
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:31 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|