Off-screen windows with Inkscape on MacOS and XQuartz

My go-to editor for vector images is Inkscape. So much so that I use it in the creation of my cartoons and comic strips, and have been writing a monthly column about it in Full Circle Magazine for over six years now!

Just recently I’ve switched jobs and have to use a Mac as my day-to-day work machine, rather than the Linux box I’m used to. Whilst Inkscape is available for the Mac, there is no maintainer to release native builds. For most releases, therefore, the Mac offering is a straight port of the Linux version, and uses XQuartz as its X Server. Unfortunately XQuartz has more than a few “issues” – not least of which is a significant problem with multi-screen setups. At my new job they suffer from the delusion that more screens are better, so I have to work with a 3-screen arrangement that would make an air traffic controller proud.

The biggest problem with XQuartz on a multi-screen setup is that it has an annoying tendency to place new windows off-screen. This manifests itself in Inkscape as dialogs disappearing into the ether before you ever get a chance to see them. Open the Document Properties dialog and there’s a good chance it will be placed at some obnoxious coordinates that render it invisible to the user. The same with the Fill & Stroke dialog, the Inkscape Preferences, the Align & Distribute dialog, and all the others. If you get lucky some might appear where you can use them, but enough will go missing that it makes working with the program virtually impossible for anything but the simplest of uses.

This issue is well known to MacOS users of Inkscape, and has been reported on Launchpad at least twice, has its own entry in the Inkscape FAQ, and also crops up on the main Inkscape forum. There are various workarounds mentioned on those sites, but they’re all a little clunky, to say the least.

So I’ve crafted my own clunky (but hopefully slightly less clunky than the others) solution to the problem: a shell script to find all the Inkscape windows and move them to the top-left of the XQuartz screen. But that seemed like overkill when it’s usually just the last dialog you tried to open that you need to move. And what about other applications? Surely Inkscape can’t be the only program that XQuartz has problems with. So I expanded the script to cover all those cases.

1) You’ll need to install the ‘wmctrl’ program, which does the hard work of repositioning the windows. I installed it using Homebrew. (brew install wmctrl)

2) Download the script using this link

3) Please take a look at the script (it’s not that long) to confirm that it’s not sending all your bitcoins to me, or anything equally dodgy. Then you’ll need to make it executable by running:

chmod +x

4) To use it, open a terminal within XQuartz and run it with either no options, or a single option, as follows (this is the result of running with the -h option):

Usage: [option]
With no options : move the last opened window to the top left of the screen
-1, -p, --previous : move the previously opened window to the top left of the screen
-i, --inkscape : move all the Inkscape windows to the top left of the screen
-a, --all : move all the windows from all applications to the top left of the screen
-h, --help : show this help text
With any other option, try to find windows that match the string provided as part of their WM_CLASS property, and move them to the top left.

Note: the -1 option lets you open a terminal to run this script *after* your window has gone missing

E.g. xterm will move all your Xterm windows to the top left, -i will move only the Inkscape windows, and will just move the last window you opened. As the note in the help text suggests, if you try to open a dialog in Inkscape (or some other program) and it doesn’t appear due to rendering off-screen, you can then open a terminal and run -1 (or -p or –previous) to move the window to the top left.

Please note that this script probably isn’t very robust, and any efforts to move the “last” or “previous” windows are purely based on the assumption that wmctrl -l lists windows in the order they were opened. It has worked well enough for my purposes, but that doesn’t mean it will work for you.

For bonus points you can add the script to the ‘Applications’ menu in XQuartz, so it’s always readily available when you lose a dialog. In that case it’s best to call it with no options, so you can select it as soon as a dialog goes AWOL.

Posted in Miscellaneous, SVG, Tech. Tags: , . No Comments »

Full Circle Magazine, Issue 63

The latest issue of Full Circle Magazine, featuring Part 3 of my Inkscape tutorial, is now available for free download.

Full Circle Magazine is a free publication which focuses on Ubuntu and Linux in general, though the Inkscape tutorials are largely applicable to Windows and MacOS users as well.

Minimus AVR USB

Thanks to this overly syndicated blog post (really – Planet Ubuntu I can understand given its content, but Planet Mozilla and Planet Inkscape, too!?) I discovered a wonderful little device called Minimus AVR USB. Basically it’s a USB-enabled (and USB-programmable) AVR microcontroller on a board with the I/O lines brought out to solder connections and just enough on-board peripherals (two buttons, three LEDs) to do some basic things without breaking out the soldering iron.

