Author Topic: Desktop shortcut to printer queue in KDE4  (Read 542 times)

Offline Heliooos

  • Jr. Member
  • **
  • Posts: 32
Desktop shortcut to printer queue in KDE4
« on: May 09, 2012, 01:53:13 AM »
Hi,
my grandpa often has problems with his printer (mostly caused by him :P I think) and needs to empty the printer queue. In old KDE3 he had a desktop shortcut to some KDE app managing it so he could do this task without problems.

However, in KDE4 I am only able to run it from PCC and I surely do not want to give him root privileges.  ;D I know there is that tiny icon in the system tray, when the printer is active or the queue is full, but it is poorly visible. Is it possible to get this on desktop? He has only few icons there so one more does not matter.

thanks

PS: the printer is an old good laser OKI connected via LPT

Online wedgetail

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2421
  • Any Bugs in site?
Re: Desktop shortcut to printer queue in KDE4
« Reply #1 on: May 12, 2012, 07:46:50 AM »
Heliooos

I wonder if this problem could be solved by using CUPS web administration.  It does require the use of a web browser but any browser should be able to do the job.

Quote
http://localhost:631/jobs/


If you click on this line above, this will then list all print jobs.  I am assuming you only have one printer connected so there will not be any problem with deleting jobs belonging to somebody else.  When cancelling a print job it will still show here, this might be confusing?

Another way similar will show when the queue is empty, this may be more attractive.  Since I do not know your printer queue name I am using an example, queue name is: Howard_NX200

Quote
http://localhost:631/printers/Howard_NX200


You can explore above two lines on any system (second line of course needs a valid printer queue name)

As it stands not exactly simple, and the idea on my part was to make a script file you place on the desktop, this would open the web browser with the correct CUPS page.

I am using a browser called Opera and the open this the run command would be  

Quote
[gert@KDE-mini:~] $/usr/bin/opera -newwindow http://localhost:631/jobs/


The purple text to be paced in a text file, saved to the desktop, the dotted lines are not part of the file. So everything between the dotted lines, including an empty line at the bottom goes into the file.

------------ start ----------------------------
#!/bin/sh

/usr/bin/opera -newwindow http://localhost:631/jobs/

------------ end ----------------------------

When the file is saved it must be made executable, for example by right clicking and go to properties > permissions and x in executable box.

This worked fine on my system, though I had a job of getting the script to run, I had used kwrite and for some reason I got into trouble, but that is probably something particular to my system.  I have often previously made script files using kwrite.  In this case I used nano to make a new file which I typed in carefully.

 :)
« Last Edit: May 12, 2012, 07:49:00 AM by wedgetail »
32 bit: KDE (older) & various KDE-mini, ASUSTek P5P41D Rev X.0x, BIOS AMI0207 07/21/2009, "Pentium(R) Dual-Core CPU E5300 @ 2.60GHz", nVidia GeForce 9600 GT, 2x1GB Seagate Technology 1000528AS HDD
TV CompuPro VideoMate Vista E700 (not working in Linux), Acer X243HD LCD Screen

Offline sir_herrbatka

  • Full Member
  • ***
  • Posts: 238
Re: Desktop shortcut to printer queue in KDE4
« Reply #2 on: May 13, 2012, 06:24:37 AM »
if you just want to remove all jobs from printer...
Code: [Select]
lprm -