Pi printserver + OMV + Webmin?

Hi All,

I've had a RPi since the first big batch and kept up all the main models (b's) all along but not really used any for anything permanent.

The other day I setup a 2 with OpenMediaVault (NAS) connected to a 3TB laptop drive and that seems to be working pretty well. Yesterday I first setup a Pi1 then 3 with Raspbian and made it into a print server for my Dymo 450 LabelWriter. Again, they both worked but because I'm not very good with Linux on the CLI, only really got anywhere (easily) by having a GUI and access to the Internet to be able to copy and paste easily or installing Webmin.

So, two questions really ... 1) seeing I now have two Pi's running ... could I (easily / practically) combine the two roles onto one machine and 2) if not (and there may be other reasons why I might not want to) how would you restart Webmin and the current Raspbian DE / GUI (Pixel?) if I set either not to start on boot (for what would be just a print server). I know of 'startx' but not sure if that's still valid and don't want to risk not being able to get back into the GUI again (as I can stop both Webmin and the DE/GUI starting from within each GUI)?

Cheers, T i m

Reply to
T i m
Loading thread data ...

Yes. Whether that is practical depends on how much of a load those roles will demand. I'm going to lean towards yes, as the load shouldn't be overwhelming.

startx still works, and that functionality will continue to work even if startx goes away.

Alternatively, if your non-pi device(s) support ssh + X windows forwarding, you can run your pi's as a, umm, servers that doesn't automatically start X. Then you can invoke whatever X application you need remotely.

Additionally, Webmin is accessible from a web browser, generally connecting to the right ip address and port 10000: http://x.x.x.x:10000/

If you already have Webmin installed, then the last one should work well for you.

--
Consulting Minister for Consultants, DNRC 
I can please only one person per day. Today is not your day. Tomorrow 
isn't looking good, either. 
I am BOFH. Resistance is futile. Your network will be assimilated.
Reply to
I R A Darth Aggie

Thanks. I see the roles as fairly complementary, file and print serving. File should be mostly network i/o whereas printing might be a bit more CPU?

Ok and more specifically then ... if I go into the DE configuration (on Rasparian / Pixel) and select 'Don't start the GUI at boot', and later I find I need it, should I be able to start it by typing 'startx' at the cli?

I'm not sure I follow that but it may not matter ...

Yes, I have and it does but again, I see an option in Webmin to *not* start at boot, so if I selected that and then later needed it, how would I start it again (locally or via SSH etc)?

Cheers, T i m

Reply to
T i m

It depends on where the rasterizing of the image occurs for Dymo labelwriters. I would presume that most of the work is done on the machine trying to do the printing, and not on the print server or the labelwriter. So it really comes down to network and then USB i/o.

Correct.

If you login locally, ignore the ssh part.

ssh user@mypi

sudo service webmin start

-or- sudo /etc/init.d/webmin start

should do the trick.

--
Consulting Minister for Consultants, DNRC 
I can please only one person per day. Today is not your day. Tomorrow 
isn't looking good, either. 
I am BOFH. Resistance is futile. Your network will be assimilated.
Reply to
I R A Darth Aggie

You are probably right. ;-)

Agreed.

Cool ... and I just tested it and it works as suggested. ;-)

Understood.

I've only used Putty from Windows so far and that works but it would seem SSH isn't running from boot, even though I think it should be according to Webmin.

That didn't seem to work locally but since seems to work remotely (via SSL) so may have been finger trouble. ;-(

That worked both locally and remotely (thanks). ;-)

So, I can start the DE / GUI with 'startx' at the local CLI.

How would I stop it please (to save rebooting)?

I can start (and stop) Webmin locally or via SSH.

Should SSH (typically) start on boot and if so, can you tell me why when Webmin suggests it should it doesn't seem to be (as Webmin give me the SSH start option and then the stop option).

I'm going to print all the key commands (above) on a big Dymo label and stick it to the underside of the Pi case. ;-)

You never know, once I've typed them 1000 times I might remember them! ;-)

Cheers, T i m

Reply to
T i m

One way to tell where rasterisation occurs is to look at the printer spec. If it claims to be a 'Windows printer', GDI, Postscript or XPS (XPSDRiv) device then printer can only accept a bitstream, which contains nothing except a bitmapped image of the page, as opposed to a character stream containing ASCII or UTF8 character codes intermixed with sequences ('Escape sequences') that select font size, font weight, underlining etc.

GDI printers will need a fast USB connection to work at a decent speed, probably USB 3 at a minimum to handle a high resolution bitstream, while those that accept a character stream will be adequately fast with USB 1 or USB 2 connections.

