Johnathan.org

Showing only: Originals

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.

andrew-neel-308138-unsplash

2018 Year in Review

It’s about that time of year when I look back on the posts that attracted the most eyeballs. Some of the most popular pieces of content this year were also the most popular last year, too. Admittedly, not much of this was actually from this year. By my count, half of these posts came from 2016 and 2017. I didn’t get back into blogging hardcore until the last 1/4th of 2018.

Here are the top 10 most popular posts on this blog based on the number of views in the last year:

#10 PowerPort Mini: The Charging Device Apple Should Have Made

When I got my hands on yet another awesome Anker product, I was almost certain I’d enjoy it. True to form, Anker built a charging brick that is a bit larger than Apple’s standard 5w unit but provides so much more power, it’s almost a no-brainer. Each port is good for minimum 6 watts at 1.2 amps or one port is good for 12 watts at 2.4 amps. It won’t break any speed records, especially compared to larger 18 and 30 watt chargers, but for its size and price (2-pack for $16) I don’t know if it gets much better.


#9 Affinity Publisher Beta

It was especially neat to see Affinity coming out with another killer desktop creative application to give Adobe a run for its money. Even though Publisher is still in beta, it’s extremely stable and worth taking a look at if you have some time.


#8 Add RTMP Support to Nginx Installed From Apt

For the third year, this post makes its way onto my top 10 list. There seems to be just enough people out there–especially in the Raspberry Pi community–that want to stream video and ran into a lot of the same problems I have.


#7 Fighting ffmpeg

Also in its third year, my struggles with ffmpeg don’t go un-noticed in the linux/Raspberry Pi community.


#6 MacPaw’s CleanMyMac X Review

There hasn’t been a day when I wasn’t a fan of keeping my computers fresh and clean. MacPaw makes great software, and their newest version of CleanMyMac is no exception. It’s entirely worth the price, and if you’re a Setapp user, download it right now. If you’re not, go pick it up anyway.


#5 Linode vs Digital Ocean: A Three-Round VPS Benchmark Showdown

This was a fun post to write. I’ve hopped back and forth between the two providers a couple times over the years, and it was good to see just how each of them shined. Since both are equally priced, a lot of it comes down to one part workload and one part personal preference. Take a look at some of the benchmark results for yourself and see what makes the most sense for you.


#4 Phone, Wallet, Keys

Adam Sandler was never one of my favorite comedians, but sharing this video seemed to be a hit with a lot of folks.


#3 Fixing Browsersync Not Reloading

I posted this in December 2017 so it never had the opportunity to make its way to the top that year, but I imagine had I shared it many months earlier, it would have.


#2 Live Streaming with Hardware Acceleration using a Raspberry Pi and RTMP/HLS

The third of four of my posts to make this list for the 3rd time. This is one of the series on my struggles in figuring out how to stream video from a Raspberry Pi to a couple different locations. Specifically, this part involved tackling hardware-accelerated streaming.


#1 Attempting to Stream a Webcam to an RTMP Server

This was my original attempt at streaming video from a webcam to an RTMP server and the fourth of my 2016 posts to make it on this list for the third time.

Some thoughts on the 2018 Macbook Pro

I have been a Macbook Pro owner since 2011. I bought a 15″ model then, another one in late 2015, and my third iteration landed in my lap last week. Unsure of the experience I would have, I took the plunge and snagged a 2018-era 15″ Macbook Pro with Touch Bar. I wanted to jot down some of my thoughts after a week of usage every day.

On the plus side, I actually enjoy the keyboard. I know not everyone does, and I think I might be in the minority, but as a light typist, the short travel keys actually feel really good. They’re a bit loud, but not so much that it bothers me.

The slightly smaller form-factor is also nice, too. I had started to think that a 15″ might be too big for my needs, especially after staring at the massive bezels for the last 3 years. Now, I’m back to thinking it’s just fine. 

The onboard storage is stupid fast, benchmarking at something like 2500MB/s for both read and write. Hot dog. 

The Touch Bar is strange. I never noticed until after getting this unit that I liked to rest my hand where the now-touch-sensitive Escape key sits. I’ve hit it a few times on accident. I have since corrected my ways, but it was definitely a bit of a surprise. As far as the rest of the touch bar goes, I’m still unsure of its ultimate value. 

Touch ID is super fast and is a great method for accessing the computer from a locked state. 

Battery life is pretty dang good, too. I spent an average day of work and managed to crank about 7 hours out of it with no care about how I was using the device or micro-managing its energy consumption. If I had spent more time dimming and throttling, it’s not unreasonable to have expected 9 or 10 hours. 

Weight is fine. It’s definitely lighter than my outgoing 2015 model. I haven’t had an opportunity to push the graphics card in any way. I spent 99% of my time on Integrated. ¯_(ツ)_/¯

Getting into the USB way of life has been hard, though once I got my Thunderbolt 3-enabled dock up and running, I joined the “single cable club.” I’m also now a member of Dongle Town, too, so it seems like a wash.

Overall, I’m super happy with my purchase. 

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