Johnathan.org

Showing only:

Configure a Raspberry Pi as a print server for Dymo label printers

This seemed like an odd article to post after nearly 11 months of blog inactivity, but it’s a problem I had to solve on my own today and felt it necessary to write this. Other Internet-based sources I consulted ended up only being partially correct so this is ultimately a combination of all the correct pieces of information that exist online.

I’m going to assume you have a Raspberry Pi (I’m using the Pi 3B+) already set up and connected to your network.

Parts:

  1. Install and configure CUPS
  2. Install Dymo printer drivers
  3. Add the Dymo printer to CUPS

Part 1: Install and configure CUPS

This is relatively easy and only requires a few steps.

1. Ensure your package repository information is up to date, then download and install cups:

sudo apt-get update
sudo apt-get install cups

2. Once installed, open /etc/cups/cupsd.conf and make the following changes:

…change the listen configuration to listen globally on port 631…

# Only listen for connections from the local machine.
Port 631

…and update the <Location> configurations to allow local user access…

<Location />
# Restrict access to the server...
Order allow,deny
Allow @local
</Location>

<Location /admin>
# Restrict access to the admin pages...
Order allow,deny
Allow @local
</Location>

<Location /admin/conf>
AuthType Default
Require user @SYSTEM

# Restrict access to the configuration files...
Order allow,deny
Allow @local
</Location>

3. Add your Pi’s user to the lpadmin user group:

sudo usermod -a -G lpadmin pi

(there are alternative ways to handle this, like change which user group CUPS should consider properly allowed to make printer changes, but in all likelihood, this’ll be sufficient.)

4. Restart CUPS

sudo service cups restart

Part 2: Install Dymo Printer Drivers

This is the part where I got stuck. Most documentation will point you to the official download, but during the install process, I received tons of errors and had to back out of it.

Preferred method

1. Install the printer-drivers-dymo package:

sudo apt-get install printer-drivers-dymo

Alternative method

Alternatively, you can follow the below steps to download and compile manually, but I couldn’t get this to work properly. YMMV.

1. Download the linux drivers from dymo onto your Pi.

2. Decompress them with tar and enter the directory:

tar -zxf dymo-cups-drivers-1.4.0.tar.gz
cd dymo-cups-drivers-1.4.0.5

3. Configure and install the drivers:

sudo ./configure
sudo make
sudo make install

NOTE: During the ./configure step, if you receive this error:

configure: error: Can't find cups library

…you’ll need to point the configure script to the location of the CUPS server folder, as it was unable to find it on its own. If you installed CUPS via apt, it’s probably at /usr/lib/cups so re-run the command like so:

sudo cups_serverbindir='/usr/lib/cups' ./configure

If it still doesn’t work, you’re missing a couple fundamental libraries. Go ahead and install those:

sudo apt-get install libcups2-dev libcupsimage2-dev

Part 3: Add the Dymo printer to CUPS

With CUPS set up and your printer (hopefully) already plugged in–if not, make that happen–access the CUPS admin interface at:

https://localhost:631/admin

Your browser will probably complain about the SSL certificate. Skip through that, if necessary. You’ll land on a page that looks something like this:

1. Click the Add Printer button under the Printers section. Select the Dymo printer and click Continue.

2. Fill in the fields as you see fit and make sure to check Share This Printer before clicking Continue:

If everything went according to plan in Part 2, the relevant drivers should appear, with the specific printer at the top of the list.

If that’s the case, leave everything as is and click Add Printer.

Lastly, and optionally, set some default print settings and wrap up the setup by clicking Set Default Options:

The printer should be set and ready to go, and visible from the CUPS admin page:

Conclusion

After doing this for the third time now I’ve found myself having to hack through some component of the printer driver process, save for this most recent effort (what I’ve documented in this post). I highly recommend doing everything via the package manager if you can help it. What made me think to include that as an option was noticing the version of dymo-cups-drivers in the Ubuntu source repo was newer than what Dymo itself was offering. That version was also used to build printer-driver-dymo. When the metaphorical lightbulb came on, I realized this was probably a solution to my compile struggles.

Some of the Best Independent WordPress Theme Shops

For 2019, one of my “goals” if you will is to spend more time noting more of the resources and tools I find valuable. The first category I’m targeting has to do with WordPress. Over the last 10 years of using WordPress in various capacities, I’ve seen, tested, tinkered with, and used more than a few WordPress themes, both free and for money.

In that time, I’ve used a lot of themes from big names like Elegant Themes and Genesis, and they’re fantastic products. This tweet from Tom McFarlin got me thinking about the smaller shops and independent developers:

Here’s my list of some of my favorite smaller/indie (or niché as Tom put it ?) WordPress theme developers/shops.

For every shop I listed, I know there are three more that would probably make the cut. These are just the ones I’m most familiar with and would recommend to WordPress users looking for high quality product.

ThemeForest and Creative Market often have high quality products from indie developers, too, so their marketplaces are always worth checking out, too.

Cloudflare Argo: 228 Days Later

It seems like such a random amount of time to review (and it kind of is) but I wanted to start of 2019 right and review a topic I touched on in 2018: Cloudflare‘s smart-routing product, Argo.

In my previous post about Argo, I covered the vast improvements to response times just by enabling the service. Response times were practically cut in half. Since then, I’ve made some more tweaks to my site so it felt fair to review if Argo is still picking up the slack it claims to. If you’re unsure of how Argo works, my previous post has a good explainer.

Considering Aggressive Caching

One improvement I made was to lean heavy on Cloudflare’s Page Rules functionality. I purchased myself a set of five Rules for an additional +$5.00/month and got to work. I focused on wielding caching for everything that isn’t likely to change often if ever. In this case, most static assets will live on Cloudflare’s servers and in a visitor’s browser for quite a while.

When I first implemented this, I didn’t consider plugin JS, but in reality, most of what’s being caught by that rule is WordPress-related (read: Jetpack), and I haven’t experienced issues thus far.

With the majority of /wp-content being taken care of with page rules, it was time to re-evaluate the now decreased load and its effect on the benefits Argo provides.

Argo Post-Aggressive Caching

There’s a reason Cloudflare recommends Argo regardless of how you cache. Even with aggressive caching in place, I’m still seeing about 25% response time improvements:

The average runs between 23-27%, depending on the days I’m checking, but the 23.28% in the image above is pretty close to “most of the time.” What’s also worth pointing out is the peaks and valleys largely follow the same percentage improvement across the board, and it’s no wonder: 75% of requests end up going through Argo’s pipeline.

With the aggressive Page Rules and Argo, I’m comfortable in saying Argo has a permanent home with this site and any future projects I take on. It’s a no-brainer and still remains highly cost-effective.

Johnathan Lyman
Kenmore, WA,
United States
 
blogging, design, technology, software, development, gaming, photography