What makes us different from other similar websites? › Forums › Tech › Synology USB Printer Configure
Tagged: NAS, Network Printer, printer, Synology, USB Printer
- This topic has 0 replies, 1 voice, and was last updated 5 days, 19 hours ago by
thumbtak.
Viewing 1 post (of 1 total)
-
AuthorPosts
-
April 10, 2025 at 11:03 pm #8041
thumbtak
Keymaster- Login via browser, to Synology NAS
- Click Control Panel
- Click File Services
- Search SSH
- Check Enable SSH service
- Click Apply
- Close Control Panel
- Open File Station
- Click home
- Click Create
- Click Create Folder
- Name it Script
- Click OK
- Click Script
- On your computer, Open Notepad or Mousepad
- Paste the following code:
#!/bin/sh docker run -d \--name=p910nd \--privileged \-p 9100:9100 \-v /dev/usb/lp0:/dev/usb/lp0 \justinhimself/p910nd:latest '-b' '-d' '-f' '/dev/usb/lp0'
- Save as printer_configure.sh
- Drag file to the Script folder you created on your NAS
- Open Package Center
- Click All Packages
- Search for Container Manager
- Install Container Manager
- Open Container Manager
- Click Registry
- Search for p910nd
- Download justinhimself/p910nd
- Close Container Manager
- Open Command Prompt or Terminal
- Type
ssh username@port
and when asked enter your password - Type
cd /dev/usb/lp0
If found, the printer should be able to be configured. - Type
exit
- Type
ssh username@port
and when asked enter your password - Type
cd Script
- Type
chmod +x printer_configure.sh
- Type
bash printer_configure.sh
At this point, it should create a Container called p910nd - Add the network printer on your system at NAS IP address
If it prints the page , after adding it, all is fine, until you restart your NAS - Go to your NAS
- Click Control Panel
- Click Task Schedular
- Click Create
- Click Scheduled Task
- Click User-defined script
- Task name Printer-Restart
- Click Schedule
- Set Repeat Daily
- Start time of your choice
- Check Continue running within the same day
- Repeat Every hour
- Last run time of your choice
- Click Task Settings
- Paste the following code in User-defined script
#!/bin/shLOG="/var/log/p910nd.log"echo script started at \date +%Y-%m-%d\ %H:%M\ >> $LOG/usr/local/bin/inotifywait -m -e create --include 'usb' /dev | while read changed; do /usr/local/bin/docker restart p910nd ; echo [\date +%Y-%m-%d\ %H:%M\] restarting p910nd >> $LOG; done
- Click OK
- Click Apply
- Close Control Panel
- Click Control Panel
- Click File Services
- Search SSH
- Uncheck Enable SSH service
- Now the code above (in step 51) should restart the printer when you power off the device and the first script (in step 16) can be deleted, if you want.
-
AuthorPosts
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.