From 1edf07c1cc4c918589b327b747a9ad866ac071b7 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sun, 16 Oct 2022 18:58:00 -0600 Subject: [PATCH] Minor fixes --- README.md | 8 ++++++++ main.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8b026fa..fa25906 100644 --- a/README.md +++ b/README.md @@ -220,6 +220,8 @@ Optionally set up a cronjob: ``` $ cd rootfs/ # on SD card $ sudo touch var/spool/cron/crontabs/pi +$ sudo chmod u=rw,og= var/spool/cron/crontabs/pi +$ sudo chown pi:crontab var/spool/cron/crontabs/pi ``` Edit `var/spool/cron/crontabs/pi` (optional): @@ -301,3 +303,9 @@ $ sudo lpadmin -p dymo -v `sudo lpinfo -v | grep DYMO | cut -d" " -f2` -m 'dymo: $ sudo cupsenable dymo $ sudo cupsaccept dymo ``` + +Test the printer: + +``` +$ echo "hello world" | lp -d dymo - +``` diff --git a/main.py b/main.py index 37bc2be..e622b4d 100755 --- a/main.py +++ b/main.py @@ -216,7 +216,7 @@ def print_nametag(name, guest=False): draw.text((x, y), quote, font=font, fill='black') im.save('tmp.png') - os.system('lp -d dymo tmp.png 2> /dev/null') + os.system('lp -d dymo tmp.png > /dev/null 2>&1') def message_protovac(message):