Need To Print
But what if I want to be able to print the attachment of an email from the convenience of my mobile device? Going up the stairs, turning on the desktop, waiting for it to boot, logging in, opening my email, then printing the attachment, takes up so much time! Accessing the correct email is so much faster on my phone. So I would want to be able to print from it too.I got to thinking that it should be possible to set up printing in a Libertine container. And turns out it is! Let's walk through the steps. I will assume that you already have a running Libertine container. Lets call ours xenial. I will also assume that you have a network printer that is accessible in a browser under http://<address of printer server>:631. In other words, that you have a CUPS server running somewhere on your local network. For the purposes of this walk-through let us assume the IP address of the server is 192.168.0.4
The Setup
Fire up the Terminal app in Ubuntu Touch and install the CUPS client package in the xenial container:$ libertine-container-manager install-package -i xenial -p cups-clientWe only want the client package since we will not be running a CUPS server locally in the container. This would not have been possible even if we wanted to, because daemons cannot be started inside Libertine containers.
Next enter the container shell:
$ libertine-container-manager exec -i xenial -c /bin/bashYou will now be in a root shell inside the xenial container. What we need to do here is tell the CUPS client where to look for a CUPS server. The default location is localhost. But we wouldn't be running a CUPS server on the device itself. So we need to point it to our server. Remember that ours is running at address 192.168.0.4:
# mkdir -p /etc/cups # touch /etc/cups/client.conf # echo "ServerName 192.168.0.4" >> /etc/cups/client.confNow you should be able to print from any other application installed in the container. Just install your favorite editor and viewers alongside. In my setup I have installed firefox, libreoffice and evince.
Notice that if you have more than one container on your device and you want to be able to print from within that container also, you would have to repeat the above steps for that container also. So it might be worth it to take a moment to consider how you want to distribute your applications among the different containers.
No comments:
Post a Comment