NOTE: that the Linux/UNIX print management system is CUPS which uses printer-specific drivers to handle translation between the character stream output by the program you're using and the modified character or bitstream the printer understands.

If there's a CUPS driver for your printer, then configure it and be happy. If there isn't, but your printer is a member of a printer family that all accept a character stream containing escape sequences, then your choices are wider.

The printers I know that form families are Epson printers that accept 'Esc/P' control sequences and HP Laserjet printers, which understand HPLJ control sequences. In both cases each newer printer added more control codes but are backward compatible with earlier models. This opens your possibilities: if you configure CUPS to use an earlier model within these families when CUPS doesn't recognise the newer printer you have, the printer will still work perfectly, but can't handle the 'latest printer twiddles': if you don't use these, then you've lost nothing. If you REALLY,REALLY need the latest twiddle then, because CUPS is open source, you can volunteer to create a new printer driver for it or raise a bug asking for the new printer to be supported.

For instance, an Epson Stylus colour printer works perfectly well if you tell CUPS its an MX-80 (80 col 9-pin monochrome dot matrix printer from the late '70s) or an LQ-500 (120 col 24 pin monochrome dot-matrix printer from the late 80s) but of course you'll only see a reduced set of fonts and sizes in black and white if you do this. But - it may well get the job done for you.

How I know this? Been there and done it many times. I'm a satisfied owner of an Epson LQ-500 and a HP LJ5.

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
org       |
Reply to
Martin Gregorie

Yes for 'Windows printer', GDI and XPS - but not PostScript which is a very powerful device indpendent page description language originally designed for professional typesetters. I'd take a PostScript printer in preference to PCL or ESC/P any day.

--
Steve O'Hara-Smith                          |   Directable Mirror Arrays 
C:>WIN                                      | A better way to focus the sun 
The computer obeys and wins.                |    licences available see 
You lose and Bill collects.                 |    http://www.sohara.org/
Reply to
Ahem A Rivet's Shot

is

I got the impression that some, at least Postscript printers did rendering in the driver, which is what I was referring to. Same would go for Postscript renderers like ghostscript.

But my real point was that, if a driver or rendering package is used to spit a bitstream at the printer, than it may be rather slow if its on a USB 1 connection. I imagine that the using ghostscript as a postscript renderer on an RPi 1 or 2 could be glacially slow.

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
org       |
Reply to
Martin Gregorie

Is the next step where R.I.P.s come into this OOI?

Cheers, T i m

Reply to
T i m

So, OOI and from the Dymo 450 LabelWriter tech ref manual:

"All 450 series printer models connect to a host computer through a standard full-speed USB 2.0-compatible interface. There are no built-in fonts. The host computer is responsible for sending commands and data to the printer to form each individual raster line of data. This is generally performed by printer drivers in the host computer that convert the image of the label into the proper command and data stream required by the printers."

So that makes it a GDI printer then I'm guessing?

And:

"Printer Commands and Control The printers support two types of commands through the USB interface: data commands and USB interface commands. As with all USB printers, data commands for imaging a page are provided to the printer through the Bulk OUT endpoint. For information on USB interface commands, refer to the Universal Serial Bus Device Class Definition for Printing Devices document.

Data commands for printing consist of print data and ESC commands. Print data is used to define the dot pattern to print for each raster line. ESC commands (commands preceded by an ASCII character,

0x1b) are commands that change printer parameters, such as margins and raster line offsets. All printer parameters are set to specific default values by a power-on reset or software reset command from the host computer. Parameters can be modified by the host computer at any time and will take effect as soon as the modifications are sent."

Cheers, T i m

Reply to
T i m

Yes. And the following stuff (omitted) just amplifies that by saying that the printer can also act as an image scanner and giving more detail about using it as a printer. Does CUPS provide a print driver for it?

BTW, seeing that CUPS is primarily a print spooler (it accepts and queues lists of documents to be printed on one or more configured printers), it almost certainly can't use the printer as a scanner. To do that you'd need a suitable scan program and a TWAIN driver for the printer. TWAIN is a universal interface between scanners and scanning applications - think of it as a reverse of CUPS.

I've used Vuescan as the scanning application on a Linux laptop to drive a Minolta Scan-Dual IV slide scanner. That worked OK and represents my total experience with scanners and scanning.

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
org       |
Reply to
Martin Gregorie

That's certainly the case: the RPi print server will have to output raw print commands. (But this is a label printer, so the bitmaps aren't huge by modern standards.)

