Printing from Linux on URJC printers

This is an automatic translation generated by artificial intelligence. May contain errors.

This guide refers to the printers accessible via URJC printing portal. These are the printers installed in departmental buildings, management buildings, etc., available to university staff. The instructions provided here have been tested on Ubuntu 19.04 and 18.04, and on Debian 10.

What we are going to do

We will install the printing service as a virtual print queue via SMB. Jobs sent to this queue can later be collected at any printer managed by URJC printing portal by swiping your card on the front of the printer, just below the screen.

The printing service is configured at the address iveco.urjc.es. Depending on how DNS is configured on your Linux box, it may or may not be directly accessible. See the “DNS Configuration” section at the end.

Installing the necessary packages

To install the virtual print queue, we start by installing the necessary packages: python3-smbc smbclient.

$ sudo apt install python3-smbc smbclient

In Debian, it is also advisable to install system-config-printer to configure CUPS printers (alternatively, they can be configured from the web interface):

$ sudo apt install system-config-printer

Depending on your exact operating system, during the installation process you may be given the option to use WINS server information received via DHCP. In principle, in our case, the answer to that question does not seem to have an effect on the rest of the process.

In some cases (for example, in Ubuntu 16.04), you may also need to edit the file /etc/samba/smb.conf, adding the following lines to the global section, usually at the beginning of the file:

client min protocol = SMB2
client max protocol = SMB3

If you do this, then you must restart the service:

$ sudo service smbd restart

Printer configuration

The printer is a Konica Minolta bizhub C458, which we will configure as “C759SeriesPS(P) BEU”. We start by downloading the necessary files from the bizhub C458 page: “Drivers”, “Drivers”, “Linux”, “Version 1.21” (latest version at the time of editing this guide, 1.21, the file names will vary if new versions appear), and in that entry download the three files offered:

  • GenericBeuUXv1_21_multi_language.tar.gz
  • BEU Linux CUPS Driver Guide.pdf
  • KMbeuUXv1_21_multi_language.tar.gz

Save all three in the same directory.

From here we can use two alternative procedures.

More automatic procedure

We start by using the first downloaded file, decompressing it:

$ tar xvzf GenericBeuUXv1_20_multi_language.tar.gz

Once decompressed, you will see a directory GenericBeuUXv1_20_multi_language containing an installation file (requires Perl to be installed), which we will run. When finished, we restart the CUPS service with the new configuration:

$ cd GenericBeuUXv1_20_multi_language
$ sudo ./install.pl
$ sudo /etc/init.d/cups restart

This process will install the PPD files (printer descriptors for CUPS) for the printer.

Next, run the system-config-printer program (in Ubuntu, configuration panel, “Printers” option), or open the CUPS configuration page in your browser. In the program, choose “Add”, “Network printer”, “Windows printer via SAMBA”. When it asks for the printer address, enter smb://<domain>/iveco.urjc.es/URJC_IMPRESORA_VIRTUAL

The <domain> is the WINS domain you are in, which can be people, escet, cct, or others (see below “What domain am I in”).

Also make sure to check “notify user if authentication is required” (or, if you prefer, already save your username and password) and then choose the printer KONICA MINOLTA C759SeriesPS(P) BEU v1.1 (color) which you will find in the corresponding menu.

More manual procedure

Alternatively, these files can be installed through a more manual process, starting from the file (also downloaded earlier) KMbeuUXv1_20_multi_language.tar.gz:

$ tar xvzf KMbeuUXv1_20_multi_language.tar.gz
$ cd KMbeuUXv1_20_multi_language
$ sudo cp KMbeuEmpPS.pl /usr/lib/cups/filter/
$ sudo chown root:root /usr/lib/cups/filter/KMbeuEmpPS.pl
$ sudo chmod 755 /usr/lib/cups/filter/KMbeuEmpPS.pl

Next, add the printer using the system-config-printer program (in Ubuntu, configuration panel, “Printers” option), or in the CUPS configuration page, with the same data and procedure as in the automatic option (smb://<domain>/iveco.urjc.es/URJC_IMPRESORA_VIRTUAL as the printer address, and check “notify user if authentication is required”).

But now choose, instead of the printer directly, “Configure from ppd file”. And when given the option to choose the file, select the one in the directory for this configuration, named KMbeuC759ux.ppd.

How to print

With whichever procedure you have chosen, you will have finished installing the printer, and you should now be able to use it. To print, use whichever application you want, and when printing choose the printer you just installed. This will place the job in the print queue, pending authentication.

In the print queue (which you can access via the CUPS page) you can authenticate the job. You can also save the username and password if you prefer (and consider your computer secure enough for it).

The credentials it will ask for authentication are:

  • Username: URJC email address (unique domain name) without @urjc.es
  • Password: the one for the unique domain

Attention: Your username is not always determined this way. See below “What domain am I in, what user am I” for more information on how to find out your username, and what to do if the one you think you should have doesn’t work.

DNS Configuration

Before starting, make sure you can reach iveco.urjc.es. The problem is that the name may not be in DNS.

In a terminal, run:

dig +noall +answer iveco.urjc.es

and it should show the IP; if it shows nothing, you need to add it. To add it, edit as root the /etc/hosts file:

sudo vi /etc/hosts

and add the line:

192.168.46.181 iveco.urjc.es

What domain am I in, what user am I

Normally the username will be the unique domain name, without @urjc.es. For example, if your unique domain address is name.surname@urjc.es, your username will normally be name.surname. But if your username (unique domain name without @urjc.es) is more than 20 characters, it is very likely that the name you have to use will be the first 20 characters. In some exceptional cases, your username may be different from the unique domain name. In general, we have seen that the name you can see on the printer when you have authenticated with your card is the one you will have to use (you can see it on the screen that appears on the printer right after you authenticate).

You also need to know which domain (workgroup) you are in. There are several separate domains, including: people, cct and none. Apparently, each user is in one of these, so you will have to know which one you are in, or try.

One way to try is using the smbclient program. For example, if your unique domain address is name.surname@urjc.es, you can try if you are in the people domain like this:

$ smbclient -U name.surname -W people -L iveco.urjc.es
Enter PEOPLE\name.surname's password:

    Sharename       Type      Comment
    ---------       ----      -------
    ....
    URJC_IMPRESORA_VIRTUAL Printer   Virtual printing at all URJC Campuses

This way you test, in reality, the name/domain combination, so you can use it to validate both.

If you can’t find a combination that works for you, you can open a ticket at the URJC CAU, and ask for your username and your Windows domain (workgroup).


Guide prepared with the help of Gorka Guadiola, José Centeno (early versions) and Miguel Ortuño (notes on Ubuntu 16.04).