Slashdot Mirror


LPD For Fun and MP3 Playing

poop writes "Most true Unix geeks will recognize just how nice LPD is as a distributed queueing mechanism for managing all jobs sent to the printer. But, what most people don't realize is that LPD can be used for other things too. In fact, it can be viewed as a general queueing mechanism with a few added bells and whistles for printers. So let's examine a more interesting use of LPD, an engine for distributed spooling of MP3s." Bruha points out this mirror.

122 comments

  1. Re:LPD is over by Cliffy03 · · Score: 0, Redundant

    How could you read it...slashdotted already.

    Is this a conspiracy to sign people up?

    --
    In Soviet Russia, Nigel makes plans for you!
  2. One question by Anonymous Coward · · Score: 0, Funny

    How do I suppress the printing of the CD artwork that occurs between each "print" job?

    1. Re:One question by Anonymous Coward · · Score: 0

      Wy was this moderated as redundundant? I thought it was funny!!

  3. geez by Triumph+The+Insult+C · · Score: 4, Informative

    this has been getting a lot of coverage this week (article on deadly, some canadian newspaper, and now here). they did it at the obsd hackathon last year, and again this year.

    lpd is quite cool. i've used it to queue software builds on remote machines where we aren't given ssh accounts. it's pretty slick.

    --
    vodka, straight up, thank you!
  4. So? by ayf6 · · Score: 4, Interesting

    The real beauty of this would be if he had written a "print" driver that would allow a remote PC running windows to queue up a song thus utilizing lpd to be a "music" server rather then just an mp3 player hack.

    1. Re:So? by ayf6 · · Score: 1

      I also wanted to add that remotely queuing also would upload the file to the "music" server thus storing it there for later usage.

    2. Re:So? by L0C0loco · · Score: 3, Interesting

      Well imagine this interfaced to a website where you can browse the available material and "print" tracks to the audio queue. Rather than just playing the audio locally, it adds it to the webacast audio stream you are listening to (a queue for each stream). You can easily monitor the queue/streams from the same website - all without needing to mess with a database. It would also be easy to have a background "DJ" script loading the queue periodically with randomly selected tracks with a low priority. That way a real user can easily jump ahead in the queue with thier request. Plus you can see who requested what. Personally, I'd rather muck around with a mysql db, but some others may find this useful and it does seem like a lot of functionality ready to use.

      --
      -- Instant Karma's gonna get you! [320848 = 2*2*2*2*11*1823]
    3. Re:So? by DeadSea · · Score: 2, Interesting

      Its pretty easy to send a file to a unix print queue from Windows: http://gccprinters.com/support/doc/lprutil.html

    4. Re:So? by Anonymous Coward · · Score: 0

      If you wrote a custom print driver for Windows that basically didn't render anything and passed the file through without bothering the Windows GDI or all PostScriptafiying it Windows 2000 and XP workstations have LPR capability

  5. Site is slashdotted; article text by ethnocidal · · Score: 5, Informative

    I don't normally do this, but as the site seems to be almost dead within the first three posts, I've duplicated the article content in this post.

    -- article --
    May 23, 2003
    LPD for fun and MP3 playing
    Background

    Most true Unix geeks will recognize just how nice LPD is as a distributed queueing mechanism for managing all jobs sent to the printer. It has a beautiful simplicity to it, and some mean power to go along with it. It's a difficult beast to tame, but once you understand it, everything will start coming out exactly like you want it.

    But, what most people don't realize is that LPD can be used for other things too. In fact, it can be viewed as a general queueing mechanism with a few added bells and whistles for printers. So let's examine a more interesting use of LPD, an engine for distributed spooling of MP3s.
    Motivation

    The main thing that got me started on this quest was seeing these two pictures (one, two) from the c2k3 openBSD hackathon I saw that obviously someone else had figured out how to do it. I sure as heck could also.
    Initial Assessment

    The first stop on my quest was examine the all-knowing seer of the Internet, google. That returned a wonderful page in Swedish about how to do this very task. Unfortunately, my swedish sucks, but thankfully the scripts were written in bash, and the other big thing was just a printcap file.
    Creating a Printcap Entry

    The first thing that you need to do is to create an entry in your printcap file for your shiny new mp3 printer. On most systems this file is /etc/printcap on my redhat 7.3 system (no sound card on the openBSD firewall) it is /etc/printcap.local. You'll want to paste the following snipped of code in there:

    mp3:\ :lp=/dev/null:\ :sd=/var/spool/lpd/audio:\ :if=/usr/local/bin/audiofilter:\ :af=/var/log/audio-acct:\ :lf=/var/log/audio-errs:\ :sh

    Now we'll walk through the entry line by line. I'll ignore the \ at the end of almost every line, that just tells lpd to keep reading because there is more to come. The last line doesn't need the \ obviously.

    * 1: mp3: - the name of your mp3 printer. In this case, just mp3
    * 2: :lp=/dev/null: - we're not hooking this up to a physical device in the normal sense
    * 3: :if=/usr/local/bin/audiofilter: - this is the input filter. I'll show how to create it later.
    * 4: :af=/var/log/audio-acct: - this is the accounting file. You could do some fun stuff with this to monitor who uses the queue the most and what not.
    * 5: :lf=/var/log/audio-errs: - this is the file that errors will be logged to. Well, some errors; not all errors will end up here.
    * 6: :sh - tells it to supress any header information that would normally be sent. This is important or you may get junk before every file which causes audiofilter to fail.

    An Audio Input Filter

    The key to the whole system is that all of the processing is done by input filter. On some platforms this may cause it say that the printing has stalled while a song is playing, but that's not a big deal. There is no output from the input filter, and thus nothing is done after this. You'll want to put the following piece of code on your system as /usr/local/bin/audiofilter:

    #!/bin/bash
    #
    # This script was originally made by Teddy Hogeborn.
    # Small alterations was made by:
    # Peter Lundqvist
    # Patrick Wagstrom
    #
    # This is a "printer filter" for playing audio files

    for arg in "$@"; do
    case "$arg" in
    -d*) dir="${arg#-d}" ;;
    -e*) basefile="${arg#-e}" ;;
    -f*.*) ext="${arg##*.}" ;;
    esac
    done

    mp3player="mpg123 -q -o oss";
    modplayer="mikmod --quiet --playmode 0 --noloops --

    1. Re:Site is slashdotted; article text by Stween · · Score: 0

      "I don't normally do this, but as the site seems to be almost dead within the first three posts, I've duplicated the article content in this post."

      Strange ... the site appears to be working just about perfectly here around an hour after you posted that.

    2. Re:Site is slashdotted; article text by Stween · · Score: 1

      Well, 13 minutes after your post. I should probably have looked at my time zone settings before posting. Never noticed I was an hour out before :)

    3. Re:Site is slashdotted; article text by Anonymous Coward · · Score: 0

      ummm perhaps you should look at the time on the post. Your post is 13 minutes after his so I don't know how you could know how the site is doint an hour after the post. Heck, the story just went up. Sheesh

    4. Re:Site is slashdotted; article text by jezzgoodwin · · Score: 0

      Well I found it amazingly helpful because I haven't been able to get onto the site yet... I don't get why Slashdot doesn't automatically make mirrors of the stories for everyone to read and to avoid slashdotting poor people's sites.

    5. Re:Site is slashdotted; article text by pridkett · · Score: 4, Informative

      So you're probably wondering why it is slashdotted...well probably not, but if you were. The site is served over a terrestrial wireless broadband from Sprint Broadband Direct with a maximum uplink of 15k/s. Furthermore the server, is circa 1997 AMD-K6/200 with 96 megs of ram.

      So this finally answers the question of "can slashdot destroy a low grade consumer broadband connection?". Incidentally, the load on the server is still around 0.4. I think it peaked out around 0.8.

      Sigh...slashdot needs a distributed automated mirroring service.

      And if you're wondering, I did the article on my weblog because people on deadly were asking about how to do it. On guy even thought they had a sound device (remember the speech thing?) connected to the parallel port doing it.

      --
      My Slashdot account is old enough to drink...
    6. Re:Site is slashdotted; article text by Stween · · Score: 1
    7. Re:Site is slashdotted; article text by jezzgoodwin · · Score: 1

      so we'll just have to rely on people posting the story / a cached version then ... god damn this commercialised world

    8. Re:Site is slashdotted; article text by bsharitt · · Score: 5, Funny

      It's not Slashdotted, your just waiting in the LDP queue to see the site.

    9. Re:Site is slashdotted; article text by Anonymous Coward · · Score: 0

      Wow, you're daring. I get 21k/s upload on my Sprint Broadband Direct. And 750k/s download. It's horrible having to wait so long to contribute to the world (i.e. huge CVS checkin, music upload, video upload (not pirate, original)).

  6. Good hack, litteral sense by koh · · Score: 4, Funny

    I'm suprised they didn't try to pull this feat on Emacs first though.

    Next in line, "sendmail configuration files used as crypto keys" :)

    --
    Karma cannot be described by words alone.
    1. Re:Good hack, litteral sense by BJH · · Score: 1

      I'm suprised they didn't try to pull this feat on Emacs first though.

      Too late, someone's already done it... comes with remote file playback as well.

    2. Re:Good hack, litteral sense by uhoreg · · Score: 2, Informative

      There are already some emacs mp3 players.

      --

      To get something done, a committee should consist of no more than three persons, two of them absent.

    3. Re:Good hack, litteral sense by JohnFluxx · · Score: 1

      You sig says "no more than 3, two of them absent."
      So if you had say 2 people on the commity (that's "no more than 3", and both were absent, you'd get stuff done?

    4. Re:Good hack, litteral sense by Spiff+T · · Score: 1

      Don't you mean crypto keys used as sendmail configuration files....

    5. Re:Good hack, litteral sense by FallLine · · Score: 1

      Well "they" may not get anything done, but that is still more than what a typical committee numbering more than one tends to accomplish :)

  7. lpd generic wrapper libs in C/C++/Java/...? by hrbrmstr · · Score: 4, Interesting

    Anyone have any links to some libraries or projects that might use lpd as a transport for generic queueing? Seems like a nice, language-agnostic, non-complex mechanism for cross-system job scheduling, etc. No real security model (though one could adapt something to it), but cool and readily available nonetheless.

    Given what one can do with ghostscript queues, this is not exactly rocket science, but it goes to show the flexibility of *nix once again.

    --
    Mind the gap...
    1. Re:lpd generic wrapper libs in C/C++/Java/...? by cjsnell · · Score: 1


      Interesting idea. Personally, I would like to see a Win32 client for sending (via explorer, not IE, but explorer) audio files to the remote server. I suspect that this could be done via the Windows printing system but it could get dirty--you'd probably need a custom printer driver.

      Chris

  8. Useless... by TedCheshireAcad · · Score: 5, Funny

    ...unless it can be used as a porn queueing mechanism.

    1. Re:Useless... by schmink182 · · Score: 1

      Porn queueing? Thanks, but I prefer my porn all at once.

  9. Funky, but by nich37ways · · Score: 5, Funny

    The real problem I see with this is, you will always get some sadistic bastard who spools a ton of *pop* music before disapearing out of ear shot or some fool who doesnt understand how it works and sticks the same song in over and over again.

    Apart form that looks very fun for a small network with shared sound.

    --
    37 - what does it stand for really...
    1. Re:Funky, but by jezzgoodwin · · Score: 1

      well, just put some protection code in or whatever... although the further you take the concept you may as well make a whole program (web based or whatever) and forget using LPD

    2. Re:Funky, but by Qzukk · · Score: 1

      Ah, but thats part of the wonder of lpd. Ever since the old days, people have had the power to monitor and drop items from the queue if they're given permission to do so. Check out lpq and lprm.

      --
      If I have been able to see further than others, it is because I bought a pair of binoculars.
    3. Re:Funky, but by Fafnir_b · · Score: 1

      although the further you take the concept you may as well make a whole program (web based or whatever) and forget using LPD

      Well, I startet writing something like that in bash. There are still many things to improve, but it's working quite nicely for me: http://muff.sourceforge.net

  10. Article mirror by SILIZIUMM · · Score: 3, Informative
    http://pages.infinit.net/pmessier/slashdotted/0001 28.html

    And enjoy. Don't mod me up though, it would be karma-whoring.

    And wanted to add that the idea isn't new as you can see in this recent thread on deadly.org here (See post "mp3's playing via lpr?").

    1. Re:Article mirror by cjsnell · · Score: 1


      No offense, but did it occur to any of you karma-whoring jackasses to mirror the images?

      Chris

  11. Most unix geeks by Rosco+P.+Coltrane · · Score: 0
    do tar -xzf myfile.txt.tar.gz | mpage -4 | gs -q -sPRINTER=ljet -sOutputFile=- > /dev/lp0

    --
    "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
    1. Re:Most unix geeks by dossen · · Score: 1

      No, most unix geeks would know that you need to add --to-stdout to tar. And what's the point of having a single file in a tarball? Just use gzip or bzip2 directly on the file.

    2. Re:Most unix geeks by szmccauley · · Score: 0

      And any unix geek worth their salt would have a postscript printer to obviate the need for ghostscript.

  12. Old news ;-) by Karamchand · · Score: 1
    1. Re:Old news ;-) by hatstandman · · Score: 1

      Following on from the above 'I don't normally do this...' karma thread....(and sorry for the redundant comment)

      I wouldn't normally do this but OpenBSD really does rock; it's cool (but not surprising) that this has come from the hackathon news. I'm quite sure there'll be lots more interesting stuff to come from the most recent and future ones (with or without funding :)

  13. Been there, done that by dpokorny · · Score: 3, Interesting

    This is something I did about five years ago when MP3s where just starting to become popular. It included writing a front-end in Java that was served via an Apache web server on the music host.

    It was actually quite successful and kept my house in 24x7 music for about four years. Unfortunately, I retired all of my lpd-based printers and started using CUPS, so I also killed the mp3 queue too.

  14. lpd is nice? by timeOday · · Score: 3, Interesting

    I don't much like lpd. To me it is one of those crufty old programs that never seems to work right, never gives informative error messages, and whose configuration is arcane. Other nominees: ntp and sendmail. (And yes, I'm sure they're all wonderful once you've mastered them).

    1. Re:lpd is nice? by Anonymous Coward · · Score: 0

      I agree Sendmail is bad - but NTP?
      Do you mean Network Time Protocol?
      Here's the /etc/ntp.conf that comes with Red Hat.
      (Tweaked a bit to make Slashdot accept it.)
      Pretty darn easy. And, Red Hat now has a GUI...

      # Prohibit general access to this service.
      restrict default ignore
      # Permit all access over the loopback interface. This could
      # be tightened as well, but to do so would effect some of
      # the administrative functions.
      restrict 127.0.0.1
      # -- CLIENT NETWORK -------
      # Permit systems on this network to synchronize with this
      # time service. Do not permit those systems to modify the
      # configuration of this service. Also, do not use those
      # systems as peers for synchronization.
      # restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap
      # --- OUR TIMESERVERS -----
      # or remove the default restrict line
      # Permit time synchronization with our time source, but do not
      # permit the source to query or modify the service on this system.
      #
      # restrict mytrustedtimeserverip mask 255.255.255.255 nomodify notrap noquery
      # server mytrustedtimeserverip
      #
      # --- NTP MULTICASTCLIENT ---
      #multicastclient # listen on default 224.0.1.1
      # restrict 224.0.1.1 mask 255.255.255.255 notrust nomodify notrap
      # restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap
      #
      # --- GENERAL CONFIGURATION ---
      #
      # Undisciplined Local Clock. This is a fake driver intended for backup
      # and when no outside source of synchronized time is available. The
      # default stratum is usually 3, but in this case we elect to use stratum
      # 0. Since the server line does not have the prefer keyword, this driver
      # is never used for synchronization, unless no other other
      # synchronization source is available. In case the local host is
      # controlled by some external source, such as an external oscillator or
      # another protocol, the prefer keyword would cause the local host to
      # disregard all other synchronization sources, unless the kernel
      # modifications are in use and declare an unsynchronized condition.
      #
      server 127.127.1.0 # local clock
      fudge 127.127.1.0 stratum 10
      #
      # Drift file. Put this in a directory which the daemon can write to.
      # No symbolic links allowed, either, since the daemon updates the file
      # by creating a temporary in the same directory and then rename()'ing
      # it to the file.
      #
      driftfile /etc/ntp/drift
      broadcastdelay 0.008
      #
      # Authentication delay. If you use, or plan to use someday, the
      # authentication facility you should make the programs in the auth_stuff
      # directory and figure out what this number should be on your machine.
      #
      authenticate yes
      #
      # Keys file. If you want to diddle your server at run time, make a
      # keys file (mode 600 for sure) and define the key number to be
      # used for making requests.
      #
      # PLEASE DO NOT USE THE DEFAULT VALUES HERE. Pick your own, or remote
      # systems might be able to reset your clock at will. Note also that
      # ntpd is started with a -A flag, disabling authentication, that
      # will have to be removed as well.
      #
      keys /etc/ntp/keys

    2. Re:lpd is nice? by Anonymous Coward · · Score: 0

      First post!

    3. Re:lpd is nice? by MoOsEb0y · · Score: 1

      I couldn't agree with you more. I genuinely tried to install linux for a desktop OS, and ran into more problems with printing than anything else. That and CD burning. Linux is fine for a server, but trying to pass it off as good for much of anything is just plain retarded.

    4. Re:lpd is nice? by zank · · Score: 1

      I just want to tell you that for me Linux is a better desktop Os than Windows 2000, since my printer (hp 400) isn't even working in Windows, whereas in Linux it prints beautifully.
      Granted the printer is fairly old but so what, I'm not going to buy new hardware just to be able to run Windows.
      You never said when you installed Linux, things are moving pretty fast you now.

    5. Re:lpd is nice? by timeOday · · Score: 1

      Actually my complaint with ntp is more in the "informative error messages" department. That and the output of ntpq also cryptic.

    6. Re:lpd is nice? by MoOsEb0y · · Score: 1

      well I just put win2k back on this morning. When I posted that, I was sick of trying to find the right PPD file in order to make lpd and/or cups work. (I tried both). Then after it coastered 2 cds in a row trying to back up files I had downloaded on the linux install, I threw up my hands in disgust. (My distro was Slack 9 FYI)

    7. Re:lpd is nice? by evilviper · · Score: 1
      To me it is one of those crufty old programs that never seems to work right, never gives informative error messages, and whose configuration is arcane.

      But LPD *IS* simple... The complexity involved is due to the print filters most people use along with LPD. If you have a postscript print (thus need no filter), an amature can setup LPD (referencing the man page) in about 5 minutes.

      All too often I've wished people would think about the consequences of their printfilter design. Ghostscript is fairly lowsy, but the single worst offender has got to be Gimp-Print. Not only is it complicated to specify the driver you want to use, and even more complex learning how to find the functioning resolutions and other options, but to add to the complexity, they decided, instead of having a simple program that just takes postscript in, and outputs the printer-format, that they would depend on OTHER complicated software programs, such as Ghostscript, to add another level to the difficulty and complexity.
      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
    8. Re:lpd is nice? by zank · · Score: 1

      I wouldn't suggest using Slackware if you're looking for an easy setup. I use Mandrake 9.1 and I haven't had to setup a single device by myself. Personally I don't see the benefits of using Slackware, seems to be a geek thing.

    9. Re:lpd is nice? by szmccauley · · Score: 0
      Feh. Give it a chance, and I would recommend staying away from slack if you're not a linux geek. I used slack back in the early days, but would recommend RH9 or any of the other major distros. Sure there are some hurdles to getting printing working, but cups is a lot easier to configure than lprng. Anyway, I know several FCN's who are now using RH9 with a little help from yours truly and they are all pretty happy with the desktop.

      Definitely ready for the desktop, and it gets better and better with every release.

      And as far as gtoaster is concerned, I pretty well stopped using cdr's because windows would produce so many bad ones, but I can't think of one single bad gtoaster cdr since I started using it again a few months ago.

      Don't give up man, do a dual boot if you need windoze.

    10. Re:lpd is nice? by zank · · Score: 1

      What's so hard about setting up a printer in Redhat, provided the printer is supported? I have tried Redhat 9 but never got to use the printer.
      All I can say is that Mandrake 9.1 autodetected it and it works fine.
      If you're using KDE k3b is by far the best burning app you can get, nicely integrated with Konqueror and all.

    11. Re:lpd is nice? by MadChicken · · Score: 1

      This brings a better project to mind... I'd like to set up a CD-burning queue. Anyone know how to accept a stream and burn the CD off the server? Especially with a windows front-end...

      --
      SYS 64738 NO CARRIER
    12. Re:lpd is nice? by tzanger · · Score: 1

      I genuinely tried to install linux for a desktop OS, and ran into more problems with printing than anything else.

      I had the same troubles until I settled on CUPS and KDE. Absolutely z.e.r.o. problems. This is with high-end (duplexing, finishing, faxing) mopiers and plain-jane inkjets too. Just beware the WinPrinters.

  15. CUPS also by FauxPasIII · · Score: 4, Informative

    I like CUPS's mechanism for this kind of thing even more. You basically have two components, a filter and a backend. The filter takes in one a few forms of input (mostly postscript, but plain text and some image formats also) and dumps out the native data format of the selected printer model (or just echos the input if you set it as a raw queue). The backend is then responsible for somehow getting it to the printer, either queueing it on the parallel port or sending it out on the network somehow, or anything else.

    Some fun things I've done with backends:

    Network printing over SSH
    Text-to-speech queueing (print your source code to hear it read aloud by festival)
    Dumping into a jpeg as a way of snapshotting any document you might want to save
    Dumping into a PDF with ps2pdf to make your Windows friends feel stupid for buying Distiller =)

    --
    25% Funny, 25% Insightful, 25% Informative, 25% Troll
    1. Re:CUPS also by Anonymous Coward · · Score: 0

      They bought Distiller instead of pirating it? :p

    2. Re:CUPS also by haluness · · Score: 1

      Do you have any docs on how you set up the dump to jpeg feature?

    3. Re:CUPS also by FauxPasIII · · Score: 2, Informative

      The magic part is this:

      pstopnm -stdout file.ps | pnmtojpeg > file.jpeg

      Both of those filters are in the netpbm package:
      http://netpbm.sourceforge.net/

      --
      25% Funny, 25% Insightful, 25% Informative, 25% Troll
    4. Re:CUPS also by AnyoneEB · · Score: 3, Informative

      If you want a Windows PDF printer you can use FreePDF which is mostly a GhostScript frontend that appears as a printer.

      --
      Centralization breaks the internet.
    5. Re:CUPS also by Jon_E · · Score: 1

      or you could use the print to PDF option in staroffice ..

    6. Re:CUPS also by waferbuster · · Score: 1
      Some fun things I've done with backends:

      Network printing over SSH Text-to-speech queueing (print your

      Hmm if I were going to list the fun things I've done with backends, it probably wouldn't include using printers...

      --
      I'm an individual! Just like everyone else!
  16. DNS zone transfers by hey · · Score: 2, Funny

    While we're hacking ... how about using DNS zone transfers. Its distributed (everywhere) and its cached until a change occurs. Maybe you'd have to uuencode the info. But what if every .com entry had a few MP3s!

  17. so an error could message may be by DrWhizBang · · Score: 4, Funny

    "/dev/dsp" is on fire!

    --
    Schrodinger's cat is either dead or really pissed off...
    1. Re:so an error could message may be by TobiasSodergren · · Score: 1

      Probably if /dev/dsp is about to play music by J-Lo. Maybe not because of her looks, but because of her singing.. ;)

  18. Muzac player? by Anonymous Coward · · Score: 0

    Sounds like a good technique for cheaply playing muzac to me. Or is Muzac dead in the water? Supplanted by piped Clear Channel broadcasts?

  19. HIgh End Queuing? by bigattichouse · · Score: 2, Insightful

    Could this be adapted for a MQ system (say queuing database queries?).. just adding some extra info into the "document", like where the query came from, etc. What kind of load can it handle?

    --
    meh
    1. Re:HIgh End Queuing? by Anonymous Coward · · Score: 0

      Well, not easily. MQSeries does a lot more, if that is what you want to match. Security, transaction guaranteed and verified. It is a system by which you know for sure if you submitted something, it will get there. LPD falls far short of that as of now anyway.

  20. That takes alot of paper! by Anonymous Coward · · Score: 5, Funny

    I sent my entire playlist to lpd and i've gone through all my paper, is there a way to make it print 4-up to save a few trees? To be honest I don't see the appeal of this....

  21. ldp old by aggieben · · Score: 1

    just my two cents: cups has been much nicer in my experience. One of my favorites: lp -o prettyprint -o number-up=2

    --
    Don't become a regular here, you will become retarded. -- Yoda the Retard
  22. Responsible Reporting by nurb432 · · Score: 3, Interesting

    Slashdot REALLY needs to start being more responsible and contacting these people first..

    Sure, report news as needed, but before *linking* ASK them if they can deal with the load.. or the cost after being hit hard..

    This is getting really bad, and i can feel a 'anti-slashdot' movement growing over this sort of thing.

    --
    ---- Booth was a patriot ----
    1. Re:Responsible Reporting by Rosco+P.+Coltrane · · Score: 1

      yeah sure, like Taco calling the guys up saying : "hey, we're about to link to one of your page and your server may die as a result, your expensive T1 will be DoS'ed to uselessness for 2 hours, and your admin may have to work overtime. Do you mind ?"

      And forget about caching the pages on /. : my news ticker already gets kicked out when it pulls headlines more than twice an hour, so forget about VA authorizing that kind of extra load.

      --
      "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
    2. Re:Responsible Reporting by Anonymous Coward · · Score: 0

      damn. I personally load the front page 10x that much and I can still get in...

    3. Re:Responsible Reporting by Doktor+Memory · · Score: 0, Flamebait

      Yeah, but that would require two things:

      1. For the slashdot crowd to stop regarding "the slashdot effect" as some sort of penis substitute.

      2. For Rob and Taco to actually spend 0.00001 seconds pondering the concepts of "ethics" and/or "professionalism."

      Not gonna happen in a million years.

      --

      News for Nerds. Stuff that Matters? Like hell.

    4. Re:Responsible Reporting by cjsnell · · Score: 2, Funny


      Well, in that case, warn this guy that his page will be slashdotted early next week, when the dupe story gets posted.

      Chris

  23. If I accidentally print an MP3... by fobbman · · Score: 4, Interesting

    ...will it do something like this?

    1. Re:If I accidentally print an MP3... by GoRK · · Score: 1

      It would be better if it did something like this.

    2. Re:If I accidentally print an MP3... by spinlocked · · Score: 1

      Eighty-Five Conservatives on my Freaks list. wooHOO!

      +1. I'm not conservative, I just find your sig irritating.

      --
      # init 5
      Connection closed.


      Oh... ...bugger.
    3. Re:If I accidentally print an MP3... by Trolling4Dollars · · Score: 1

      On to my friends list with you...

  24. Huh ? by Moderation+abuser · · Score: 2, Funny

    I just let xmms handle the queueing of music, in a thing called a "play list".

    However, for real geekiness, you should be using gridengine to queue and distribute your mp3s.

    --
    Government of the people, by corporate executives, for corporate profits.
    1. Re:Huh ? by Anonymous Coward · · Score: 0

      I bet lpd would actually be a lot more fun in an office-like environment where everyone could spool their favourite music to the server. You cannot do that with xmms play lists, can you...

  25. Hey, this guy is really funny ! by Anonymous Coward · · Score: 0

    Mod him up, he probably paid a lot to learn how to crack such good jokes, that'll make him feel better.

  26. Mirror Here by Bruha · · Score: 1

    http://lmo.warcry.com/mp3lpd.php Lazy Link to Mirror Enjoy

  27. I'm sure it's very nice... by The+Fanta+Menace · · Score: 4, Funny

    ...until you accidentally spool that mp3 to the printer ;)

    --
    -- Even if a god did exist, why the fsck should I worship it?
  28. Old, old news. by Anonymous Coward · · Score: 0

    We used to do this with .au files back in 1991.

    1. Re:Old, old news. by Anonymous Coward · · Score: 1, Funny

      Oh yeah? We used to do this with .. um .. piano players back in 1600.

  29. What the hell is Humppa? by Anonymous Coward · · Score: 0



    Is this a new group, group of songs, or what?

    What genre?

  30. Re:This is so CLEVER ! by KDan · · Score: 1

    Actually they did mod me down. And no, I don't care, I've got karma points falling out of my arse.

    As I said, they're easy to get.

    Oh, and they'll probably mod this one down too, but I still don't care. Notice I'm leaving the karma bonus on to really drive the point through your thick skull.

    Daniel

    --
    Carpe Diem
  31. Mirror here by Anonymous Coward · · Score: 0
  32. Forget T1's by nurb432 · · Score: 1

    What about the poor guys that are self-hosting on dsl/cable and go over their monthly cap.. then socked with a HUGE bill...

    Or the tiny personal web pages that cap # of hits...

    --
    ---- Booth was a patriot ----
  33. Useful for 3D animation by Comrade+Pikachu · · Score: 1

    I can imagine hooking LPD up to a 3D renderer like POV-Ray, BMRT, or even Lightwave's new Linux render client, then "printing" TIFF frames from your animation software.

    How cool! I can't wait to try it!

  34. So sick of this! by sker · · Score: 4, Funny

    I can't BELIEVE the RIAA is trying to shut thus guy down for...

    Oh they're not?

    Well.. How DARE SCO sue this guy for using...

    Err, wait..

    This is an article.. about someone using software technology... to accomplish a task... and there's no litigation involved???

    OH MY GOD!!!!

    --
    nonsig. unsig. desig.
  35. Re:Forget T1's-Revenge. by Anonymous Coward · · Score: 0

    " What about the poor guys that are self-hosting on dsl/cable and go over their monthly cap.. then socked with a HUGE bill...

    Or the tiny personal web pages that cap # of hits..."

    Using the referral header to redirect to goatse.cx or tubagirl. I guarentee that if everyone linked does that (internet version of the death penalty) Taco will quickly get the message. Be a good netizin, or else.

  36. Did it with cups! by zdzichu · · Score: 3, Funny

    Whoa. My CUPS is right now playing some .ogg files :)

    Steps are simple:
    1. uncomment
    #application/octet-stream
    at the very end of /etc/cups/mime.types

    3. drop this
    ---
    #!/bin/bash

    if [ $# = 0 ] ; then
    echo network audioplay \"Unknown\" \"Audio Player\";
    exit 0;
    fi
    /usr/local/bin/mplayer -really-quiet "$6" >> /dev/null
    ----
    in /usr/lib/cups/backend/ as audioplay
    chmod it +x and restart cups

    4. Add printer in cups:
    name: audio
    location: /dev/null
    description: Hacked Audio-playing CUPS
    device: Audio player
    (if you don't see this device, you probably haven't restarted cups or audioplay is not executable)
    device uri: audioplay://unused/
    make: raw
    model: rawqueue

    4. cat your_favourite.ogg | lpr -r -Paudio
    you can also do
    lpr -Paudio -r song.mp3
    but be careful, lpr likes to delete file after printing.

    5. Prof^WEnjoy!

    --
    :wq
    1. Re:Did it with cups! by zdzichu · · Score: 1
      --
      :wq
    2. Re:Did it with cups! by Anonymous Coward · · Score: 0

      it may not be profit, but we still don't know what step 2 is. :)

    3. Re:Did it with cups! by jcenters · · Score: 1

      Why the hell is this modded up? The guy just posted code that just might wipe out some poor, unsuspecting newbie's music collection.

      Oh, the hillarity! Great way to convert people to Linux, have them destroy their music collection.

      BTW, this doesn't even work. It will play the first file sent to the queue, and the rest pass simultaneously, like Taco Bell through a Perl coder. Anyone know how to get this code to work so that it actually queues the music files, and isn't just an archaic frontend to mplayer?

      --

      vi ~/.emacs

    4. Re:Did it with cups! by loserdave · · Score: 1

      well first off, don't use the -r toggle

      `man lpr` says that it deletes the file, post printing.

      --
      Yes, I am an agent of Satan, but my duties are largely ceremonial.
    5. Re:Did it with cups! by zdzichu · · Score: 1

      Oh sh*t. I've misreaded the man of lpr and used '-r' instead of '-l'. Mea culpa, mea culpa, mea maxima culpa.

      But I've noticed lpr tried to delete file (it's hard to do from CD :) and i've wrote a warning in my post.

      And it works for me, queuing like it should.

      --
      :wq
  37. lpd for astronomical images by at10u8 · · Score: 1

    At NOAO the Unix lpd has long been used as the mechanism for Save the Bits, which is the means by which they and several other observatories archive all of the data acquired at their telescopes.

  38. Securitah Warning by cjsnell · · Score: 2, Interesting


    Beware, these scripts appear to be vulnerable to to un-escaped shell command characters (ie ', ", &, etc) in the filename. The script does not do any validation of the file that is sent to it. Since LPD doesn't do any authentication by default, be very careful about running this stuff on a public-accessible machine.

    Chris

  39. Question......... by zakezuke · · Score: 1

    From what I understand... xterminals don't really support sound, not in any meaningful way. Could this simple solution be used with a typical x-terminal to provide... well, local sound?

    --
    There is no sanctuary. There is no sanctuary. SHUT UP! There is no shut up. There is no shut up.
  40. Been there, done that by Anonymous Coward · · Score: 0

    I did this back in 1993, "printing" my MIDI files through a perl4 filter which translated them to musixTeX and converted them to PostScript and then to TIFF, faxing them automatically to a piano-player friend of mine who would then call me and play. Big deal.

  41. lpd isn't even good for printing by g4dget · · Score: 1

    A well-designed, well-implemented print spooling system could be useful for other applications. Unfortunately, we don't have one of those yet.

    lpd, lprng, and cups all have a nasty habit of getting into weird states. And lprng and cups can also be a b*tch to configure.

  42. Great for serializing database updates, too... by bob · · Score: 1

    In my office we use a one-writer, many-readers database system for timeseries data. But we have many people responsible for small parts of the database, so we needed some way to pool the updates into a single, serial stream. About eight or so years ago, we wrote an update queueing system using PLP, the precursor to LPRng. The thing has worked flawlessly since then, in a production environment supporting dozens of updaters. Print spoolers aren't just for printing anymore :-)

  43. mirror by jazperbg · · Score: 1

    Got a mirror up - here. It can handle the traffic, don't worry.

    --
    jasp
  44. The Power of 'Dumb' Tools by The+Monster · · Score: 1
    lpd is quite cool. i've used it to queue software builds on remote machines where we aren't given ssh accounts.
    This is just another example of the power of simple, 'dumb' design, especially at the low levels of the protocol stack: Unix says that 'everything is a stream of bytes' and so does TCP/IP, having been heavily influenced by Unix. Even though it's called 'Line Printer Daemon', it is written generally enough to be used to queue any stream of bytes. As a transport mechanism, it need not know anything about the content of what it's transporting. It just moves the bytes, leaving it to the filter that acts as the next layer in the protocol stack to worry about what to actually do with the byte stream once it's delivered.

    In trying to explain the mentality to those unfamiliar with it, I use this analogy:

    A mechanic has to reach a bolt in a particular location that constrains the path the handle of a wrench can traverse to a difficult S-curve. He can:
    1. Go to a tool store and purchase a specialized (and therefore quite expensive, especially including the cost of his time going to the store) wrench with the right curve and end size to fit this particular bolt head. Then he hangs the tool on the pegboard and doesn't use it again until he sees this same exact situation, so the cost per use of the tool is quite high. This is software usage as most people are familiar with it. Every time you change the situation even slightly, costly rewrites of monolithic compiled applications eat you alive.
    2. Reach into his tool box, pull out the socket that fits the bolt head, and add to it the right combination of components that allows him to manipulate this bolt, effectively building the equivalent of that one-off wrench as he goes. When the job's done, he puts those components back in the socket set, ready to be used for the next job. This is the Unix mentality The system is designed to be that socket set with a bunch of small, reusable, general components that each do one part of a job, and can be easily assembled to do just what the situation requires.
    If you ask a garage manager which makes sense, he'll tell you that the mechanic who knows how to use the components gets more done in less time with cheaper tools, and is therefore earns every penny of the higher wages he gets for it. And the one who doesn't know how to do it is in big trouble when he goes to the tool shop and they don't have what he needs, because nobody ever thought someone would need that exact combination of twists and turns
    --

    [100% ISO 646 Compliant]
    SVM, ERGO MONSTRO.

    1. Re:The Power of 'Dumb' Tools by sholden · · Score: 1

      What a useful analogy.

      After all the average slashdot reader is far more likely to know more about mechanics than about unix...

    2. Re:The Power of 'Dumb' Tools by Anonymous Coward · · Score: 0
      the average slashdot reader is far more likely to know more about mechanics than about unix.
      Unfortunately, the average slashdot reader is likely to know far more about unix than how to explain it to those who don't understand it.
  45. maybe use samba by STREMF · · Score: 1

    You might be able to do that with samba, by defining a printer or share in your smb.conf with the spool that plays mp3s.

    There was an article a couple months ago in Linux Journal, i believe, with instructions on using a smb-shared "printer" on your linux box to run files through ghostscript in order to get PDFs out.

    I can't try it out right now but i hope this gives someone an idea.

  46. Innovation w/o Litigation is a Temporary Situation by The+Monster · · Score: 1
    This is an article.. about someone using software technology... to accomplish a task... and there's no litigation involved???
    Yet. Just wait until *AA find out that lpd can be used to copy m{usic|ovie}files, with no DRM to prohibit piracy!
    --

    [100% ISO 646 Compliant]
    SVM, ERGO MONSTRO.

  47. sendmail configuration files used as crypto keys by GQuon · · Score: 1

    Here's an script for just that purpose:

    [simple, but working, encryption/decryption script]

    Lameness Filter Encountered
    Reason: Use fewer "junk" characters.

    Your comment has too few characters per line (currently 29.8).

    So, since I can't be bothered to start a sourceforge project, I guess we'll just have to forget it.

    --
    Irene KHAAAAAAN!
  48. I'm still afraid to run LPD by swerk · · Score: 1

    Back when I was a GNU/newbie, my Red Hat box got 0wn3d by some script kiddie due to a buffer overflow exploit in lpd. I use CUPS now, even though I know LPD is generally very safe. One of those irrational, almost subconscious things, you know? Ahh well, no damage was done, it taught me to keep my software patched and my ports closed, and it gave me a good excuse to rid myself of RPM hell and install Slackware :^)