The question remaining is just what is meant by a print server. For example, it's entirely possible to configure lpd or cups such that clients talk good honest PostScript or even PDF to the print server, which uses GhostScript to render and rasterise for the specific printer.

Alternatively, this may be the Windows brain-dead version of printing (as the Dymo manual assumes), where every individual client has to have a driver installed for every printer it can use. In which case there'd be rasterised data flowing both in and out of the print server, which is more likely to congest the network/USB interface.

Reply to
Roger Bell_West

Dymo provide one Martin that seems to work. ;-)

There will be no issue there as this is *just* a little (thermal) label printer.

formatting link

Dymo do both a 'wireless' label printer and a print server but they are both expensive and potentially not as flexible or as good VFM as the straight USB printer and 'a' PrintServer.

I also have a TP-Link PS on it's way and if that works with the Dymo

450 I'll keep the Pi for more interesting / worthy tasks. ;-)

Cheers, T i m

Reply to
T i m

Judging by how fast the whole process works (Windows client print job to graphical label coming out of the printer), it's all pretty small. ;-)

The thing is with a maxim resolution of 300 x 600 dpi and labels not much bigger than (AFAIK) 59 x 190 mm (~ 2.25 x 7.5") then even a big picture should amount to much data?

Cheers, T i m

Reply to
T i m

That can of course be done, but it's a hideous thing to do if you have a PostScript printer. I'd not call it a PostScript printer unless it speaks the language without external support, otherwise everything supported by ghostscript would count.

Oh sure ghostscript pretty much has to dump bit images even with ESC/P and PCL printers.

A page is about 200 megabits (24 bit colour, 8x11, 300dpi) so at low speed that would be just over two minutes per page (plus overhead) but at high speed it's only about 17 seconds (plus overhead) which isn't too bad and might make processing speed the limiting factor. That's raw images, any kind of compression will make it a lot better for simple pages with few colours.

I doubt it would be glacial, I've used ghostscript as far back as

80486 based machines sending bit streams to HP inkjet printers over a parallel port - that's gacial! Compared to that an RPi 1 would fly :)
--
Steve O'Hara-Smith                          |   Directable Mirror Arrays 
C:>WIN                                      | A better way to focus the sun 
The computer obeys and wins.                |    licences available see 
You lose and Bill collects.                 |    http://www.sohara.org/
Reply to
Ahem A Rivet's Shot

Or you don't have a systemd system.

Hit the Logout button. You should be dropped back to your terminal. If you want to be rude about it, control-alt-backspace might do it, unless X got configured to ignore that sequence.

No clue. I generally don't use webmin. I found this, which may help

formatting link
which suggests

sudo apt-get install ssh (which you'v done) sudo update-rc.d ssh defaults

Every Debian I've installed openssh-server on starts it automatically.

"I wrote them down in my diary so that I wouldn't *have* to remember."

--
Consulting Minister for Consultants, DNRC 
I can please only one person per day. Today is not your day. Tomorrow 
isn't looking good, either. 
I am BOFH. Resistance is futile. Your network will be assimilated.
Reply to
I R A Darth Aggie

Yes, I'm with you there about the definition, but would just point out that flogging a GDI printer with a driver that converts Postscript to bitstream, badge-engineered as a Postscript printer, is a damn cheap way of 'making' and selling one.

Yes, of course.

Fair comment.

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
org       |
Reply to
Martin Gregorie

Good stuff!

Similarly, I keep my old Epson LQ-500 around because, on the few occasions I need to print address labels, I already have code that can print on one-up labels on sprocketed carriers. Besides, the LQ-500 is dead reliable - haul it out, blow the dust off, plug it in and its away.

OTOH writing code that can do that on a page-mode LaserJet without wasting part-printed pages of labels is not a trivial undertaking.

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
org       |
Reply to
Martin Gregorie

Two bash commands everybody should know

"apropos subject", e.g. 'apropos CUPS' lists all commands with CUPS or cups in its manpage one-line summary And if you think it missed something obvious, run "sudo updatedb" to update the apropos database.

"man subject" Goes without saying, really. Manpages are the motherlode of info about commands, their config files and C library functions, though do run "man man" at least once to get some idea of the manpage subdivisions Try "man getopt" and "man 3 getopt" to see what I mean.

--
martin@   | Martin Gregorie 
gregorie. | Essex, UK 
org       |
Reply to
Martin Gregorie

man -k is quicker to type, once you remember it.

Reply to
Roger Bell_West

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.