Laurent Pertois’s useless blog

January 10, 2008

CUPS and rss on Mac OS X 10.5 Leopard

Filed under: Mac OS X — lolopb @ 12:46
Tags: , ,

Mac OS X v10.5, aka Leopard, comes with an improved version of CUPS web admin tool (after all, CUPS is now owned by Apple, this may have an influence). Among the new features, one caught my eyes, rss feeds (I love rss feeds, some friends can witness). Unfortunately, after testing it didn’t work, I only got a 404 error from CUPS. That’s why I searched a way to make this feature work properly.

If you are curious, maybe have you already looked the local web admin tool for CUPS. If no, you can point your browser on http://localhost:631/.

If you knew the former version, you’ll notice many changes. In the admin tab, you’ll even discover a new feature allowing you to create rss feeds to get informations about some or all your printers queues or CUPS startup and shutdown (for examples) :

cups_rss.png

But, Apple wouldn’t be Apple if everything was perfect in version .0. Even in 10.5.1 this feature is broken, all you get is a 404 error when trying to access the feed.

Digging a little in /private/var/log/cups/error.log I noticed these lines saying:
Unable to create /private/var/spool/cups/cache/rss/test.rss.N: Permission denied.

Checking permissions on /private/var/spool/cups/cache/rss, I discovered this :

$ sudo ls -ld /private/var/spool/cups/cache/rss/
Password:
drwxr-xr-x 3 root _lp 102 Jan 8 00:08 /private/var/spool/cups/cache/rss/

which explains why the rss feed can’t be created, “_lp” group can’t write in that folder (which is rather stupid as this spool is for CUPS and “_lp” is kind of CUPS group).

Simply modifying these permission to allow “_lp” group to write is enough:

$ sudo chmod g+w /private/var/spool/cups/cache/rss/

Once this is done, the feed will only be created at the next event you have checked so that it appears in it, before that, you’ll get the same 404 error we had at the beginning. But, if you selected an action such as “Queue stopped”, just open the “Print & Fax” Preference Pane in System Preferences, double-click on your printer and pause/resume it. Now, you’ll be able to enjoy your new own local rss feed:

cups_rss2.png

It’s now your turn to find out what you want in your feeds, but that may be a good way to keep an eye on outgoing faxes, for example.

Unfortunately, if you repair permissions on your drive, you’ll have to modify permissions on the folder again, but, anyway, why repair permissions?

Advertisements

5 Comments »

  1. Thanks so much, this was just what i needed to resolve my issues with permissions/ownership of the rss folder.
    I am using Redhat Enterprise Linux 4.6 and i manually upgraded cups to 1.3.5 and saw this feature but just could not get it to work.

    -Kurt

    Comment by Kurt — February 19, 2008 @ 4:01 | Reply

  2. You’re welcome, I’m happy to have helped a “cousin” from Linux with a post about Mac OS X.

    Comment by lolopb — February 28, 2008 @ 11:49 | Reply

  3. Where is the rss folder on Redhat?

    Comment by James — April 30, 2009 @ 12:17 | Reply

    • Found it.
      /var/cache/cups

      I had to make the rss directory. Set chmod 777 on the folder.

      When the rss file is in that folder, make sure it has read permissions so you can access from web browser.

      Comment by James — April 30, 2009 @ 1:11 | Reply

  4. Hello! I got the same 404 error not found. Please help.. accessing the rss feed works fine. but when i click on the link of each notification for the details, it gives me 404 error not found.

    what should i do?

    i am using cups in snow leopard.

    thanks!

    Comment by Renante — November 25, 2010 @ 2:24 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: