LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-26-2009, 07:44 AM   #1
blastradius
Member
 
Registered: Oct 2004
Location: Cheshire, England
Distribution: Debian Stable
Posts: 269

Rep: Reputation: 39
How do I get vim to print?


I'm running Ubuntu Jaunty and I've had a look at Emacs and Vim to start my C++ coding attempt with, (looks like Vim is the one for me). Problem is that it won't print although all other programs are fine.

Vim gives me 'E365 failed to print postscript file'

Please help, is there a simple fix?
 
Old 09-26-2009, 08:07 AM   #2
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 97
Can you print from the command line?
Code:
lp file.c
 
Old 09-26-2009, 09:03 AM   #3
blastradius
Member
 
Registered: Oct 2004
Location: Cheshire, England
Distribution: Debian Stable
Posts: 269

Original Poster
Rep: Reputation: 39
No I can't, I just get:-

lp: Error - no default destination available

I take it I need to set the printer, I would have thought that because it works for everything else that it would work from the shell, clearly not, how do I set the printer?
 
Old 09-26-2009, 10:01 AM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Below allows you to print from command line
Code:
lp -d HP_LaserJet_P1005 main.c
or
lpr -P HP_LaserJet_P1005 main.c
Replace the printername (italic) by your printer name

Below sets the default printer (not sure if it's persistent between reboots, not tested)
Code:
lpoptions -d HP_LaserJet_P1005
and now you can use lpr (or lp) without additional parameters.
Code:
lpr main.c
 
Old 09-27-2009, 11:50 AM   #5
blastradius
Member
 
Registered: Oct 2004
Location: Cheshire, England
Distribution: Debian Stable
Posts: 269

Original Poster
Rep: Reputation: 39
Success

Thanks very much, printer now working from Vim
 
Old 09-27-2009, 12:32 PM   #6
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Great. Please mark your thread as 'solved' using the tread tools just above the first post.
 
  


Reply


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
Switching from vim to vim -g from inside vim iDragoon Linux - Software 4 05-15-2009 11:46 AM
Editor comparison: vim VS vim-lite, Cleaning vim Ruler2112 *BSD 4 04-13-2009 04:26 PM
LXer: Vim tips: Using Vim mappings and abbreviations LXer Syndicated Linux News 0 06-18-2006 01:54 PM
LXer: Cream for Vim - Making Vim more user friendly LXer Syndicated Linux News 0 06-17-2006 11:54 PM
VIM print sweetje Linux - Newbie 0 02-22-2002 01:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:50 PM.

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