Difference between revisions of "Cool Solution - Printing on a Thin Client"

From Univention Wiki

Jump to: navigation, search
m (Citrix XenApp receiver printing)
(27 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Cool Solutions Disclaimer}}  
{{Cool Solutions Disclaimer|Repository=no}}
{{Out of Maintenance}}
= Introduction =
== Archive ==
Univention Corporate Client ([http://wiki.univention.de/index.php?title=Univention_Corporate_Client UCC]) is a solution for the central operation and administration of PCs, Notebooks, Thin Clients or kiosk systems. A client is typically rolled out via images. A thin client image offers a minimal desktop for RDP and UCC sessions and the standard image provided by UCC does not have support for local printers.
The redirection of local printers on the client computer to a print server would allow printing jobs from other computers (eg. RDP server) to be printed on the thin client. This is useful in a Home Office environment for example.
There is a version of this article for [http://wiki.univention.com/index.php?title=Cool_Solution_-_Printing_on_a_Thin_Client&oldid=12468 UCC 1.0].
Here is shown how to enable support for local printers on the thin client and manually configure printer redirection from a UCS print server.
= Thin client as a local print server =
The idea is to install a local printing server (CUPS) on the thin client, that would recognize printers that can then be shared with a remote printing server.
== Getting CUPS into the thin client ==
The default thin-client image does not have support for local printers. So CUPS should be installed, configured (at least one local user must be allowed to add printers and share them) and set up as a local service.
There are several ways to add CUPS into an image, these are some of them, next section shows how to install cups on an existing image:
*The image is already built, so it should be modified and reloaded to the client(s) (explained next).
*The client(s) can be rebooted with rw support, updated and set back to ro (See UCC Manual - [http://docs.univention.de/ucc-manual-1.0.html#rollout:persistent UCC Persistent configuration and Overlayfs] sections)
*A new image that includes the cups package can be rebuilt and rolled-out to the client(s) (by adding the package 'cups' to the list, see UCC Manual - [http://docs.univention.de/ucc-manual-1.0.html#imagegen:chapter Generation of adapted images])
== Modification of the image  ==
Follow the instruction [http://wiki.univention.de/index.php?title=Modifying_an_UCC_image in this article] to open an existing image for modification.
=== Install CUPS ===
Once installed, it will use around 50MB, so for the installation process, around 200MB free are needed.
~# apt-get -y --no-install-recommends install cups
dpkg will try to start the cups service after installation, showing errors. This is not a real problem in the chroot environment. The cups service should start properly once is rolled out and booted (the post-installation script invokes Upstart outside the chroot: UCS, which instead uses Init [http://upstart.ubuntu.com/cookbook/#run-upstart-in-a-chroot-environment more here]).
==== cups-bsd for XenApp ====
Install CUPS BSD commands to print from XenApp sessions.
Citrix Receiver uses the lpr command to print files. lpr is part of cups-bsd (a suggested package for cups)
~# apt-get -y --no-install-recommends install cups-bsd
=== A cups administrator ===
Grant a local user permissions to administer CUPS:
(the local root account is also a CUPS administrator)
~# useradd -s /bin/false -G lpadmin cupsadmin
~# echo cupsadmin:Adm1n*pr1nt | chpasswd --crypt-method SHA512
Don't forget to run 'sync' to force a commit before 'exit'
=== Share printers ===
Since the service is not running, we won't be able to use cupsctl within the chroot environment, instead we will edit the configuration file:
~# nano -w '''/mnt/img/etc/cups/cupsd.conf'''
To allow other to see local printers: Change ''Browsing'' to 'On' and add the following lines
# Show shared printers on the local network.
'''Browsing On'''
'''BrowseOrder allow,deny'''
'''BrowseAddress @LOCAL'''
'''BrowseLocalProtocols CUPS dnssd'''
To share printers to the local network or to other networks, go to '<Location />' and change ''Allow'' to '@LOCAL' or to 'all'
# Restrict access to the server...
<Location />
  Order allow,deny
  '''Allow all'''
and comment out the lines 'Order allow,deny' in <Location /admin> and <Location /admin/conf>
In nano, use Ctrl­ X to exit, answer "yes" to save and hit ENTER
Unmount the image, it can now be rolled-out to the thin client, and started again.
== Notes ==
* It should be possible to set users from the domain to be locally in the 'lpadmin' group. This can be done by adding 'lpadmin' to the list of local groups in /etc/univention/templates/files/etc/security/group.conf This way any user can administer (add, modify, delete...) local printers through the Web interface of cups. it should look like this:
~# cat /etc/univention/templates/files/etc/security/group.conf
* It should also be possible to create a policy that adds the 'lpadmin' group to users in certain group like here http://wiki.univention.de/index.php?title=Ubuntu#Configuring_user_logins (I can create a lpadmin group with GID:111 and assign some users to it, but it wouldn't appear as extragroups when the user logs in. It may be because such small number 111 is not allowed as GID...)
* And to allow a specific group to administer local printers, a login policy can be used for such group (See UCS Manual - Policies).
<!--== Update the clients image ==-->
= Printing locally from a remote print server =
By now the thin client should have an updated image with a CUPS server. Please verify it by opening http://localhost:631 on the thin client. Steps to add a printer, share it with the network and use it from a remote print server are described next.
==Plug in and set up a local print queue==
CUPS is able to recognize and manage USB/LPT printers connected locally. To test it, please make sure your printer is turned on and plugged.
Go to [http://localhost:631/admin '''Administration'''] on the Web interface. CUPS will ask for an authorized username (cupsadmin) and its password (Adm1n*pr1nt).
===Add a new printer===
Under '''Printers''' click '''Add printer'''.
After that, your printer should appear under '''Local Printers:''', please select it and click '''Continue'''
On the second prompt make sure you thick off the box for '''Sharing: [] Share This Printer'''. Follow the prompts and choose the family of drivers for your printer. (See: [http://www.cups.org/documentation.php/doc-1.7/overview.html CUPS documentation] for further details).
Since it's shared with IPP, the local printer can now process printing jobs from other computers!
In order to save this configuration, the image must be saved with these new CUPS configuration files (mainly 'cupsd.conf' and 'printers.conf' in /etc/cups. See the UCC doc as well: [http://docs.univention.de/ucc-manual-1.0.html#rollout:persistent UCC Persistently stored system settings])
==Set up the remote server and send printing jobs==
With a local printing queue accessible from the network, the UCS Master can set up the printer on the print server and share it from there. We can follow the instructions on [http://docs.univention.de/manual-3.1-1.html#print::shares UCS Creating a printer share].
| [[Image:Add-remote-queue.png|thumb|Add a new printer on a UCS Master]]
| [[Image:Print-remote-job.png|thumb|See the queue on a Print Server]]
We will need:
*The name of the printer you used on the thin client (here: hp-4960).
*The IP addresses or FQDN of both, print server (here: server1.example.qa) and thin client (here: thinclient04.example.qa)
*A name for the new UCS-shared printer (here: hp4960ex)
Basically, we are telling the UCS master server that ''server1.example.qa'' will share a printer that is on ''thinclient04.example.qa''. Such queue exists as ''ipp://thinclient04.example.qa/printers/hp-4960'' and is going to be available to the UCS network as ''hp4960ex''
= References =
*[http://wiki.univention.de/index.php?title=Univention_Corporate_Client UCC Wiki]
*[http://www.cups.org/documentation.php/overview.html CUPS Overview]
*[http://docs.univention.de/ucc-manual-1.0.html#imagegen:chapter UCC Generation of adapted images]
*[http://wiki.univention.de/index.php?title=Building_UCC_images More on UCC custom image generation]
*[http://wiki.univention.de/index.php?title=Modifying_an_UCC_image UCC Modifying an image]
*[http://docs.univention.de/ucc-manual-1.0.html#rollout:chapter UCC Management, roll out and updates]
*[http://docs.univention.de/manual-3.1-1.html#print::shares UCS Creating a printer share]
*[https://forge.univention.org/bugzilla/attachment.cgi?id=5297 Example printers.conf]
*[https://forge.univention.org/bugzilla/attachment.cgi?id=5299 Example cups.conf]
*[http://forum.univention.de/viewforum.php?f=65 Ask in the UCC forum]

Latest revision as of 11:23, 8 September 2017

Produktlogo UCC Version 1.0

Note: Cool Solutions are articles documenting additional functionality based on Univention products. Not all of the shown steps in the article are covered by Univention Support. For questions about your support coverage contact your contact person at Univention before you want to implement one of the shown steps.

Also regard the legal notes at Terms of Service.
Out of Maintenance


There is a version of this article for UCC 1.0.

Personal tools