Slashdot Mirror


Desktop FreeBSD Part 4: Printing

uninet writes "As a writer, the only reason Ed Hurst ever got his first computer was because it was far more efficient than a typewriter, and certainly more readable than his own handwriting. To enjoy that efficiency, however, you need a working printer, and Ed explores accomplishing just that with FreeBSD in this piece."

51 comments

  1. Printing on FreeBSD by brilinux · · Score: 4, Interesting

    Having just installed FreeBSD, I too had to configure my printer, yet this article made it seem overly complicated. Of course, I used KDE and CUPS to set up my USB HP-5150, but when I set the same up on Gentoo by hand, it was not that difficult. This makes using *nix systems seem harder for the desktop than it is.

    1. Re:Printing on FreeBSD by vasqzr · · Score: 2, Interesting

      Although I mainly use Linux for things such as file/email/proxy servers, I've set up printing before on workstations.

      The last version of RedHat that I used, (7.3) made it pretty easy. There was a control panel where I entered a name for the printer, chose postscript, and gave the ip of the printer. (HP LaserJet 4100). Worked perfectly. Everyone asked how I got web pages to print out without cutting off the right side (anyone who's printed from Internet Explorer knows what I'm talking about)

      It's equally easy in Knoppix, but you have the extra step of starting the printer daemon.

  2. Need a printer??? by acidrain · · Score: 1, Insightful

    To enjoy that efficiency, however, you need a working printer

    The only thing I use my printer for is printing out the odd map from the internet. And I don't need that. I think I would rather read on a monitor at this point then dig through some crummy stack of paper.

    --
    -- http://thegirlorthecar.com funny dating game for guys
    1. Re:Need a printer??? by Groganz · · Score: 1

      Hmmm, 3 insightful: man says does not need printer.

    2. Re:Need a printer??? by Just+Some+Guy · · Score: 1
      From the summary:
      As a writer...
      A person who makes their living writing words is replacing a typewriter with a computer and is interested in putting those words on paper - go figure. How is talking about your lack of need for such a thing relevant to the conversation in any way?
      --
      Dewey, what part of this looks like authorities should be involved?
    3. Re:Need a printer??? by Anonymous Coward · · Score: 0

      Parent is the most insightful article in this discussion. Putting stuff on paper is irrelevant, especially since the untimely demise of the OS in question.

  3. bad advice by Anonymous Coward · · Score: 5, Informative
    Right off the bat...

    life is much simpler if you login as root and run your desktop by typing startx at the command line

    Uh huh, run X as root. *PLONK*

    1. Re:bad advice by Anonymous Coward · · Score: 2, Informative

      RTFA! That's for installation only

    2. Re:bad advice by DashEvil · · Score: 2, Informative

      You run X as root regardless. It's SETUID.

      --
      -If God wanted people to be better than me, he would have made them that way.
    3. Re:bad advice by Homology · · Score: 5, Informative
      You run X as root regardless. It's SETUID.

      That depends. OpenBSD has patched XFree86 to make it more secure. Among things they have done is to use privilege separation for X, so not the entire X needs to run as root. They also made a ptm device that allows non-privileged processes to allocate a properly-permissioned pty, so the suid bit is removed from xterm and xconsole. Recently, OpenBSD made X work after enabling ProPolice for it, thus making buffer overflows less of a danger.

    4. Re:bad advice by Anonymous Coward · · Score: 0

      But this article wasn't about OpenBSD, was it?

  4. Re:*BSD is dying by Anonymous Coward · · Score: 2, Informative

    Good News Everyone!
    Turns out that *BSD is stronger than ever!
    According to an Inernetnews article, Netcraft has confirmed that *BSD has "dramatically increased its market penetration over the last year."
    There has been a steady increase in *BSD developers over the past decade.
    There are currently 307 FreeBSD developers as of the 2004 core team election.
    You can read more about FreeBSD here

    If you would like to try out a BSD, you can download: FreeBSD, OpenBSD, NetBSD, or DragonflyBSD
    Enjoy!

  5. Needlessly difficult... by Anonymous Coward · · Score: 4, Interesting

    There is no reason for printer setup to be complicated -- use of lpd with a couple of scripts and a ghostscript filter (for non PS capable inkjets) could easily be provided (perhaps commented out) in the printcaps for all the BSDs and as an option in Linux distros. This is all 95% of users really need or want, yet somehow this simple solution isn't provided as an option. Instead users end up searching for an unnecessary addon they hope will make printer setup easier than the lpd route (which at present often involves silly googling and guessing to find the info) but generally speaking does not make things especially simple at all.

    Another pet peeve: You would think you should be able to have lpd listen only on the interfaces you specify (defaulting to only to loopback for example). Yet even OpenBSD (to the best of my knowledge) does not provide this simple security enhancement.

    1. Re:Needlessly difficult... by R.Caley · · Score: 2, Insightful
      You would think you should be able to have lpd listen only on the interfaces you specify (defaulting to only to loopback for example).

      If you have any interfaces you are at all worried about you are running a firewall, right?

      --
      _O_
      .|<
      The named which can be named is not the true named
    2. Re:Needlessly difficult... by Anonymous Coward · · Score: 0
      If you have any interfaces you are at all worried about you are running a firewall, right?

      Yep. But nothing would be listening on anything other than loopback if lpd had a safe default. Even though the alleged shortcoming can be plugged with a firewall, I just think simple, safe, defaults have an intrinsic elegance -- yes, I am a geek, thank you very much.

    3. Re:Needlessly difficult... by R.Caley · · Score: 1
      But nothing would be listening on anything other than loopback if lpd had a safe default.

      From man lpd:

      The -s (secure) flag causes lpd not to open an Internet listening socket. This means that lpd will not accept any connections from any remote hosts, although it will still accept print requests from all local users.

      So maybe you need to get a real lpd:-)

      --
      _O_
      .|<
      The named which can be named is not the true named
    4. Re:Needlessly difficult... by Anonymous Coward · · Score: 0

      Also from the man page (on OpenBSD, but I doubt it is different on other systems):

      -b Normally, if the -s option is not specified, lpd will listen on
      all network interfaces for incoming TCP connections. The -b op-
      tion, followed by a bind-address specifies that lpd should listen
      on that address instead of INADDR_ANY. Multiple -b options are
      permitted, allowing a list of addresses to be specified. Use of
      this option silently overrides the -s option if it is also pre-
      sent on the command line. bind-address can be a numeric host
      name in IPV4 or IPV6 notation, or a symbolic host name which will
      be looked up in the normal way.

      Either the original poster is not using 'real' lpd, this option has changed since he/she read the man page, or he/she needs to read more carefully.<p>

  6. I'd use BSD for my own writing by Anonymous Coward · · Score: 0

    I'd use BSD for my own writing, but if 99.99% of your CPU time is spent on a major recompile because of a minor update, a typewriter is actually faster! It doesn't matter who "fast" BSD is, it will use most of its "speed" on recompiling itself.

    1. Re:I'd use BSD for my own writing by Anonymous Coward · · Score: 0

      Apart from your obvious troll anyway, haven't you heard of nice -20 ?
      Unlike certain other systems, FreeBSD does the right thing there. Let it compile in the background.

    2. Re:I'd use BSD for my own writing by tigga · · Score: 2, Informative
      major recompile because of a minor update

      If minor update you do because of security reasons you may try to install freebsd-update from ports. It could fetch and install binary updates. No need to recompile anything.

    3. Re:I'd use BSD for my own writing by R.Caley · · Score: 3, Interesting
      Apart from your obvious troll anyway, haven't you heard of nice -20 ?

      No need for that even, unless you want to share with other batch processing jobs. BSD does quite a reasonable job of keeping interactive things going while batch jobs do their business.

      I set off a recompile of samba on the wrong machine the other week, by typing at the wrong window, and didn't notice my desktop was 90-odd percent occupied with compilation until the bizzare throbbing red corpuscle gkrellm uses to indicate high load was uncovered when I moved a window.

      Modern over-muscled CPUs, modern memory sizes and good disk access subsystems are wonderful things.

      --
      _O_
      .|<
      The named which can be named is not the true named
  7. Re:Does BSD have a pre-emptive kernel? by Anonymous Coward · · Score: 1, Interesting

    Hmm I have SuSE 9.1 personal (focused on providing a slick desktop) and OpenBSD 3.4 (the base install is clearly not focused on the desktop at all) + KDE, installed on two identical (slowish 400 Mhz Celeron) machines. It makes for an interesting side by side comparison. Once you finally get it booted up (SuSE is very slow to boot up), some apps (like Firefox) definately are a bit faster on SuSE -- and there is no doubt SuSE has a more polished desktop esp. regarding the pretty graphical configuration/management utilities. But from any objective standpoint, once they are both set up, the differences just aren't a horribly big deal -- OS zealots will be terribly, terribly disappointed. Except for the lack of availability of a few applications on OpenBSD, you would be pretty pressed to tell the difference -- and if you have a faster machine, I expect it would be even harder since the benefits of the preemptive kernel and thread optimizations aren't very visible in the presence of vast excesses of raw computing horsepower. I'd still recommend SuSE for the desktop -- but I really can't justify calling anyone using OpenBSD as a desktop crazy either. It just isn't a big freak'n deal.

  8. Re:Does BSD have a pre-emptive kernel? by Anonymous Coward · · Score: 0

    Their stable kernel isn't, no.

    I think they have been trying to get their dev kernel preemptible, but it has bad stability problems.

    So in short no.

  9. Re:Does BSD have a pre-emptive kernel? by Homology · · Score: 3, Interesting
    I'd still recommend SuSE for the desktop -- but I really can't justify calling anyone using OpenBSD as a desktop crazy either. It just isn't a big freak'n deal.

    No big deal for most, unless one wants top performance 3D. One difference, though, is that OpenBSD has made many security enhancements to X, like privilege separation, removing suid-bit from xterm and xconsole, compiling X with ProPolice (to lessen danger of buffer overflow exploits).

  10. Re:Does BSD have a pre-emptive kernel? by torstenvl · · Score: 3, Informative

    Yes, "BSD" has a pre-emptive kernel. BSD/OS has a pre-emptive kernel. BSDi was bought by Walnut Creek and they are providing a snapshot of their code to the FreeBSD team who is using some of the BSDi team's work to make their own kernel pre-emptive, as well. Please see "Revamping the BSD multiprocessor code" at http://www.daemonnews.org/200008/dadvocate.html

    You can also see a good argument against it, dating back to 2000 from Matt Dillon:
    "I would not characterize this as 'biting the bullet'. Having a preemptive kernel is unlikely to improve performance. The only reason there might be preemption at all is to deal wth interrupts. Interrupts currently preempt supervisor code. If interrupts are moved to interrupt threads then interrupt threads would need to be able to preempt supervisor code. In this fashion the supervisor thread would be preempted, but that is very different from having supervisor threads preempt other supervisor threads (something we probably will not do)."
    See http://docs.freebsd.org/cgi/getmsg.cgi?fetch=65989 +0+archive/2000/freebsd-arch/20000528.freebsd-arch

    Actually, the whole discussion is very interesting and I have learned a lot this morning about SMP and preemption and so on from reading. Thanks for bringing this up. :)

  11. wouldn't it be nice by Anonymous Coward · · Score: 0

    Wouldn't it be nice if printing just worked on BSD? Don't get me wrong, I love BSD and won't use anything elese, because BSD makes me look elite. It would still be nice if this worked though.

  12. As if CUPS is difficult? by macwhiz · · Score: 4, Interesting

    I'd never paid attention to CUPS until Apple slid it under my Mac OS X installation. Once I took a look at it, I really came to appreciate it. Now I put it on all my UNIX boxes. I've even convinced my workplace to adopt it.

    Once the software is installed, it's dead easy to set up, especially if you're using a recent PostScript-capable printer. Most recent printers support Internet Printing Protocol (IPP) directly on their network card. CUPS speaks IPP and PostScript natively. If you set up Service Location Protocol (SLP) support, you don't even have to configure the printer -- it configures itself. There's a reason Apple adopted this software!

    Add the gimp-print driver package, and you can print to just about anything.

    It's a far sight better than dealing with the various filters in BSD lpr, and immeasurably better than Solaris' print subsystem.

  13. CUPS, Why? by R.Caley · · Score: 1
    OK, if I install a whole stack of packages, which no doubt drag in lots more, I can do what I have been doing for years with a one-page shell script, a two line printcap entry and ghostscript.

    I'm sure there must be some advantage of using CUPS which my ancient brain has missed, so can someone enlighten me?

    --
    _O_
    .|<
    The named which can be named is not the true named
    1. Re:CUPS, Why? by macwhiz · · Score: 2, Informative

      CUPS beats out good old printcap thusly:

      • If your printer doesn't support PostScript, CUPS gives it a PostScript interpreter.
      • CUPS automatically converts your print jobs from a wide range of formats to PostScript.
      • CUPS supports PPD files. That means it supports all the special features of your printer. If your printer isn't PostScript, it can generate a PPD allowing access to the printer's raster-driver features.
      • Your Windows and Mac boxes can print to your CUPS-attached printer using PostScript, too.
      • It supports ZeroConf, so when you add a new CUPS-equipped system to your existing network, it self-configures all the advertised print queues you already have.
      • It not only speaks LPR, but also HP JetDirect and IPP. You can actually get printer status.
      • Because everything gets converted to PostScript, you can easily change font options, page layout, etc. from the command line.
      • All your UNIX boxes now configure printers the same way. The print commands are all the same. Consistency is good when you have many types of system!
      • Convenient browser-based GUI, or traditional CLI configuration.
      • Better security.

      There's other features, too. Those are the ones I can think of, off the top of my head. It brings UNIX printing out of the teletype era and up to the level of Mac OS and Windows.

    2. Re:CUPS, Why? by R.Caley · · Score: 1
      Well, most of that comes with the small shell script and ghostscript. Eg, printing from windows in postsccript to a non postscript printer (though samba makes configuring the windows end easier).

      Mind you, sticking the printer on a cheap networkable print server was the best move I ever made in that direction.

      I can see it being useful for large, varied unix instalations.

      --
      _O_
      .|<
      The named which can be named is not the true named
  14. Re:Does BSD have a pre-emptive kernel? by Anonymous Coward · · Score: 0

    It is interesting to see that DragonFly is also shipping with ProPolice extensions and a few other OpenBSDesque security modifications. I'm not sure to what degree these tools are being used in the compilation of the base system however. Still, it is a nice bit a cross pollination. Perhaps the other BSD's will someday have a DragonFly inspired messaging system infrastructure (which seems very elegant, at least from my naive perspective).

  15. Re:Suggested topics for next articles - Ed, read i by SillyNickName4me · · Score: 1

    Hmm.. got me some usb connected hp printer/scanner thingy.. went to their site, saw I needed some hpijs 'driver' for Linux..

    I blindly type cd /usr/ports/print/hpijs and check.. its there.. make install.. follow half a screen of instructions at the end and my printing worked.. ( cd /usr/local/share/doc/ is a good idea as well

    KDE didn't have any trouble with it either.

    Now.. getting scanning to work with this thing is another story...

    At any rate.. might be different with other printers.. I don't use printers much.