I’ve been meaning to get back into microcontrollers for a while and been tempted to go down the Arduino route, but too little spare time meant that I never got any further. Because of their slightly illicit origins as PS3 modding tools, Minimus boards are readily available at modding sites for just a few pounds (I bought mine for less than £5 from here).

I hope to post more about these in future, but I wanted to get an early post in to mention a little pitfall I fell into. I’m developing on a Ubuntu box and managed to get the AVR toolchain installed and working easily enough. I grabbed the demo code from the Minimus site and was able to push the hex file to the board in order to get the lights flashing and the buttons working. At least I knew the little board was operational.

Next I opened the source code, but as it’s been written to compile using AVR’s Windows toolchain I promptly ignored the build instructions and make file. “It’s just a few lines of code”, I thought to myself, “I can hand compile it easily enough.” So I did. And it compiled. And I converted the resultant file into a hex file for pushing to the Minimus. I pushed it with no errors, reset the device and… no flashing lights.

Many hours of tweaking that tiny source file proved that I could turn each of the lights on permanently, or off permanently. But I couldn’t persuade them to flash, and I couldn’t read the state of the hardware button. I threw in snippets of code I’d found to disable the watchdog timer, but still no joy. I tried setting the I/O lines using binary, hex, decimal, bit shifts and any other method I could think of. Nothing worked.

The solution finally came when I found some other code online and built using the make file. Suddenly the lights were flashing and the button was working! Something in the make file – one of the many switches to GCC probably – was sufficient to get things working. So if you find yourself here because you’ve bought a Minimus to play with and can’t seem to get it going, check that you’re building with a make file, not compiling by hand.

Posted in Miscellaneous, Tech. 2 Comments »

It’s not over ’til the fat Chumby sings

I’ve written about my Chumby on this blog in the past (and this one, too). Alas! Chumby Indistries is effectively no more, the staff having moved on and any worthwhile intellectual property in the hands of a corporate trustee.

Fortunately the servers are still serving, so my Chumby is still working as well as ever. There will come a day when they’re switched off, but one advantage of the Chumby’s open source nature is that a couple of the users over at the Chumby forum have been able to create ‘untethered’ versions of the firmware which don’t rely on the Chumby Industries servers. I’m sure I’ll lose some functionality when the servers go dark, but at least my squishy little friend won’t turn into a brick.

Make Magazine has a long and interesting interview with Andrew ‘Bunnie’ Huang talking about his time a Chumby Industries, and more. It should be required reading for all those Kickstarter projects hoping to create the next big thing in hardware…

There’s a certain irony to Chumby Industries closing down, right at a time when other people have raised millions of dollars with a similar idea. Yes, the Pebble Watch may be more portable than a Chumby and fill a slightly different niche, but the idea of a clock/watch that can switch between various single-purpose applications and feed you with information from the internet makes them more similar than different. There’s clearly a demand for such “third screen” devices and I think the Chumby was simply an idea ahead of its time.

So while my Chumby still works as Bunnie intended, I’ll continue to enjoy the eclectic delights it offers up. With luck an untethered firmware will extend its life even further. Chumby Industries may be gone, but Chumbys live on.

RIP Jack Tramiel

A couple of days ago Jack Tramiel, founder of Commodore and subsequently responsible for Atari’s home computer renaissance in the 1980s passed away.

I grew up during the home computer boom of the 80s. My first machine was a Sinclair ZX81, but that was replaced by a Commodore Vic-20. But it was my next computer, an Atari ST, which was perhaps the first machine I really fell in love with. I worked throughout my 6 weeks school holiday in order to save the £260 it cost, and although it has since been re-housed (using a hacksaw on the motherboard in order to fit it into a 19″ rack case!) I still have it sitting next to me now.

For day-to-day use it was replaced by an Atari Mega STE, then an Atari Falcon. I even have an Atari Jaguar which still sees occasional use for games of Tempest 2000. Ultimately, through using MiNT on the STE and Falcon, I was able to gain my first serious experiences with a Unix command line interface… which led directly to my switch to Linux in 1995 (and which I’ve been using ever since).

From games to music to programming, Tramiel’s Atari was behind most of my hobbies during the late 80s and early 90s. Rest in peace, Jack, and thanks for all the good times.

