Printing (PDF) to uPrint printers at McGill from GNU/Linux

It’s been six months since I notified McGill ICS of an update for their page on using the campus uPrint service from GNU/Linux.

They haven’t updated anything, so this is to explain how to do it. This change is relevant only to Ubuntu 13.04 and later versions,  and maybe other flavours. For details and discussion, see this bug discussion.

Also, below, I treat the question of how to print to uPrint, once it’s set up. This is all easy and shorter than this whole blog post.

So, for Ubuntu 13.04, bring up a terminal (with Ctrl-Alt-t) and type the following lines, one by one (you’ll be prompted for your password the first time):

sudo echo "BrowsePoll" >> /etc/cups/cups-browsed.conf
sudo restart cups-browsed

That’s it.  Now you can print to any uPrint printer on campus… though not, unfortunately, from your printer dialogue. Update: By May 2014, this enabled printing from printer dialogs (careful, though; it defaults to one-sided.). (To test whether the above has worked, type “lpstat -p” in a terminal. You should see a list of some printers.)

The hints below are for printing from the command line. When I first got this working GUI printing to Uprint was not working. When I want to print something, I make sure it’s in PDF format. I then use a terminal; e.g. for file myfile.pdf, I type:

uprintpdf myfile.pdf

and that’s it.

For this to work, however, you need to find out your short McGill username (7 characters?) and put the following into (at the end of, for instance) your ~/.bashrc file, replacing MUSERNAME with your short user name:

