This blog has moved to www.nongeekperspective.com. There you will find new posts
Thursday, August 31, 2006
Configuring a Printer in Xubuntu
If you use Xubuntu you may be noticed that there's no utility for printer setting. That's why I decided to write a simple utility to add and remove printers. Although it has been tested only in Xubuntu 6.06 it should work in any linux system with cups and gtk2 installed. The utility is
Downloading xprinterconf
Update: this tool has been updated and is recommended to download the new version instead. Read this post for further information.
You can download the program in binary form (recommended) here:
http://rapidshare.de/files/31500013/xprinterconf-bin.zip.html (77 kB)
or the pascal source code from here:
http://rapidshare.de/files/31500014/xprinterconf-src.zip.html (3 kB)
Installation
Just extract the contents of the zip file to any directory and run xprinterconf from the command line:
Then should appear a window with a list of installed printers:
Adding Printers
It's better to have the printer connected to computer and powered on.
Click on the "Add..." button in the main window and wait for the Add printer dialog to appear. There you have to provide the following information:
After giving a name and selecting the proper URI and driver click on the "Add" button. You should see the new printer in the main window's list.
All printers are shared by default, as lpadmin do. This may change in a future version.
Removing Printers
Just select the printer you want to delete from the list in the main window and click on "Delete" button. Confirm the action if you are sure.
Compiling the Source (optional)
You can download and compile the source code if you want. xprinterconf is made in plain pascal and compiles fine in Free Pascal (don't know about other compiler). It uses qgtk2 and cups4lazarus units.
You can find qgtk2 in the following sites:
http://www.geocities.com/hebrak/gnu/qgtk_en.htm
http://home.tiscali.cz:8080/bubenic/nase.gnu/qgtk_en.htm
and cups4lazarus in:
http://sourceforge.net/projects/cups4lazarus/
The file has .lpr extension instead of traditional .pas because I coded it using lazarus, a Free Pascal RAD. Despite of that, the file is a standard pascal file and you don't need to have lazarus installed in your system.
The Future
As said before, xprinterconf is just a front end for cups command line, but this may change in the future. The following items are planned:
The License
I used GPLed code making this little utility. So, I think xprinterconf have to be GPL too. However, please let me know if you modify the code in any way.
Donations
If you find this little utility useful and you'd like to support future development and new features as well as new free software, please consider making a donation via PayPal by clicking in the next button. This method of donating is secure, PayPal guarantees your privacy and security.
Finally, I must say that there's no warranty. This utility works for me and it MAY (or not) work for you too.
I hope you find this program useful. I wait for your comments and suggestions
Technorati tags: xubuntu, xfce, linux, printer, printing, configuration, tool, gui, cups
Add to: del.cio.us | digg | furl | blinklist | netvouz
xprinterconf
.Downloading xprinterconf
Update: this tool has been updated and is recommended to download the new version instead. Read this post for further information.
http://rapidshare.de/files/31500013/xprinterconf-bin.zip.html (77 kB)
or the pascal source code from here:
http://rapidshare.de/files/31500014/xprinterconf-src.zip.html (3 kB)
Installation
Just extract the contents of the zip file to any directory and run xprinterconf from the command line:
./xprinterconf
Then should appear a window with a list of installed printers:
Adding Printers
It's better to have the printer connected to computer and powered on.
Click on the "Add..." button in the main window and wait for the Add printer dialog to appear. There you have to provide the following information:
- Printer name: Just a name for the printer. Use only printable characters, don't use spaces or special characters, use only characters valid in an email address, for example.
- URI: select from the list the "port" where the printer is connected to. If you have the printer powered on you should be able to see the name of the printer there. For example, if you have an HP Deskjet connected to parallel port you might see something like:
direct hp:/par/DESKJET_690C?device=/dev/parport0
- The "driver": Really a ppd file. Look for your printer model in the list at the right and select it. Notice that some drivers say "recomended" so, they could be better. Those drivers are provided by cups, not by xprinterconf.
After giving a name and selecting the proper URI and driver click on the "Add" button. You should see the new printer in the main window's list.
All printers are shared by default, as lpadmin do. This may change in a future version.
Removing Printers
Just select the printer you want to delete from the list in the main window and click on "Delete" button. Confirm the action if you are sure.
Compiling the Source (optional)
You can download and compile the source code if you want. xprinterconf is made in plain pascal and compiles fine in Free Pascal (don't know about other compiler). It uses qgtk2 and cups4lazarus units.
You can find qgtk2 in the following sites:
http://www.geocities.com/hebrak/gnu/qgtk_en.htm
http://home.tiscali.cz:8080/bubenic/nase.gnu/qgtk_en.htm
and cups4lazarus in:
http://sourceforge.net/projects/cups4lazarus/
The file has .lpr extension instead of traditional .pas because I coded it using lazarus, a Free Pascal RAD. Despite of that, the file is a standard pascal file and you don't need to have lazarus installed in your system.
The Future
As said before, xprinterconf is just a front end for cups command line, but this may change in the future. The following items are planned:
- Clean the code to improve readability (using Object Pascal sintaxis?).
- Rewrite some procedures to improve performance.
- Kill some bugs :)
- Add configure default printer's properties (i.e. paper size, printing quality, etc.).
- Allow to control sharing properties.
- A nicer interface.
- Some features you suggest.
The License
I used GPLed code making this little utility. So, I think xprinterconf have to be GPL too. However, please let me know if you modify the code in any way.
Donations
If you find this little utility useful and you'd like to support future development and new features as well as new free software, please consider making a donation via PayPal by clicking in the next button. This method of donating is secure, PayPal guarantees your privacy and security.
Finally, I must say that there's no warranty. This utility works for me and it MAY (or not) work for you too.
I hope you find this program useful. I wait for your comments and suggestions
Technorati tags: xubuntu, xfce, linux, printer, printing, configuration, tool, gui, cups
Add to: del.cio.us | digg | furl | blinklist | netvouz
This blog has moved to www.nongeekperspective.com. There you will find new posts
Comments:
<< Home
said:
Thank you so much for this application. Did you post it at xubuntu.info?
When are updates planned? I also have a suggestion: detecting network printers.
Thank you so much for this application. Did you post it at xubuntu.info?
When are updates planned? I also have a suggestion: detecting network printers.
nongeek said:
I'm glad to know that the little utility helps someone else.
Thanks for the suggestion of detecting network printers. I don't promise anything, but I'll try.
There are no dead lines for updates so keep checking the blog or subscribe to my feed :)
I'm glad to know that the little utility helps someone else.
Thanks for the suggestion of detecting network printers. I don't promise anything, but I'll try.
There are no dead lines for updates so keep checking the blog or subscribe to my feed :)
said:
i use ( http://nongeeksight.blogspot.com/2006/09/printer-configuration-utility-updated.html ) and gets ( http://www.wklej.org/id/f8cbdb4dfd ) when trying to use "add printer"
Post a Comment
i use ( http://nongeeksight.blogspot.com/2006/09/printer-configuration-utility-updated.html ) and gets ( http://www.wklej.org/id/f8cbdb4dfd ) when trying to use "add printer"
<< Home