Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 10-31-2008, 07:04 AM   #1
Registered: Jun 2008
Posts: 82

Rep: Reputation: 15
printer setup via command line in ubuntu


I need to configure a printer in ubuntu machine. I've configured it using as well as System-->Administration-->Printing...

But I need to configure/set default printer using command line /or some shell script....

Kindly advise.
Old 10-31-2008, 07:26 AM   #2
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 734Reputation: 734Reputation: 734Reputation: 734Reputation: 734Reputation: 734Reputation: 734
You can edit the file /etc/cups/printers.conf

There are also a whole bunch of commands beginning with "lp" (Use tab-completion to see them all---or ls /usr/bin|grep "^lp")

I've never used any of these, except lp
Old 11-02-2008, 11:32 PM   #3
Registered: Jun 2008
Posts: 82

Original Poster
Rep: Reputation: 15
/etc/cups/printers.conf is okay... but how to generate ppd file for printer from command line ?
Old 11-03-2008, 01:05 AM   #4
Senior Member
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,013

Rep: Reputation: 83
To set a default printer use:
lpoptions -d printer
As for creating a ppd file, have you tried searching for relevant man pages man -k ppd shows a list of tools to use.
Old 11-04-2008, 12:27 AM   #5
Registered: Jun 2008
Posts: 82

Original Poster
Rep: Reputation: 15
lpadmin command has resolved my issues. Thanks....



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
How to apply cups printer from command line? marisdembovskis Linux - Software 16 11-09-2007 06:54 AM
command line printer list paul_mat Linux - Software 1 05-09-2006 03:09 AM
Setting default printer from command line mihailolja Linux - Newbie 1 03-19-2004 02:49 PM
setup X in command line chii-chan Fedora 2 01-20-2004 06:32 PM
Command Line and Setup jarmstrong Linux - Newbie 2 05-31-2002 12:57 PM

All times are GMT -5. The time now is 02:53 PM.

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