uprintpdf() {
# 2012 Nov. This works nicely to print black and white to UPrint at McGill.
echo "Uprinting" &
pdftops "$1" /tmp/draftManuscript$$$!.ps
echo lp -U MUSERNAME -d mcgill-mono -o sides=two-sided-long-edge $2 $3 $4 /tmp/draftManuscript$$$!.ps
lp -U MUSERNAME -d mcgill-mono -o sides=two-sided-long-edge $2 $3 $4 /tmp/draftManuscript$$$!.ps 

Note that the above printer name (mcgill-mono) is found from running:

    lpstat -p

Update May 2014

As of May 2014 or earlier, McGill’s IT page says CUPS 1.6 and 1.7 (the latest) are not supported, and that they’re “working on a solution” for GNU/Linux users. However, it still works for me, although the printer names recently changed from having an underscore to a hyphen, which hung me up for a while!

Update April 2015

Still works in Ubuntu 15.04, though the hyphens turned back to underscores in the printer names(!).

I’ve shorthand for printing color and for the rare cases when I need to print single sided, so altogether, my .aliases includes the following (tab complete will find them if you type uprint and hit tab):

echo " I'm guessting the following only needs to be done once:"
echo "cupsctl "
echo "cupsctl Browsing=On"
echo "sudo restart cups-browsed "
echo "sudo service cups restart"
echo " and thereafter, lpstat -p gives :"
lpstat -p
echo "------------------"
echo "The above should read:"
echo "printer McGill-color is idle. enabled"
echo "printer mcgill-mono is idle. enabled"
echo "printer uPrint-Mono-Popup is idle. enabled"
echo "------------------"
echo "Printing options are (lpoptions -p mcgill-mono):"
lpoptions -p mcgill-mono
echo "------------------"
echo "To print:"
echo "lp -U [McGill Short Username] -d [printername] [filename] "
echo "where printername is the name of the printer as seen from the lpstat command; use either McGill-color or McGill-mono only."

#Yes, the following three bash functions should be combined!
uprintpdf() {
# This works nicely to print black and white to UPrint at McGill.
echo "Uprinting" &
pdftops "$1" /tmp/draftManuscript$$$!.ps
# mcgill-mono becomes mcgill_mono again in Ubuntu 15.04 !!
echo lp -U MUSERNAME -d mcgill_mono -o sides=two-sided-long-edge $2 $3 $4 /tmp/draftManuscript$$$!.ps
lp -U MUSERNAME -d mcgill_mono -o sides=two-sided-long-edge $2 $3 $4 /tmp/draftManuscript$$$!.ps 
uprintpdfcolor() {
echo "Uprinting color" &
pdftops "$1" /tmp/draftManuscript$$$!.ps
echo lp -U MUSERNAME -d McGill_color -o sides=two-sided-long-edge $2 $3 $4 /tmp/draftManuscript$$$!.ps
lp -U MUSERNAME -d mcgill_color -o sides=two-sided-long-edge $2 $3 $4 /tmp/draftManuscript$$$!.ps 
uprintpdfsinglesided() {
echo "Uprinting SINGLE SIDED" &
pdftops "$1" /tmp/draftManuscript$$$!.ps
echo lp -U MUSERNAME -d mcgill_mono -o sides=single $2 $3 $4 /tmp/draftManuscript$$$!.ps
lp -U MUSERNAME -d mcgill_mono -o sides=single $2 $3 $4 /tmp/draftManuscript$$$!.ps 

Update June 2015

The saga sadly continues. After over a month of not being able to print at all at work once again (oh, pining for the 1990s…!) and finding no solutions, I today noticed that the printers are back, albeit with new names again. Now I have UPrint_Colour_Popup and uPrint_Mono_Popup.

… but printing to them only worked fine for a while (June 2015), then seemed to work in the sense that jobs claimed to have been submitted but then nothing arrivee at the Uprint printer (July 2015), and then nothing worked at all, i.e. no printers are available /visible in CUPS (30 July 2015). I’m so embarrassed for my university and/or operating system….

Update April 2016

In February of 2016, I wrote the following to the McGill IT support people:

Hi. As a GNU/Linux user on campus, I’ve dealt with a steady stream of ever-new problems from Uprint over the last years trying to carry out simple printing.

Several months ago, Uprint stopped printing in grayscale for me and it stopped knowing what letter sized paper is.
I’m finally submitting a report about this, and to make it simple, I’m using one of NCS’s GNU/Linux machines: the Apollo server.

I copied the attached file (ungzipped) (it’s also in my home directory on Apollo) to two distinct names to distinguish the jobs below, and then issued the following commands on Apollo:
$lp -U mymcgillid -d mcgill_mono

request id is mcgill_mono-4 (1 file(s))

$lp -U  mymcgillid -d mcgill_mono -o media=letter

request id is mcgill_mono-5 (1 file(s))
The result is identical for the two jobs: (1) They fail to print initially, but come up with “Action needed” prompts, saying that the paper size is unknown. I have to choose a paper size and orientation from one of the paper supplies, manually. Then, (2) the job comes out in colour instead of mono.
These are not even the only problems I am having at the moment, but they are perfectly reproducible so I’m bothering you with them. It would be great to have this kind of basic functionality back.

The testpage, by the way, is a standard letter-sized test page from Hewlett Packard; I didn’t make it.


and 10 days later, having received no acknowledgement, I added:

In addition, many (longer) jobs simply fail to print. I arrive at the printer, go through the rigmarole described [above], and then the job looks like it’s about to print but hen it changes its mind and does “Overwriting” “Deleting” and the job disappears without a trace.  I’m attaching an example of such a file.
It’s been 10 days since I asked for help on this.


They responded, kindly saying that they were “escalating” the issue.  I’ve heard nothing since.

Posted in GNU/linux, McGill University, software, Ubuntu | Tagged , , , | 9 Comments

Asus Eee PC X101CH review: Very Poor

No matter what positive characteristics this netbook may have, the biggest negatives are sufficient for me to conclude: do not buy this machine.

My point of comparison is just one machine, an HP Mini 1116NR from nearly three years ago. I have recently shattered its screen by dropping it, but for what I paid, it’s the most remarkable computer I’ve owned.

Starting with the non-negotiables on the Asus Eee PC X101CH:

  1. The power connector is impossible cheap and fragile. It’s an old-fashioned cylindrical conductor but only about 3-4 mm wide (tiny) and therefore wiggly and weak. It already has a serious connection problem, and I have to constantly check that the indicator light says it’s well connected.
  2. The keyboard is horrid. People have figured out how to fit a good keyboard on a netbook-sized space, so why provide a bad one? The right shift key is half sized, which I might learn my way around, but the keys don’t respond easily and my error rate (mostly missed letters) when touch typing on this machine is too high. It’s still very difficult after weeks of using it.
  3. The hard disk also makes the most dog-awful noises: really loud clicks and pops when it wakes up and  at random times for no reason I can tell.  Since I have the netbook in part to take to seminars and meetings, this is completely unacceptable.

Those three are deal-breakers for me. Other than them, all I can do is to compare with my years-old HP mini. It had a 16 GB SSD (solid state) drive rather than the 320GB noisy and slower and less robust drive that the X101CH has. I’m a huge fan of the SSD’s speed and lack of fragile moving parts. Although no features of the X101CH are better than my old netbook, it is slightly bigger overall, and so it doesn’t fit in my camelbak for running to work.  Interestingly, the HP mini was cheaper three years ago than the X101CH today. Moore’s law has forsaken me in this market. Indeed, these days I often find zero netbooks offered with SSDs.

I do like the “VGA” graphics connector built in to the X1010CH. On my old netbook, I had to buy an extra dongle to connect to external displays.


The only other problematic differences I’ve experienced is in support for its hardware. The graphics card does not have open specifications and so open-source operating systems have had a hard time supporting it.

Ubuntu 12.04 and Ubuntu 12.10 on the X101CH

As of November 2012, Ubuntu 12.10 is a complete failure on this machine. After a long time waiting (from what I understand) 12.04 gained support for the graphics chip, and installing 12.04 with a network cable handy worked perfectly for me (sound, mousepad, display, sleeping, etc) — with a few exceptions:

  • The resolution provided on an external monitor is only 1024×600, the same as the built-in display.  This is awful; my old netbook provided a full-resolution extended desktop over two monitors. Worse, after an update (?), external monitors are completely unadjustable and only 3/4 of the desktop is visible on any external display.
  • Also, while the touchpad’s two-finger scrolling feature works, I’ve not been able to to get it to be sensitive enough to be comfortable.
  • Lastly, the brightness controls do not work. There are only two levels, it seems, and neither is very dim.
Posted in GNU/linux, hardware, Ubuntu | Tagged , , | 7 Comments

iClicker under GNU/Linux

Electronic “clickers” are personal wireless transceivers carried by every student in a lecture hall and are used for in-class feedback and assessment in teaching. At McGill, we have just switched to a new clicker system that is all about integration with Microsoft Powerpoint. When attending the new faculty welcome session with the Provost and others, a demonstration of this system failed and ended when Powerpoint crashed. There is some ability (TurningPoint Anywhere) with that system to do general overlays, but the company has now bundled that software with the main Windows/Mac packages, so it’s impossible to install under Wine.  I’ve given up for the time being.

In any case, back at UBC we used iClickers, and I am reposting my very old notes (which were on a static html page) here so that people may add their wisdom.  Note that I never got iClicker working under GNU/Linux natively, either: I used a virtual machine (under GNU/Linux) running Microsoft OS to give my lectures.

I’m teaching a course at UBC with the iClicker. iClickers are a radio transceiver system that allow lecture-style classes to include real-time individual feedback and assessment. But until mid/late 2009 (according to the manufacturer), the interface on the lecturer’s side only supports Microsoft and Apple operating systems. In the mean time, what can be done for Linux-wielding lecturers?

The following are currently being tried. Please send me infos if you have some. The second one, using Virtualbox, seems to work for me. To use this would mean I would use a PDF viewer or other display software inside Windows to give my presentation, as well as to run iClicker. That way, the iClicker panel can overlay the talk.

  • Wine: Use the api “wine”. Well, you can download MSVBVM60.DLL and put it in ~/.wine/drive_c/windows/system. Then the iClicker application will work fine. But Wine simply doesn’t support USB (!), so there’s no way to connect to the iClicker hardware. (one old ref:
  • Virtualbox. Install the non-open-source version (which comes with nice USB support) of Sun’s miraculous “Virtualbox” software. You can do this just by adding an extra software source repository in Ubuntu. Then add a single line to your /etc/fstab to make your usb ports available to vboxusers. Use a Microsoft operating system inside VirtualBox. Now, in setting up USB interfaces in VirtualBox, I can see the iClicker. Now everything seems to run (software, no initial complaints about missing the iClicker). But the interface was very flakey, at best, under Win2K. Under Win XP it seems to work fine… mostly. I’m not sure if the remaining problems are there under Windows, too? The fwd/back selection on the instructor’s clicker didn’t do anything, and the “show correct answer” sometimes needed to be pushed twice to advance the highlighted response.
  • Write a driver… Here’s one stuck attempt:
  • [2012 update] and now there’s a successful attempt by Jason Siefken. This is a command-line interface, only. Jason said:

    For including a screen-capture, “ lists that if you have ImageMagick installed, you could run

    import -window root -resize 400×300 -delay 200 screenshot.png

    to take a screenshot. This could be set up in a shell script to take a screenshot, then start the poll. It’s also worth noting, I haven’t yet tested on a large class (only with the small number of clickers I brought home) so I would encourage people to test it before depending on it. “

I am also in the process of developing a LyX environment for iClicker questions in beamer presentation (LaTeX). If you’ve already made progress on such a thing, please contact me.

Posted in GNU/linux, McGill University, Microsoft, software | 2 Comments

How-to: Alpine and maildir (and offlineimap (and GMail)) — no more maildir patches!


If you think non-graphical email clients are  efficient or otherwise desirable, and want offline access to your email, this post describes a step forward.  In particular, it describes the set-up of offline-accessible mail through the Alpine (formerly Pine, shortly Realpine) email client under (Ubuntu/Debian) GNU/Linux.


Finally, I think we can move beyond the dreaded “maildir patch” problems associated with Pine/Alpine/Realpine since it became fully open-source.  I would, ultimately, like to see the setup of alpine / mutt / emacs / etc email clients be as easy as GUI clients, at least for those who want a pretty standard setup. For instance, in my case, I want Continue reading

Posted in Alpine, GNU/linux, software, Ubuntu | Tagged , , , , , | 8 Comments

McGill University firmly embedded with Microsoft

This is the nearly incredible story of how one of Canada’s great universities has become such a buttress of the Microsoft monopoly that it cannot even provide for a new faculty member the normal ability to send and receive email.

I will shortly arrive as a new faculty member at McGill University.  In academia, email is still a primary form of communication and collaboration.  I feel that a university email address is part of my professional face in representing the university. Nevertheless, I don’t demand much from the university in the way of email support.

In fact, all I want is Continue reading

Posted in Academia, McGill University, Microsoft, software | Tagged , | 11 Comments

Annotating PDFs in GNU/Linux

After years of waiting for a top-quality open source PDF editor/markup tool, and being baffled why they don’t exist… I’ve given up.  What I’ve settled on for the moment performs rather well:

At a command line, I type

pdfedit <pdffilename>

You can download my pdfedit, which is a file in my ~/bin folder (which is on my path). It relies on closed source Windows software (!agh!); see, installed in Wine. Continue reading

Posted in GNU/linux, software | Tagged , , | Leave a comment

Bounties for Gnome (Compiz?) window behaviour improvements

Back in 1993 on the student computer network at MIT  it seems we had window managers (I used vtwm.gamma) and broadcast instant message systems (zephyr, ridiculously customisable)  running on Unix(es) that still compete  very favourably with features offered today by what people mistakenly consider to be recent inventions.

Anyway, the GNU/Linux world has sensibly settled in part on a compromise interface, Gnome, which behaves nicely but is not very customisable. Or is it?  Here are some things I will happily PAY YOU to implement or tell me how to set up.  Propose a price if you know how to solve one or more: Continue reading

Posted in Gnome, GNU/linux, software, Ubuntu | Leave a comment

Tied selling of Windows O/S with computer hardware in Canada: a complaint to the Competition Bureau

To follow up on my recent victimization by the “Microsoft Tax”, I filed a complaint with the Canadian Competition Bureau, the federal agency charged with investigating anti-competitive behaviour. I think I understand their response, which I’m including below, but there may be other routes within the Competition Act on which to base a complaint.

And of course, my posting the letter from the competition bureau here does not mean that you should not write your own to them! Bureaucracies change, and voices may even add up. There response reflects only one legal and economic interpretation.

Dear Mr. Barrington-Leigh:

In your complaint to the Competition Bureau you indicated that on some unspecified date you purchased a Lenovo ThinkPad notebook computer with Microsoft Windows operating system (“Windows O/S”)pre-installed.  Before you purchased the computer, the retailer informed you that the computer would not be sold without Windows O/S in it.  After you purchased the computer you removed Windows O/S andreplaced it with a different, compatible O/S, namely Linux Ubuntu.  You were then able to use your computer for its intended purpose without any problems.  Subsequently you contacted the retailer,requesting a partial refund on the purchase price of the computer in compensation for not using the Windows O/S on your computer.  They refused. Continue reading

Posted in GNU/linux, Microsoft, software | Tagged , , , , , , | 4 Comments

Lenovo Thinkpad T410s and Ubuntu 10.10

This is a review, of sorts, though it will grow as I need/test features.

I received my T410s and recorded a video of myself rejecting the Microsoft EULA, and erasing the harddrive. Good riddance, Windows 7.

The keyboard feels really nice/fast. I don’t find the trackpoint thing especially useful, but maybe I’ll learn to use it.

The hardware does not include:

  • a dial-adjustment for volume
  • extra buttons for one-touch launches of browser, email, etc Continue reading
Posted in GNU/linux, hardware, Lenovo T410s, software, Ubuntu | Tagged | 8 Comments

The Microsoft tax and Windows refund in Canada: Lenovo

I am one of those (quietly) rabid Microsoft opponents. I believe Microsoft represents a collossal market failure, in that it has added very little in innovation  towards making better software. Instead, its innovation has nearly entirely been in capturing and maintaining monopolist influence and consumer dependency — buying up and co-opting others’ ideas, and designing software to increase dependency rather than to improve quality, performance, or productivity. Continue reading

Posted in GNU/linux, Microsoft, software | Tagged , , , , , | 3 Comments