The League of Extraordinary Hypocrisy

So it would seem that DC comics are creating a prequel series for the seminal 1980s work, “Watchmen“. I’m not going to discuss whether or not this is a good thing, but rather consider the quotes on that page from the original creators of Watchmen, Alan Moore and Dave Gibbons.

Let’s deal with the quote from Dave Gibbons first:

“The original series of Watchmen is the complete story that Alan Moore and I wanted to tell. However, I appreciate DC’s reasons for this initiative and the wish of the artists and writers involved to pay tribute to our work. May these new additions have the success they desire.”

Now compare that with the quote from Alan Moore:

I tend to take this latest development as a kind of eager confirmation that they are still apparently dependent on ideas that I had 25 years ago. […] I don’t want money. What I want is for this not to happen. As far as I know, there weren’t that many prequels or sequels to Moby Dick.

Hmmm… this is the same Alan Moore whose League of Extraordinary Gentlemen series is based almost entirely on characters created by other people (most of them far more than 25 years ago), and which includes Moby-Dick’s Ishmael in the first volume. The same Alan Moore whose Lost Girls puts a pornographic twist onto other writers’ characters.

So, Mr Moore, why is it okay for you to use other people’s creations in your own work, but when it comes to somebody creating stories based on your own characters you want it “not to happen”?

Ain’t That A Shame

…is just one of the songs from 1955 what would now be out of copyright in the US, if it weren’t for the retroactive changes to copyright law that have taken place since then.

The list of other works that, under the terms that applied when they were created, should now be in the public domain includes numerous classic films, books, paintings and songs. This article lists some of the most notable.

On the plus side, at least James Joyce’s works are now out of copyright in the EU.

Posted in Miscellaneous. No Comments »

Open Educational Resources for Typography

Typography is an art form all of its own. It combines aesthetic and stylistic concerns with elements of ergonomics, cultural history and science. While most of us happily plod along with a few basic fonts in our arsenal, the right typography can transform words significantly. The letter forms in a font can carry meaning and evoke feelings which can reinforce or even subvert the words themselves.

I find typography to be a fascinating part of the graphic design process. Which is why I have thrown a few dollars in to support the Open Educational Resources for Typography project on Kickstarter. Although it’s now been fully funded, there’s still a week to run so it’s not too late to make a contribution to help them out. I’m looking forward to receiving my PDF next year, and hopefully learning more about this hugely difficult subject that we all take for granted each time we turn on a computer, read a book or notice a sign.

Piracy: Not just about price, but availability

Here’s an interesting read from the Open Rights Group about the (lack of) availability of UK films as legitimate digital downloads.

The short summary version of it is that many British films are not legally available to download in the UK – and if they are, it’s often at a price that is comparable to buying it on DVD, but for a lower quality version.

I’m pleased to see that they also included figures that exclude iTunes (which result in even more dismal numbers): as a Linux user I don’t have access to iTunes at all, so my choices are even more limited. Unfortunately history suggests that even if the availability lessons of this report are heeded, the results will only practically be available to Mac and PC users.

RIP Steve Jobs

Today the world lost a great man with the sad passing of Steve Jobs, co-founder of Apple Computers.

I’m no Apple fanboy – in fact over the past few years I’ve increasingly stopped using their products as they’ve become more and more locked into their own ecosystem. I prefer something more open in nature.

But there’s no denying that their products are things of beauty. That they have pushed the boundaries of manufacturing and user experience to new levels. Much of this is due to the drive and vision of Steve Jobs.

It always amazes me that no other PC manufacturer has realised that there is a market for well designed, aesthetically beautiful products. Instead they produce wave after wave of machines covered in stickers and logos, and filled to the brim with crapware. Apple, under Steve Jobs’ leadership, has thrown down a design gauntlet. Unfortunately the rest of the computer world has chosen to walk away from it.

There will be obituaries, reminiscences and retrospectives about Steve Jobs tenure at Apple, but for me the thing that best sums up his influence is this parody video:

I still wish he hadn’t killed off the Newton, though. I wonder just how much more advanced the new iPhone would be if Apple hadn’t wandered away from the portable PDA-like device market for a few years.

I’m sure his influence will be felt within Apple for many years to come — but I can only hope that influence will spread. The computer industry needs people like Steve who understand that technology isn’t just about specifications, it’s about people.

Posted in Miscellaneous, Tech. No Comments »