Work-around in Linux to switch between single-sided and double-sided printing

I use Gentoo Linux on my laptop, and have drivers installed for quite a few printer manufacturers and models, as I work in multiple offices and they have a wide range of printers and MFPs. To date I have had no trouble printing single-sided (‘simplex’) and double-sided (‘duplex’) documents on the printers that support duplex printing. However, one of the offices I have been working in recently has a Konica Minolta bizhub C368, a floor-standing MFP, and the printer in this MFP did not enable me to switch between single-sided and double-sided printing even though Windows users in the same office could. This article explains how I managed to switch between the two printing modes.

A Linux driver for the bizhub C368 can be downloaded from the Konica Minolta Download Centre. I downloaded the tarball KMbeuUXv1_22_multi_language.tar.gz, extracted the contents to the directory ~/KMbeuUXv1_22_multi_language/ and followed the instructions in ‘BEU Linux CUPS Driver Guide.pdf‘:

user $ cd ~/KMbeuUXv1_22_multi_language
user $ su
root # ./install.pl
root # rc-service cupsd restart

I then used the CUPS Administration page in a browser window to set up the printer.

As I wanted the printer to be the default printer while I was working in that office, I edited the system-wide and user-specific lpoptions files to contain the printer name I had specified to CUPS when setting up the printer:

user $ cat ~/.cups/lpoptions
Default Konica_Minolta_bizhub_C368
root # cat /etc/cups/lpoptions
Default Konica_Minolta_bizhub_C368

I was then able to print from all the usual applications, except that the applications could only select single-sided printing, even though the printer supports double-sided printing and Windows users in the office could print double-sided. I could not find a setting for this in the CUPS Manager’s ‘Set Default Options’ page for the printer, so I edited the PPD file to change the relevant default option:

root # nano /etc/cups/ppd/Konica_Minolta_bizhub_C368.ppd

I changed the default printing option from:

*DefaultKMDuplex: 1Sided

to:

*DefaultKMDuplex: 2Sided

Then I could print double-sided pages, but selecting ‘single-sided’ in applications would still print double-sided. Now, I don’t know if there is a proper fix for this, but I could not find out how to do it. Therefore I opted for a work-around which is fine for my purposes. Here is what I did…

I created the shell script ~/Konica_Minolta_bizhub_C368.sh containing the following:

#!/bin/bash
echo
echo "Konica Minolta bizhub C368 printer"
echo
echo "Select single-sided or double-sided printing as the default"
echo
# Get the password entry over and done with now
echo "Enter your user account password."
sudo ls > /dev/null
echo
CHOICE=""
while [[ $CHOICE != "X" && $CHOICE != "x" ]]; do
    if [[ $CHOICE != "X" && $CHOICE != "x" ]]; then
        echo
        echo -n "[1]-sided, [2]-sided or e[X]it : "
        read -n1 CHOICE
        echo
    else
        break
    fi
    case $CHOICE in
        [1] ) sudo cp /home/fitzcarraldo/Konica_Minolta_bizhub_C368/Konica_Minolta_bizhub_C368.ppd.single-sided /etc/cups/ppd/Konica_Minolta_bizhub_C368.ppd
              echo "Single-sided printing has been selected"
        ;;
        [2] ) sudo cp /home/fitzcarraldo/Konica_Minolta_bizhub_C368/Konica_Minolta_bizhub_C368.ppd.double-sided /etc/cups/ppd/Konica_Minolta_bizhub_C368.ppd
              echo "Double-sided printing has been selected"
        ;;
        [Xx] ) echo; exit;;
        * ) echo; echo " Enter '1', '2' or 'X/x'"
    esac
done

I created the Desktop Configuration File ~/Desktop/Konica_Minolta_bizhub_C368.desktop containing the following:

[Desktop Entry]
Comment[en_GB]=Select single-sided or double-sided printing for Konica Minolta bizhub C368
Comment=Select single-sided or double-sided printing for Konica Minolta bizhub C368
Encoding=UTF-8
Exec=konsole -e sh /home/fitzcarraldo/Konica_Minolta_bizhub_C368.sh
GenericName[en_GB]=Select printing sides for KM bizhub C368
GenericName=Select printing sides for KM bizhub C368
Icon=/home/fitzcarraldo/Pictures/Icons/konica-minolta.png
MimeType=
Name[en_GB]=Konica_Minolta_bizhub_C368
Name=Konica_Minolta_bizhub_C368
Path=
StartupNotify=true
Terminal=true
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=none
X-DCOP-ServiceType=
X-KDE-SubstituteUID=false
X-KDE-Username=

I downloaded a Konica Minolta logo from the Web and used it for the icon for the Desktop Configuration File.

And finally I copied the PPD file to two files and edited them:

~/Konica_Minolta_bizhub_C368/Konica_Minolta_bizhub_C368.ppd.single-sided

which includes *DefaultKMDuplex: 1Sided

~/Konica_Minolta_bizhub_C368/Konica_Minolta_bizhub_C368.ppd.double-sided

which includes *DefaultKMDuplex: 2Sided

Now, if I want to switch between single-sided and double-sided printing I just double-click on the icon on my Desktop and a terminal window pops-up allowing me to select the new default:

Konica Minolta bizhub C368 printer

Select single-sided or double-sided printing as the default

Enter your user account password.
Password:

[1]-sided, [2]-sided or e[X]it :

About Fitzcarraldo
A Linux user with an interest in all things technical.

One Response to Work-around in Linux to switch between single-sided and double-sided printing

  1. Artemiy says:

    Awesome! Thanks a lot.
    I had the same problem with Konica-Minolta C451 and editing the .ppd file helped!
    The only difference is in the .ppd file I have changed:
    *DefaultKMDuplex: False
    to:
    *DefaultKMDuplex: True

    I guess in the newer version the have a slightly different .ppd.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.