This blog has moved to 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 xprinterconf.

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: (77 kB)

or the pascal source code from here: (3 kB)


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:
direct hp:/par/DESKJET_690C?device=/dev/parport0

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:

and cups4lazarus in:

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.


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: , , , , , , , ,

Add to: | digg | furl | blinklist | netvouz
This blog has moved to There you will find new posts
Anonymous Anonymous said:
Thank you so much for this application. Did you post it at
When are updates planned? I also have a suggestion: detecting network printers.
Blogger 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 :)
Anonymous Anonymous said:
i use ( ) and gets ( ) when trying to use "add printer"
Post a Comment

<< Home